isogeo_xml_toolbelt.md_xml_fixer module

class isogeo_xml_toolbelt.md_xml_fixer.MetadataXML19139Fixer[source]

Bases: object

ISO 19139 XML fixer.

add_ds_creation_date()[source]

Add metadata creation date into metadata XML.

Under /MD_Metadata/identificationInfo/MD_DataIdentification/citation/CI_Citation/date <date>

<CI_Date>
<date>
<gco:Date>2010-07-07Z</gco:Date>

</date> <dateType>

<CI_DateTypeCode codeList=”http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_DateTypeCode” codeListValue=”creation”>creation</CI_DateTypeCode>

</dateType>

</CI_Date>

</date>

add_md_character_set()[source]

Add metadata creation date into metadata XML.

Under /MD_Metadata/characterSet AND /MD_Metadata/identificationInfo/MD_DataIdentification/characterSet <characterSet>

<MD_CharacterSetCode codeList=”http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#MD_CharacterSetCode” codeListValue=”utf8”>utf-8</MD_CharacterSetCode>

</characterSet>

add_namespaces()[source]

Add ISO19139 namespaces.

check_folders()[source]

Check prerequisites.

fix_cgus()[source]

Add dataset usage conditions and limitations into metadata XML.

Under /MD_Metadata/identificationInfo/MD_DataIdentification/resourceConstraints

<resourceConstraints>
<MD_Constraints>
<useLimitation>
<gmx:Anchor xl:href=”http://www.etalab.gouv.fr/licence-ouverte-open-licence” xl:title=”Licence ouverte ETALAB 1.0” />

</useLimitation> <useLimitation>

<gco:CharacterString>Conditions sur [geopaysdebrest.fr &gt; Usage des données](https://geo.pays-de-brest.fr/usages/Pages/default.aspx).</gco:CharacterString>

</useLimitation>

</MD_Constraints>

</resourceConstraints> <resourceConstraints>

<MD_LegalConstraints>
<useLimitation>
<gco:CharacterString>Pas de restriction d’accès public selon INSPIRE</gco:CharacterString>

</useLimitation> <useLimitation>

<gco:CharacterString>Conditions sur [geopaysdebrest.fr &gt; Usage des données](https://geo.pays-de-brest.fr/usages/Pages/default.aspx).</gco:CharacterString>

</useLimitation> <accessConstraints>

<MD_RestrictionCode codeList=”http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode” codeListValue=”license”>license</MD_RestrictionCode>

</accessConstraints>

</MD_LegalConstraints>

</resourceConstraints>

fix_srs()[source]

Fix Spatial Reference System.

Under /MD_Metadata/referenceSystemInfo/MD_ReferenceSystem/referenceSystemIdentifier/RS_Identifier <referenceSystemInfo>

<MD_ReferenceSystem>
<referenceSystemIdentifier>
<RS_Identifier>
<code>
<gco:CharacterString>urn:ogc:def:crs:EPSG:2154</gco:CharacterString>

</code>

</RS_Identifier>

</referenceSystemIdentifier>

</MD_ReferenceSystem>

</referenceSystemInfo>

get_md_ci_citation()[source]

Get CI_Citation level items.

get_md_data_identification()[source]

Get Character_set level items.

get_rs_constraints()[source]

Get resourceConstraints level items.

get_rs_identifier()[source]

Get RS_Identifier level items.

prettify(elem)[source]

Return a pretty-printed XML string for the Element.