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

mappings.gmd-metadata.yml Maven / Gradle / Ivy

The newest version!
---
# http://api.eurogeoss-broker.eu/dab/services/cswiso?service=CSW&version=2.0.2&request=GetRecords&namespace=xmlns%28gmd=http://www.isotc211.org/2005/gmd%29&typeNames=gmd:MD_Metadata&ElementSetName=full&resultType=results&maxRecords=10&outputSchema=http://www.isotc211.org/2005/gmd
name: "GMD Record Mapping"
version: 1
xpathversion: 2.0
applicability_xpath: "boolean(//*[local-name()='MD_Metadata']) and boolean(namespace-uri(//*[local-name()='MD_Metadata']) = 'http://www.isotc211.org/2005/gmd')"
namespaces:
    gmd: http://www.isotc211.org/2005/gmd
    gco: http://www.isotc211.org/2005/gco
    gml: http://www.opengis.net/gml
index:
    create: true
    name: geodab
    type: isorecord
mappings:
    id:
        xpath: "//gmd:fileIdentifier/gco:CharacterString"
        identifier: true
        properties:
            store: yes
            type: string
            boost: 10.0
    language:
        xpath: "//gmd:language/gmd:LanguageCode/@codeListValue"
        properties:
            store: yes
            type: string
    type:
        xpath: "//gmd:hierarchyLevelName/*/text()"
        properties:
            store: yes
            type: string
    parent:
        xpath: "//gmd:parentIdentifier/gco:CharacterString/text()"
        properties:
            store: yes
            type: string
    responsible_individual:
        xpath: "//gmd:contact/gmd:CI_ResponsibleParty/gmd:individualName/gco:CharacterString/text()"
        properties:
            store: yes
            type: string
    responsible_org:
        xpath: "//gmd:contact/gmd:CI_ResponsibleParty/gmd:organisationName/gco:CharacterString/text()"
        properties:
            store: yes
            type: string
    responsible_email:
        xpath: "//gmd:contact/gmd:CI_ResponsibleParty/gmd:contactInfo/gmd:CI_Contact/gmd:address/gmd:CI_Address/gmd:electronicMailAddress/gco:CharacterString/text()"
        properties:
            store: yes
            type: string
    responsible_role:
        xpath: "//gmd:contact/gmd:CI_ResponsibleParty/gmd:role/*/text()"
        properties:
            store: yes
            type: string
    # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html
    date:
        xpath: "//gmd:dateStamp/gco:Date"
        properties:
            store: yes
            type: date
            ignore_malformed: true
    md_standard_name:
        xpath: "//gmd:metadataStandardName/*/text()"
        properties:
            store: yes
            type: string
    md_standard_version:
        xpath: "//gmd:metadataStandardVersion/*/text()"
        properties:
            store: yes
            type: string
    reference_system:
        xpath: "//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString"
        properties:
            store: yes
            type: string
    # citations
    title:
        xpath: "//gmd:identificationInfo/*/gmd:title/*/text()"
        properties:
            store: yes
            type: string
            boost: 5.0
