Skip to content

Commit

Permalink
Formatter / DCAT / Identifier(s)
Browse files Browse the repository at this point in the history
In DCAT and DCAT-AP, `dct:identifier` is 0..n.
Mobility DCAT restrict it to 0..1.

In DCAT-AP and extensions, only convert the first identifier as
`dct:identifier`; others as `adms:identifier`.
  • Loading branch information
fxprunayre committed Oct 1, 2024
1 parent 0fa0dd3 commit bee5bf4
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
-->
<xsl:template mode="iso19115-3-to-dcat"
match="mdb:metadataIdentifier
|mdb:identificationInfo/*/mri:citation/*/cit:identifier
|cit:identifier">
<xsl:variable name="code"
select="*/mcc:code/*/text()"/>
Expand All @@ -221,6 +222,7 @@
(if (ends-with($codeSpace, '/')) then '' else '/'),
$code)
else $code"/>

<xsl:variable name="codeType"
select="if (matches($codeWithPrefix, '^https?://|urn:'))
then 'anyURI' else 'string'"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,22 @@
<xsl:call-template name="iso19115-3-to-dcat-resource"/>

<xsl:apply-templates mode="iso19115-3-to-eu-dcat-ap"
select="mdb:identificationInfo/*/mri:citation/*/cit:identifier
|mdb:resourceLineage/*/mrl:source"/>
select="mdb:resourceLineage/*/mrl:source"/>

<xsl:call-template name="rdf-eu-dcat-ap-theme"/>
</xsl:template>


<!--
[o] other identifier Identifier 0..* A secondary identifier of the Dataset, such as MAST/ADS17, DataCite18, DOI19, EZID20 or W3ID21.
Only the first resource identifier is mapped to dct:identifier (even if more are allowed in DCAT or DCAT-AP)
because MobilityDCAT restrict it to 0..1. The other identifiers are mapped to adms:identifier.
https://www.w3.org/TR/vocab-adms/#identifier
-->
<xsl:template mode="iso19115-3-to-eu-dcat-ap"
match="cit:identifier">
<xsl:template mode="iso19115-3-to-dcat"
match="mdb:identificationInfo/*/mri:citation/*/cit:identifier[position() > 1]"
priority="20">
<xsl:variable name="code"
select="*/mcc:code/*/text()"/>
<xsl:variable name="codeSpace"
Expand All @@ -211,7 +215,6 @@
</xsl:template>



<!--
applicable legislation Legal Resource 0..* The legislation that mandates the creation or management of the Dataset.
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
<dcat:version>1.0</dcat:version>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://geodata.wallonie.be/id/7fe2f305-1302-4297-b67e-792f55acd834</dct:identifier>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BE.SPW.INFRASIG.CARTON/DGATLPE__PDS</dct:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dct:description xml:lang="fre">Le plan de secteur est un outil réglementaire d'aménagement du territoire et d'urbanisme
régional wallon constitué de plusieurs couches de données spatiales.

Expand Down Expand Up @@ -424,20 +430,6 @@
- une nouvelle zone non destinée à l'urbanisation : zone d'extraction (ZE).</dct:description>
</dct:ProvenanceStatement>
</dct:provenance>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>7fe2f305-1302-4297-b67e-792f55acd834</skos:notation>
<adms:schemaAgency>http://geodata.wallonie.be/id/</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dcat:theme>
<skos:Concept rdf:about="http://publications.europa.eu/resource/authority/data-theme/AGRI">
<skos:prefLabel xml:lang="fr">Agriculture, pêche, sylviculture et alimentation</skos:prefLabel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
<dcat:version>1.0</dcat:version>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://geodata.wallonie.be/id/7fe2f305-1302-4297-b67e-792f55acd834</dct:identifier>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BE.SPW.INFRASIG.CARTON/DGATLPE__PDS</dct:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dct:description xml:lang="fre">Le plan de secteur est un outil réglementaire d'aménagement du territoire et d'urbanisme
régional wallon constitué de plusieurs couches de données spatiales.

