Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter / DCAT / Service #8526

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
xmlns:msr="http://standards.iso.org/iso/19115/-3/msr/2.0"
xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
xmlns:mdq="http://standards.iso.org/iso/19157/-2/mdq/1.0"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.1"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.0"
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
xmlns:gex="http://standards.iso.org/iso/19115/-3/gex/1.0"
xmlns:gml="http://www.opengis.net/gml/3.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
xmlns:msr="http://standards.iso.org/iso/19115/-3/msr/2.0"
xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
xmlns:mdq="http://standards.iso.org/iso/19157/-2/mdq/1.0"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.1"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.0"
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
xmlns:gex="http://standards.iso.org/iso/19115/-3/gex/1.0"
xmlns:gml="http://www.opengis.net/gml/3.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,36 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/2.0"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.1"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.0"
xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
exclude-result-prefixes="#all">

<xsl:variable name="endpointDescriptionProtocols"
as="xs:string*"
select="('OpenAPI', 'GetCapabilities')"/>
<!--
Filter to define which service operation has to be considered
as an endpoint URL or description depending on linkage and protocol.
-->
<xsl:param name="endpointDescriptionUrlExpression"
as="xs:string"
select="'GetCapabilities|WSDL'"/>
<xsl:param name="endpointDescriptionProtocolsExpression"
as="xs:string"
select="'OpenAPI|Swagger|GetCapabilities|WSDL|Description'"/>

<!--
RDF Property: dcat:endpointURL
Definition: The root location or primary endpoint of the service (a Web-resolvable IRI).
Domain: dcat:DataService
Range: rdfs:Resource
-->
<xsl:template mode="iso19115-3-to-dcat"
match="srv:containsOperations/*/srv:connectPoint/*[not(cit:protocol/*/text() = $endpointDescriptionProtocols)]/cit:linkage">
<dcat:endpointURL rdf:resource="{normalize-space(gco:CharacterString/text())}"/>
match="srv:containsOperations/*/srv:connectPoint/*[not(
matches(cit:protocol/(gco:CharacterString|gcx:Anchor)/text(), $endpointDescriptionProtocolsExpression, 'i')
or matches(cit:linkage/(gco:CharacterString|gcx:Anchor)/text(), $endpointDescriptionUrlExpression, 'i'))]/cit:linkage">

<dcat:endpointURL rdf:resource="{normalize-space((gco:CharacterString|gcx:Anchor)/text())}"/>
</xsl:template>


Expand All @@ -31,11 +43,19 @@
Domain: dcat:DataService
Range: rdfs:Resource
Usage note: The endpoint description gives specific details of the actual endpoint instances, while dcterms:conformsTo is used to indicate the general standard or specification that the endpoints implement.
Usage note: An endpoint description may be expressed in a machine-readable form, such as an OpenAPI (Swagger) description [OpenAPI], an OGC GetCapabilities response [WFS], [ISO-19142], [WMS], [ISO-19128], a SPARQL Service Description [SPARQL11-SERVICE-DESCRIPTION], an [OpenSearch] or [WSDL20] document, a Hydra API description [HYDRA], else in text or some other informal mode if a formal representation is not possible.
Usage note: An endpoint description may be expressed in a machine-readable form, such as an OpenAPI (Swagger) description [OpenAPI],
an OGC GetCapabilities response [WFS], [ISO-19142], [WMS], [ISO-19128],
a SPARQL Service Description [SPARQL11-SERVICE-DESCRIPTION],
an [OpenSearch]
or [WSDL20] document,
a Hydra API description [HYDRA],
else in text or some other informal mode if a formal representation is not possible.
-->
<xsl:template mode="iso19115-3-to-dcat"
match="srv:containsOperations/*/srv:connectPoint/*[cit:protocol/*/text() = $endpointDescriptionProtocols]/cit:linkage">
<dcat:endpointDescription rdf:resource="{normalize-space(gco:CharacterString/text())}"/>
match="srv:containsOperations/*/srv:connectPoint/*[
matches(cit:protocol/(gco:CharacterString|gcx:Anchor)/text(), $endpointDescriptionProtocolsExpression, 'i')
or matches(cit:linkage/(gco:CharacterString|gcx:Anchor)/text(), $endpointDescriptionUrlExpression, 'i')]/cit:linkage">
<dcat:endpointDescription rdf:resource="{normalize-space((gco:CharacterString|gcx:Anchor)/text())}"/>
</xsl:template>