#    publication_date:
#        xpath: "//dc:type"
#        properties:
#            type: date
    abstract:
        xpath: "//gmd:identificationInfo/*/gmd:abstract/*/text()"
        properties:
            store: yes
            type: string
            boost: 4.0
    use_limitations:
        xpath: "//gmd:identificationInfo/*/gmd:resourceConstraints/gmd:MD_LegalConstraints/gmd:useLimitation/*/text()"
        properties:
            store: yes
            type: string
            boost: 4.0
    contact_individual_name:
        xpath: "//gmd:identificationInfo/*/gmd:pointOfContact/*/gmd:individualName/*/text()"
        properties:
            store: yes
            type: string
    contact_org_name:
        xpath: "//gmd:identificationInfo/*/gmd:pointOfContact/*/gmd:organisationName/*/text()"
        properties:
            store: yes
            type: string
    contact_online:
        xpath: "//gmd:identificationInfo/*/gmd:pointOfContact/*/gmd:contactInfo/*/gmd:onlineResource/*/gmd:linkage/*/text()"
        properties:
            store: yes
            type: string
    contact_role:
        xpath: "//gmd:identificationInfo/*/gmd:pointOfContact/*/gmd:role/*/text()"
        properties:
            store: yes
            type: string
    status:
        xpath: "//gmd:identificationInfo/*/gmd:status/*/text()"
        properties:
            store: yes
            type: string
    graphics_file:
        xpath: "//gmd:identificationInfo/*/gmd:graphicOverview/*/gmd:fileName/*/text()"
        properties:
            store: yes
            type: string
    graphics_description:
        xpath: "//gmd:identificationInfo/*/gmd:graphicOverview/*/gmd:fileDescription/*/text()"
        properties:
            store: yes
            type: string
    keywords:
        # only works for first keyword: xpath: "//gmd:identificationInfo/*/gmd:descriptiveKeywords/gmd:MD_Keywords/gmd:keyword/gco:CharacterString/concat(../../gmd:type/*/@codeListValue, ':', ./text())"
        xpath: "//gmd:identificationInfo/*/gmd:descriptiveKeywords/*/gmd:keyword/*/text()"
        properties:
            store: yes
    keywords_thesauri:
        xpath: "//gmd:identificationInfo/*/gmd:descriptiveKeywords/*/gmd:thesaurusName/*/gmd:title/*/text()"
        properties:
            store: yes
    use_constraints:
        xpath: "//gmd:identificationInfo/*/gmd:resourceConstraints/*/gmd:useConstraints/*/text()"
        properties:
            store: yes
    other_constraints:
        xpath: "//gmd:identificationInfo/*/gmd:resourceConstraints/*/gmd:otherConstraints/*/text()"
        properties:
            store: yes
    language:
        xpath: "//gmd:language/*/text()"
        properties:
            store: yes
    topic_category:
        xpath: "//gmd:topicCategory/*/text()"
        properties:
            store: yes
    extent_begin:
        xpath: "(//gmd:extent/*/gmd:temporalElement/*/gmd:extent/*/gml:begin/*/gml:timePosition/text() | //gmd:extent/*/gmd:temporalElement/*/gmd:extent/*/gml:beginPosition/text() )"
        properties:
            store: yes
            type: date
    extent_end:
        xpath: "(//gmd:extent/*/gmd:temporalElement/*/gmd:extent/*/gml:end/*/gml:timePosition/text() | //gmd:extent/*/gmd:temporalElement/*/gmd:extent/*/gml:endPosition/text() )"
        properties:
            store: yes
            type: date
    # https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-geo-shape-type.html#_envelope
    # FIXME this _probably_ does not support bounding boxes crossing the date line
    location:
        xpath: "//gmd:extent/gmd:EX_Extent/gmd:geographicElement"
        coordinates:
            points:
                # just field
                -   lat: "//gmd:EX_GeographicBoundingBox/gmd:northBoundLatitude/gco:Decimal"
                # field text
                    lon: "//gmd:EX_GeographicBoundingBox/gmd:westBoundLongitude/gco:Decimal/text()"
                # field text as number
                -   lat: "number(normalize-space(//gmd:EX_GeographicBoundingBox/gmd:southBoundLatitude/gco:Decimal/text()))"
                # text with normalized space
                    lon: "normalize-space(//gmd:EX_GeographicBoundingBox/gmd:eastBoundLongitude/gco:Decimal/text())"
        coordinates_type: envelope
        properties:
            type: geo_shape
            tree: quadtree
            precision: 1m
    supplemental:
        xpath: "//gmd:supplementalInformation/*/text()"
        properties:
            store: yes
    distribution_format_name:
        xpath: "//gmd:distributionInfo/*/gmd:distributionFormat/*/gmd:name/*/text()"
        properties:
            store: yes
    # more distribution info?
    # data quality (scope, reports)
    # metadata
    lineage_statement:
        xpath: "//gmd:dataQualityInfo/*/gmd:lineage/*/gmd:statement/*/text()"
        properties:
            store: yes
    metadata_maintenance:
        xpath: "//gmd:metadataMaintenance/*/gmd:maintenanceAndUpdateFrequency/*/text()"
        properties:
            store: yes
    metadata_next_update:
        xpath: "//gmd:metadataMaintenance/*/gmd:dateOfNextUpdate/*/text()"
        properties:
            store: yes
            type: date
    youngs_created_on:
        xpath: "current-dateTime()"
        properties:
            store: yes
            type: date
    youngs_used_mapping:
        xpath: "string('GMD Record Mapping version 1')"
        properties:
            type: string
        
        




© 2015 - 2025 Weber Informatics LLC | Privacy Policy