Expand Down Expand Up @@ -424,20 +430,6 @@
- une nouvelle zone non destinée à l'urbanisation : zone d'extraction (ZE).</dct:description>
</dct:ProvenanceStatement>
</dct:provenance>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>7fe2f305-1302-4297-b67e-792f55acd834</skos:notation>
<adms:schemaAgency>http://geodata.wallonie.be/id/</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dcat:theme>
<skos:Concept rdf:about="http://publications.europa.eu/resource/authority/data-theme/AGRI">
<skos:prefLabel xml:lang="fr">Agriculture, pêche, sylviculture et alimentation</skos:prefLabel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
<dcat:version>1.0</dcat:version>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://geodata.wallonie.be/id/7fe2f305-1302-4297-b67e-792f55acd834</dct:identifier>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BE.SPW.INFRASIG.CARTON/DGATLPE__PDS</dct:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dct:description xml:lang="fre">Le plan de secteur est un outil réglementaire d'aménagement du territoire et d'urbanisme
régional wallon constitué de plusieurs couches de données spatiales.

Expand Down Expand Up @@ -433,20 +439,6 @@
- une nouvelle zone non destinée à l'urbanisation : zone d'extraction (ZE).</dct:description>
</dct:ProvenanceStatement>
</dct:provenance>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>7fe2f305-1302-4297-b67e-792f55acd834</skos:notation>
<adms:schemaAgency>http://geodata.wallonie.be/id/</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dcat:theme>
<skos:Concept rdf:about="http://publications.europa.eu/resource/authority/data-theme/AGRI">
<skos:prefLabel xml:lang="fr">Agriculture, pêche, sylviculture et alimentation</skos:prefLabel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
<dcat:version>1.0</dcat:version>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://geodata.wallonie.be/id/7fe2f305-1302-4297-b67e-792f55acd834</dct:identifier>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BE.SPW.INFRASIG.CARTON/DGATLPE__PDS</dct:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dct:description xml:lang="fre">Le plan de secteur est un outil réglementaire d'aménagement du territoire et d'urbanisme
régional wallon constitué de plusieurs couches de données spatiales.

Expand Down Expand Up @@ -425,20 +431,6 @@
- une nouvelle zone non destinée à l'urbanisation : zone d'extraction (ZE).</dct:description>
</dct:ProvenanceStatement>
</dct:provenance>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>7fe2f305-1302-4297-b67e-792f55acd834</skos:notation>
<adms:schemaAgency>http://geodata.wallonie.be/id/</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dcat:theme>
<skos:Concept rdf:about="http://publications.europa.eu/resource/authority/data-theme/AGRI">
<skos:prefLabel xml:lang="fr">Agriculture, pêche, sylviculture et alimentation</skos:prefLabel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2023-02-21</dct:issued>
<dcat:version>1.0</dcat:version>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://geodata.wallonie.be/id/7fe2f305-1302-4297-b67e-792f55acd834</dct:identifier>
<dct:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BE.SPW.INFRASIG.CARTON/DGATLPE__PDS</dct:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dct:description xml:lang="fre">Le plan de secteur est un outil réglementaire d'aménagement du territoire et d'urbanisme
régional wallon constitué de plusieurs couches de données spatiales.

Expand Down Expand Up @@ -425,20 +431,6 @@
- une nouvelle zone non destinée à l'urbanisation : zone d'extraction (ZE).</dct:description>
</dct:ProvenanceStatement>
</dct:provenance>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>7fe2f305-1302-4297-b67e-792f55acd834</skos:notation>
<adms:schemaAgency>http://geodata.wallonie.be/id/</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<adms:identifier>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/adms#Identifier"/>
<skos:notation>DGATLPE__PDS</skos:notation>
<adms:schemaAgency>BE.SPW.INFRASIG.CARTON</adms:schemaAgency>
</rdf:Description>
</adms:identifier>
<dcat:theme>
<skos:Concept rdf:about="http://publications.europa.eu/resource/authority/data-theme/AGRI">
<skos:prefLabel xml:lang="fr">Agriculture, pêche, sylviculture et alimentation</skos:prefLabel>
Expand Down

0 comments on commit bee5bf4

Please sign in to comment.