<!--
Expand All @@ -46,7 +66,7 @@
<xsl:template mode="iso19115-3-to-dcat"
match="srv:operatesOn">
<dcat:servesDataset>
<dcat:Dataset rdf:about="{if (@xlink:href) then @xlink:href else @uriref}"/>
<dcat:Dataset rdf:about="{if (@xlink:href) then @xlink:href else @uuidref}"/>
</dcat:servesDataset>
</xsl:template>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
xmlns:mmi="http://standards.iso.org/iso/19115/-3/mmi/1.0"
xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
xmlns:mdq="http://standards.iso.org/iso/19157/-2/mdq/1.0"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.1"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.0"
xmlns:gex="http://standards.iso.org/iso/19115/-3/gex/1.0"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@
</dcat:distribution>
<dcat:endpointURL rdf:resource="https://geoservices.wallonie.be/inspire/atom/PS_Opensearch.xml"/>
<dcat:endpointURL rdf:resource="https://geoservices.wallonie.be/inspire/atom/PS_Service.xml"/>
<dcat:endpointDescription rdf:resource="https://geoservices.wallonie.be/wms/PS_Service"/>
<dcat:endpointDescription rdf:resource="https://geoservices.wallonie.be/wms/PS_Service?ProtocolIsGetCapabilities"/>
<dcat:endpointURL rdf:resource="https://geoservices.wallonie.be/wms/PS_Service"/>
<dcat:servesDataset>
<dcat:Dataset rdf:about="https://metawal.wallonie.be/geonetwork/srv/api/records/c2526c30-ee7e-4c0b-b866-599e9aba3665"/>
</dcat:servesDataset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:gcx="http://standards.iso.org/iso/19115/-3/gcx/1.0"
xmlns:gex="http://standards.iso.org/iso/19115/-3/gex/1.0"
xmlns:lan="http://standards.iso.org/iso/19115/-3/lan/1.0"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.1"
xmlns:srv="http://standards.iso.org/iso/19115/-3/srv/2.0"
xmlns:mas="http://standards.iso.org/iso/19115/-3/mas/1.0"
xmlns:mcc="http://standards.iso.org/iso/19115/-3/mcc/1.0"
xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0"
Expand Down Expand Up @@ -1447,7 +1447,7 @@
<srv:connectPoint>
<cit:CI_OnlineResource>
<cit:linkage xsi:type="lan:PT_FreeText_PropertyType">
<gco:CharacterString>https://geoservices.wallonie.be/wms/PS_Service</gco:CharacterString>
<gco:CharacterString>https://geoservices.wallonie.be/wms/PS_Service?ProtocolIsGetCapabilities</gco:CharacterString>
<lan:PT_FreeText>
<lan:textGroup>
<lan:LocalisedCharacterString locale="#FR">https://geoservices.wallonie.be/wms/PS_Service
Expand All @@ -1462,6 +1462,33 @@
</srv:connectPoint>
</srv:SV_OperationMetadata>
</srv:containsOperations>
<srv:containsOperations>
<srv:SV_OperationMetadata>
<srv:operationName>
<gco:CharacterString>GetCapabilities</gco:CharacterString>
</srv:operationName>
<srv:distributedComputingPlatform>
<srv:DCPList codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#DCPList"
codeListValue="WebServices"/>
</srv:distributedComputingPlatform>
<srv:connectPoint>
<cit:CI_OnlineResource>
<cit:linkage xsi:type="lan:PT_FreeText_PropertyType">
<gco:CharacterString>https://geoservices.wallonie.be/wms/PS_Service</gco:CharacterString>
<lan:PT_FreeText>
<lan:textGroup>
<lan:LocalisedCharacterString locale="#FR">https://geoservices.wallonie.be/wms/PS_Service?protocolIsWms
</lan:LocalisedCharacterString>
</lan:textGroup>
</lan:PT_FreeText>
</cit:linkage>
<cit:protocol>
<gco:CharacterString>OGC:WMS</gco:CharacterString>
</cit:protocol>
</cit:CI_OnlineResource>
</srv:connectPoint>
</srv:SV_OperationMetadata>
</srv:containsOperations>
<srv:operatesOn uuidref="c2526c30-ee7e-4c0b-b866-599e9aba3665"
xlink:href="https://metawal.wallonie.be/geonetwork/srv/api/records/c2526c30-ee7e-4c0b-b866-599e9aba3665"/>
<srv:operatesOn uuidref="ffc45d44-1cc2-4924-bb8c-214096eb9058"
Expand Down
Loading