Skip to content

Commit

Permalink
Standards / ISO / Formatters / DCAT / Distribution / Map taking into …
Browse files Browse the repository at this point in the history
…account protocol (and not only function).
  • Loading branch information
fxprunayre committed Apr 29, 2024
1 parent 10f63bc commit 1d42c08
Show file tree
Hide file tree
Showing 8 changed files with 2,134 additions and 1,965 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/2.0"
xmlns:mdb="http://standards.iso.org/iso/19115/-3/mdb/2.0"
xmlns:mrl="http://standards.iso.org/iso/19115/-3/mrl/2.0"
xmlns:mcc="http://standards.iso.org/iso/19115/-3/mcc/1.0"
xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0"
Expand Down Expand Up @@ -96,6 +97,17 @@
</xsl:template>



<xsl:template mode="iso19115-3-to-dcat"
match="mdb:identificationInfo/*/mri:graphicOverview[*/mcc:fileName/*/text() != '']">
<foaf:page>
<foaf:Document rdf:about="{*/mcc:fileName/*/text()}">
<xsl:apply-templates mode="iso19115-3-to-dcat"
select="*/mcc:fileDescription[normalize-space(.) != '']"/>
</foaf:Document>
</foaf:page>
</xsl:template>

<!--
RDF Property: dcat:distribution
Definition: An available distribution of the dataset.
Expand Down Expand Up @@ -128,7 +140,9 @@
<xsl:variable name="pointsToService" select="false()"/>

<xsl:choose>
<xsl:when test="$function = ('information', 'search', 'completeMetadata', 'browseGraphic', 'upload', 'emailService')">
<xsl:when test="normalize-space($url) = ''"/>
<xsl:when test="$function = ('information', 'search', 'completeMetadata', 'browseGraphic', 'upload', 'emailService')
or matches($protocol, 'WWW:LINK.*')">
<foaf:page>
<foaf:Document rdf:about="{$url}">
<xsl:apply-templates mode="iso19115-3-to-dcat"
Expand Down Expand Up @@ -195,8 +209,12 @@
Domain: dcat:Distribution
Range: rdfs:Resource
Usage note: dcat:downloadURL SHOULD be used for the URL at which this distribution is available directly, typically through a HTTP Get request
This protocol list is GeoNetwork specific. It is not part of the ISO 19115-3 standard.
-->
<!-- TODO <dcat:downloadURL rdf:resource="{$url}"/>-->
<xsl:if test="matches($protocol, '.*DOWNLOAD.*|DB:.*|FILE:.*')">
<dcat:downloadURL rdf:resource="{$url}"/>
</xsl:if>


<!--
Expand Down Expand Up @@ -231,7 +249,8 @@
Range: dcat:DataService
Usage note: dcat:accessService SHOULD be used to link to a description of a dcat:DataService that can provide access to this distribution.
-->
<xsl:if test="$function = ('download', 'offlineAccess', 'order', 'browsing', 'fileAccess')">
<xsl:if test="$function = ('download', 'offlineAccess', 'order', 'browsing', 'fileAccess')
or matches($protocol, 'OGC:WMS|OGC:WFS|OGC:WCS|OGC:WPS|OGC API Features|OGC API Coverages|ESRI:REST')">
<dcat:accessService>
<rdf:Description>
<rdf:type rdf:resource="http://www.w3.org/ns/dcat#DataService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
|mdb:identificationInfo/*/mri:extent/*/gex:geographicElement/gex:EX_GeographicDescription
|mdb:identificationInfo/*/mri:extent/*/gex:temporalElement/*/gex:extent
|mdb:distributionInfo//mrd:onLine
|mdb:identificationInfo/*/mri:graphicOverview
"/>

<!-- DataService -->
Expand All @@ -149,6 +150,7 @@
|mdb:resourceLineage/*/mrl:statement
|mrd:onLine/*/cit:name
|mrd:onLine/*/cit:description
|mri:graphicOverview/*/mcc:fileDescription
">
<xsl:variable name="xpath"
as="xs:string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
<entry key="dcat:keyword">mdb:MD_Metadata/mdb:identificationInfo/srv:SV_ServiceIdentification/mri:descriptiveKeywords/mri:MD_Keywords/mri:keyword</entry>
<entry key="dct:description">mdb:MD_Metadata/mdb:identificationInfo/mri:MD_DataIdentification/mri:abstract</entry>
<entry key="dct:description">mdb:MD_Metadata/mdb:identificationInfo/srv:SV_ServiceIdentification/mri:abstract</entry>
<entry key="dct:description">mdb:MD_Metadata/mdb:identificationInfo/mri:MD_DataIdentification/mri:graphicOverview/mcc:MD_BrowseGraphic/mcc:fileDescription</entry>
<entry key="dct:description">mdb:MD_Metadata/mdb:identificationInfo/srv:SV_ServiceIdentification/mri:graphicOverview/mcc:MD_BrowseGraphic/mcc:fileDescription</entry>
<entry key="dct:description">mdb:MD_Metadata/mdb:distributionInfo/mrd:MD_Distribution/mrd:transferOptions/mrd:MD_DigitalTransferOptions/mrd:onLine/cit:CI_OnlineResource/cit:description</entry>
<entry key="dct:description">mdb:MD_Metadata/mdb:distributionInfo/mrd:MD_Distribution/mrd:distributor/mrd:MD_Distributor/mrd:distributorTransferOptions/mrd:MD_DigitalTransferOptions/mrd:onLine/cit:CI_OnlineResource/cit:description</entry>
<entry key="owl:versionInfo">mdb:MD_Metadata/mdb:metadataStandard/cit:CI_Citation/cit:edition</entry>
Expand Down
Loading

0 comments on commit 1d42c08

Please sign in to comment.