Skip to content

Commit

Permalink
Merge remote-tracking branch 'mw/dcat' into metawal-4.4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre committed Jul 18, 2024
2 parents 02258b0 + 34cb78b commit 1d71e44
Show file tree
Hide file tree
Showing 4 changed files with 612 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,23 @@
Sub-property of: dcterms:relation
Domain: dcat:Dataset
Range: dcat:Distribution
TODO https://mobilitydcat-ap.github.io/mobilityDCAT-AP/releases/index.html#mandatory-properties-for-distribution
-->
<xsl:variable name="mobilityThemeThesaurusKey"
select="'https://w3id.org/mobilitydcat-ap/mobility-data-standard/1.0.0'"/>

<xsl:template mode="iso19115-3-to-dcat"
<!--<xsl:template mode="iso19115-3-to-dcat"
name="iso19115-3-to-dcat-distribution"
match="mdb:distributionInfo//mrd:onLine">
<!-- match="mri:descriptiveKeywords[*/mri:thesaurusName/*/cit:title/*/@xlink:href = $mobilityThemeThesaurusKey]">-->

<dcat:distribution>
<dcat:Distribution>

<mobilitydcatap:mobilityDataStandard>
<skos:Concept>
</skos:Concept>
</mobilitydcatap:mobilityDataStandard>

</dcat:Distribution>
</dcat:distribution>

</xsl:template>


</xsl:template>-->
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/2.0"
xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0"
xmlns:lan="http://standards.iso.org/iso/19115/-3/lan/1.0"
xmlns:mrs="http://standards.iso.org/iso/19115/-3/mrs/1.0"
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:xlink="http://www.w3.org/1999/xlink"
Expand All @@ -24,6 +26,17 @@
<xsl:namespace name="mobilitydcatap" select="'https://w3id.org/mobilitydcat-ap'"/>
</xsl:template>

<xsl:template mode="iso19115-3-to-dcat-resource"
name="iso19115-3-to-eu-dcat-ap-mobility-resource"
match="mdb:MD_Metadata"
priority="2">
<xsl:call-template name="iso19115-3-to-dcat-ap-resource"/>

<xsl:apply-templates mode="iso19115-3-to-dcat"
select="mdb:referenceSystemInfo/*/mrs:referenceSystemIdentifier/*"/>
</xsl:template>


<!-- Create Mobility Theme element -->
<xsl:variable name="mobilityThemeThesaurusKey"
select="'https://w3id.org/mobilitydcat-ap/mobility-theme'"/>
Expand Down Expand Up @@ -85,4 +98,22 @@
</xsl:for-each>
</xsl:template>

<!--
This is an optional added by mobilityDCAT-AP, analogue to an addition by [GEODCAT-AP-v2.0.0].
Values from this vocabulary MUST be used as instances of class dct:Standard, being the range of the property dct:conformsTo.
-->
<xsl:template mode="iso19115-3-to-dcat"
match="mdb:referenceSystemInfo/*/mrs:referenceSystemIdentifier/*">
<xsl:variable name="code" select="mcc:code/(gco:CharacterString|gcx:Anchor)/text()"/>
<xsl:variable name="link" select="mcc:code/gcx:Anchor/@xlink:href"/>

<xsl:variable name="uri"
select="($link, $code[matches(., '^https?://')])[1]"/>
<xsl:if test="$uri != ''">
<dct:conformsTo>
<dct:Standard rdf:about="{$uri}" />
</dct:conformsTo>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public static Collection<String[]> data() throws Exception {
data.add(new String[]{"iso19115-3.2018-dcat-dataset.xml", "dcat", "", "iso19115-3.2018", "dataset-core.rdf"});
data.add(new String[]{"iso19115-3.2018-dcat-dataset.xml", "eu-dcat-ap", "", "iso19115-3.2018", "dataset-core.rdf"});
data.add(new String[]{"iso19115-3.2018-dcat-dataset.xml", "eu-geodcat-ap", "", "iso19115-3.2018", "dataset-core.rdf"});
data.add(new String[]{"iso19115-3.2018-dcat-dataset.xml", "eu-dcat-ap-mobility", "", "iso19115-3.2018", "dataset-core.rdf"});
data.add(new String[]{"iso19115-3.2018-dcat-dataset.xml", "eu-dcat-ap-hvd", "", "iso19115-3.2018", "dataset-core.rdf"});
data.add(new String[]{"iso19115-3.2018-dcat-service.xml", "dcat", "", "iso19115-3.2018", "service-core.rdf"});

Expand Down
Loading

0 comments on commit 1d71e44

Please sign in to comment.