mapping.rst 6.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .. _csw_iso_mapping:
  2. CSW ISO Metadata Profile Mapping File
  3. =====================================
  4. General
  5. ~~~~~~~
  6. See :ref:`csw_mapping_file` for basic information on the CSW mapping file. The ISO Metadata mapping can be found in the file ``csw/MD_Metadata.properties`` inside the data directory.
  7. Below is an example of an ISO Metadata Profile Mapping File::
  8. @fileIdentifier.CharacterString=id
  9. identificationInfo.MD_DataIdentification.citation.CI_Citation.title.CharacterString=title
  10. identificationInfo.MD_DataIdentification.citation.CI_Citation.alternateTitle.CharacterString=list(description,alias,strConcat('##',title))
  11. identificationInfo.MD_DataIdentification.descriptiveKeywords.MD_Keywords.keyword.CharacterString=keywords
  12. identificationInfo.MD_DataIdentification.abstract.CharacterString=abstract
  13. $dateStamp.Date= if_then_else ( isNull("metadata.date") , 'Unknown', "metadata.date")
  14. hierarchyLevel.MD_ScopeCode.@codeListValue='http://purl.org/dc/dcmitype/Dataset'
  15. $contact.CI_ResponsibleParty.individualName.CharacterString=
  16. identificationInfo.MD_DataIdentification.resourceConstraints[0].MD_LegalConstraints.accessConstraints.MD_RestrictionCode=
  17. identificationInfo.MD_DataIdentification.resourceConstraints[1].MD_SecurityConstraints.classification.MD_ClassificationCode=
  18. identificationInfo.MD_DataIdentification.citation.CI_Citation.date%.CI_Date.date.Date=lapply("metadata.citation-date", if_then_else(isNull("."), "Expression/NIL", dateFormat('YYYY-MM-dd', ".")))
  19. identificationInfo.MD_DataIdentification.descriptiveKeywords.MD_Keywords.keyword.CharacterString=list(keywords, if_then_else(equalTo(typeOf("."), 'FeatureTypeInfo'), 'vector', 'raster'))
  20. The full path of each field must be specified (separated with dots). XML attributes are specified with the ``@`` symbol, similar to the usual XML X-path notation. To avoid confusion with the identifier-symbol at the beginning of a mapping line, use ``\@`` (for an attribute that is not an identifier) or ``@@`` (for an attribute that is also the identifier) - see the feature catatalog mapping file for an example.
  21. The ``%`` symbol denotes where a multi-valued mapping should be split in to multiple tags. Multiple ``%`` symbols may be used for multi-dimensional mappings - see the feature catatalog mapping file below for an example.
  22. Indexes with square brackets can be used to avoid merging tags that shouldn't be merged, as demonstrated above for ``resourceConstraints``.
  23. To keep the result XSD compliant, the parameters ``dateStamp.Date`` and ``contact.CI_ResponsibleParty.individualName.CharacterString`` must be preceded by a ``$`` sign to make sure that they are always included even when using property selection.
  24. The ``lapply`` function can be used to apply expressions to items of lists, which can be handy with multidimensional fields.
  25. The ``typeOf`` function (exclusive to CSW-ISO module) returns the type of the catalog item that is being processed (``LayerGroupInfo``, ``FeatureTypeInfo``, ``CoverageInfo``,...), which can be handy if you for example need to handle vector layers differently to raster layers.
  26. For more information on the ISO Metadata standard, please see the `OGC Implementation Specification 07-045 <http://www.opengeospatial.org/standards/specifications/catalog>`_.
  27. Feature Catalogs
  28. ~~~~~~~~~~~~~~~~
  29. Within the ISO Metadata Profile, there is also support for ``Feature Catalogues`` that contain information about vector layer type metadata. As specified by the ISO Metadata standard these are exposed in separate records. For this purpose we have a separate mapping file::
  30. @@uuid="metadata.custom.feature-catalog/feature-catalog-uidentifier"
  31. \@id="metadata.custom.feature-catalog/feature-catalog-identifier"
  32. $featureType.FC_FeatureType.typeName.LocalName=concatenate("name", 'Type')
  33. $featureType.FC_FeatureType.isAbstract.Boolean='false'
  34. $featureType.FC_FeatureType.featureCatalogue.@uuidref="metadata.custom.feature-catalog/feature-catalog-identifier"
  35. featureType.FC_FeatureType.definition.CharacterString="metadata.custom.feature-catalog/feature-type/feature-type-definition"
  36. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.memberName.LocalName="metadata.custom.feature-catalog/feature-type/feature-attribute/name"
  37. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.valueType.TypeName.aName.CharacterString="metadata.custom.feature-catalog/feature-type/feature-attribute/type"
  38. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.length.CharacterString="metadata.custom.feature-catalog/feature-type/feature-attribute/length"
  39. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.definition.CharacterString="metadata.custom.feature-catalog/feature-type/feature-attribute/definition"
  40. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.cardinality.Multiplicity.range.MultiplicityRange.lower.Integer="metadata.custom.feature-catalog/feature-type/feature-attribute/min-occurrence"
  41. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.cardinality.Multiplicity.range.MultiplicityRange.upper.UnlimitedInteger="metadata.custom.feature-catalog/feature-type/feature-attribute/max-occurrence"
  42. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.cardinality.Multiplicity.range.MultiplicityRange.upper.UnlimitedInteger.@isInfinite=false
  43. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.listedValue%.FC_ListedValue.label.CharacterString="metadata.custom.feature-catalog/feature-type/feature-attribute/domain/value"
  44. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.listedValue%.FC_ListedValue.definition.CharacterString="metadata.custom.feature-catalog/feature-type/feature-attribute/domain/definition"
  45. featureType.FC_FeatureType.carrierOfCharacteristics%.FC_FeatureAttribute.listedValue%.FC_ListedValue.code.CharacterString="metadata.custom.feature-catalog/feature-type/feature-attribute/domain/code"
  46. Only records that have a non-null identifier in the catalog mapping file will have a feature catalogue record. There is no support in the standard Geoserver GUI for user configuration of this information.
  47. The upcoming metadata community module makes this possible.