All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mappings.csw-record.yml Maven / Gradle / Ivy

The newest version!
---
# http://api.eurogeoss-broker.eu/dab/services/cswiso?service=CSW&version=2.0.2&request=GetRecords&resultType=results&ElementSetName=full&namespace=xmlns%28csw=http://www.opengis.net/cat/csw/2.0.2%29&typeNames=csw:Record
name: "CSW Record Mapping"
version: 1
xpathversion: 2.0
applicability_xpath: "boolean(//*[local-name()='Record']) and boolean(namespace-uri(//*[local-name()='Record']) = 'http://www.opengis.net/cat/csw/2.0.2')"
namespaces:
    xlink: http://www.w3.org/1999/xlink
    csw: http://www.opengis.net/cat/csw/2.0.2
    dc: http://purl.org/dc/elements/1.1/
    dct: http://purl.org/dc/terms/
    ows: http://www.opengis.net/ows
index:
    create: true
    name: geodab
    type: dcrecord
mappings:
    id:
        xpath: "//dc:identifier"
        identifier: true
        properties:
            type: string
            boost: 10.0
    title:
        xpath: "//dc:title"
        properties:
            type: string
            boost: 5.0
    type:
        xpath: "//dc:type"
        properties:
            type: string
            boost: 2.0
    format:
        xpath: "//dc:format/text()"
        properties:
            type: string
            boost: 2.0
    subject:
        xpath: "//dc:subject"
        properties:
            type: string
            boost: 2.0
    subjScheme:
        xpath: "//dc:subject/@scheme"
        properties:
            type: string
            index_name: subjectScheme
    abstract:
        xpath: "//dct:abstract"
        properties:
            type: string
            boost: 4.0
    rel:
        xpath: "//dc:relation"
        properties:
            type: string
            boost: 4.0
    rights:
        xpath: "//dc:rights"
        properties:
            type: string
    # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html
    date:
        xpath: "//dc:date"
        properties:
            type: date
            format: "YYYY-MM-DD'Z'"
            ignore_malformed: true
    modified:
        xpath: "//dct:modified"
        properties:
            type: date
            format: "YYYY-MM-DD'Z'"
            ignore_malformed: true
    youngs_created_on:
        xpath: "current-dateTime()"
        properties:
            type: date
    youngs_used_mapping:
        xpath: "string('CSW Record Mapping version 1')"
        properties:
            type: string
    # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-geo-shape-type.html#_envelope
    # coordinate order depends on CRS hard to handle here, support only WGS84 which is "northing first", so "lat,lon", which has  http://spatialreference.org/ref/epsg/wgs-84/
    # FIXME this does not support bounding boxes crossing the date line
    location:
        xpath: "//ows:BoundingBox"
        #[contains(@ows:crs,'4326')]"
        # min works on sequences, use min((1, 2)) > http://stackoverflow.com/questions/21901313/why-cant-i-use-min-function-in-my-xslt-on-a-number
        # normalize-space does not work on numbers; the outer 'number(min(..))' call removes trailing zeros after comparison [e.g. min((1.23, 1.1)) = 1.10], to be consistent between the latitute and longitude
        coordinates:
            points:
                -   lon: "number(substring-before(ows:UpperCorner, ' '))"
                    lat: "min( ( number(substring-after(ows:UpperCorner, ' ') ),
                    number(substring-after(ows:LowerCorner, ' ')) ) )"
                -   lon: "number(substring-before(ows:LowerCorner, ' '))"
                    lat: "max( ( number(substring-after(ows:UpperCorner, ' ') ),
                    number(substring-after(ows:LowerCorner, ' ')) ) )"
        coordinates_type: envelope
        properties:
            index_name: location
            type: geo_shape
            tree: quadtree
            precision: 1m
    raw_xml:
        xpath: "/"
        raw_xml: TRUE
        properties:
            type: string
            index: no
            index_name: xmldoc
        output_properties:
            - name: indent
              value: "yes"
    raw_bbox:
        xpath: "//ows:BoundingBox"
        raw_xml: TRUE
        properties:
            type: string
            index: no
            index_name: bbox_xmldoc
    replacer:
        xpath: "//ows:BoundingBox/*/text()"
        replacements:
            - replace: "."
              with: "_"
        




© 2015 - 2025 Weber Informatics LLC | Privacy Policy