Skip to content

Commit

Permalink
Formatter / DCAT / accrualPeriodicity / Add support for userDefinedMa…
Browse files Browse the repository at this point in the history
…intenanceFrequency which can be mapped to mobility DCAT vocabulary https://mobilitydcat-ap.github.io/controlled-vocabularies/update-frequency/latest/index.html#.
  • Loading branch information
fxprunayre committed Jul 18, 2024
1 parent 34cb78b commit 53aeffc
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@

<xsl:template mode="iso19115-3-to-dcat"
match="mdb:identificationInfo/*/mri:resourceMaintenance/*/mmi:maintenanceAndUpdateFrequency">

<xsl:variable name="dcFrequency"
as="xs:string?"
select="$isoFrequencyToDublinCore[@key = current()/*/@codeListValue]"/>
Expand All @@ -136,6 +137,39 @@
</xsl:template>



<xsl:variable name="isoDurationToMobilityDcatApUpdateFrequency"
as="node()*">
<!-- <entry key="X">https://w3id.org/mobilitydcat-ap/update-frequency/less-than-yearly</entry>-->
<entry key="P0Y0M0DT1H0M0S">https://w3id.org/mobilitydcat-ap/update-frequency/1h</entry>
<entry key="P0Y0M0DT0H1M0S">https://w3id.org/mobilitydcat-ap/update-frequency/1min</entry>
<entry key="P0Y0M0DT0H10M0S">https://w3id.org/mobilitydcat-ap/update-frequency/10min</entry>
<entry key="P0Y0M0DT12H0M0S">https://w3id.org/mobilitydcat-ap/update-frequency/12h</entry>
<entry key="P0Y0M0DT0H15M0S">https://w3id.org/mobilitydcat-ap/update-frequency/15min</entry>
<entry key="P0Y0M0DT2H0M0S">https://w3id.org/mobilitydcat-ap/update-frequency/2h</entry>
<entry key="P0Y0M0DT24H0M0S">https://w3id.org/mobilitydcat-ap/update-frequency/24h</entry>
<entry key="P0Y0M0DT3H0M0S">https://w3id.org/mobilitydcat-ap/update-frequency/3h</entry>
<entry key="P0Y3M0DT0H0M0S">https://w3id.org/mobilitydcat-ap/update-frequency/3-months</entry>
<entry key="P0Y0M0DT0H30M0S">https://w3id.org/mobilitydcat-ap/update-frequency/30min</entry>
<entry key="P0Y0M0DT0H5M0S">https://w3id.org/mobilitydcat-ap/update-frequency/5min</entry>
<entry key="P0Y6M0DT0H0M0S">https://w3id.org/mobilitydcat-ap/update-frequency/6-months</entry>
</xsl:variable>

<xsl:template mode="iso19115-3-to-dcat"
match="mdb:identificationInfo/*/mri:resourceMaintenance/*/mmi:userDefinedMaintenanceFrequency">

<xsl:variable name="dcMobilityFrequency"
as="xs:string?"
select="$isoDurationToMobilityDcatApUpdateFrequency[@key = current()/gco:TM_PeriodDuration]"/>

<xsl:if test="$dcMobilityFrequency">
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="{$dcMobilityFrequency}"/>
</dct:accrualPeriodicity>
</xsl:if>
</xsl:template>


<!--
RDF Property: dcat:temporalResolution
Definition: Minimum time period resolvable in the dataset.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
-->
<xsl:apply-templates mode="iso19115-3-to-dcat"
select="mdb:identificationInfo/*/mri:resourceMaintenance/*/mmi:maintenanceAndUpdateFrequency
|mdb:identificationInfo/*/mri:resourceMaintenance/*/mmi:userDefinedMaintenanceFrequency
|mdb:identificationInfo/*/mri:spatialResolution/*/mri:distance
|mdb:identificationInfo/*/mri:temporalResolution/*
|mdb:identificationInfo/*/mri:extent/*/gex:geographicElement/gex:EX_GeographicBoundingBox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#asNeeded"/>
</dct:accrualPeriodicity>
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="https://w3id.org/mobilitydcat-ap/update-frequency/15min"/>
</dct:accrualPeriodicity>
<foaf:page>
<foaf:Document rdf:about="https://metawal.wallonie.be/geonetwork/srv/api/records/7fe2f305-1302-4297-b67e-792f55acd834/attachments/pds_codt.png">
<dct:description xml:lang="fre">pds_codt_pic</dct:description>
Expand Down Expand Up @@ -514,4 +517,4 @@
</foaf:Document>
</foaf:page>
</rdf:Description>
</rdf:RDF>
</rdf:RDF>
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,9 @@
<mmi:MD_MaintenanceFrequencyCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#MD_MaintenanceFrequencyCode"
codeListValue="asNeeded"/>
</mmi:maintenanceAndUpdateFrequency>
<mmi:userDefinedMaintenanceFrequency>
<gco:TM_PeriodDuration>P0Y0M0DT0H15M0S</gco:TM_PeriodDuration>
</mmi:userDefinedMaintenanceFrequency>
<mmi:maintenanceNote>
<gco:CharacterString>L'intégration des nouveaux dossiers, la correction d'erreurs et la suppression des
dossiers abrogés se font au fur et à mesure de la réception des informations.</gco:CharacterString>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="http://publications.europa.eu/resource/authority/frequency/MONTHLY"/>
</dct:accrualPeriodicity>
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="https://w3id.org/mobilitydcat-ap/update-frequency/15min"/>
</dct:accrualPeriodicity>
<foaf:page>
<foaf:Document
rdf:about="https://metawal.wallonie.be/geonetwork/srv/api/records/7fe2f305-1302-4297-b67e-792f55acd834/attachments/pds_codt.png">
Expand Down Expand Up @@ -664,4 +667,4 @@
</foaf:Document>
</foaf:page>
</rdf:Description>
</rdf:RDF>
</rdf:RDF>
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,9 @@
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="http://publications.europa.eu/resource/authority/frequency/MONTHLY"/>
</dct:accrualPeriodicity>
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="https://w3id.org/mobilitydcat-ap/update-frequency/15min"/>
</dct:accrualPeriodicity>
<foaf:page>
<foaf:Document
rdf:about="https://metawal.wallonie.be/geonetwork/srv/api/records/7fe2f305-1302-4297-b67e-792f55acd834/attachments/pds_codt.png">
Expand Down Expand Up @@ -671,4 +674,4 @@
</foaf:Document>
</foaf:page>
</rdf:Description>
</rdf:RDF>
</rdf:RDF>
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="http://publications.europa.eu/resource/authority/frequency/MONTHLY"/>
</dct:accrualPeriodicity>
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="https://w3id.org/mobilitydcat-ap/update-frequency/15min"/>
</dct:accrualPeriodicity>
<foaf:page>
<foaf:Document rdf:about="https://metawal.wallonie.be/geonetwork/srv/api/records/7fe2f305-1302-4297-b67e-792f55acd834/attachments/pds_codt.png">
<dct:description xml:lang="fre">pds_codt_pic</dct:description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,9 @@
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="http://publications.europa.eu/resource/authority/frequency/MONTHLY"/>
</dct:accrualPeriodicity>
<dct:accrualPeriodicity>
<dct:Frequency rdf:about="https://w3id.org/mobilitydcat-ap/update-frequency/15min"/>
</dct:accrualPeriodicity>
<foaf:page>
<foaf:Document
rdf:about="https://metawal.wallonie.be/geonetwork/srv/api/records/7fe2f305-1302-4297-b67e-792f55acd834/attachments/pds_codt.png">
Expand Down Expand Up @@ -679,4 +682,4 @@
</foaf:Document>
</foaf:page>
</rdf:Description>
</rdf:RDF>
</rdf:RDF>

0 comments on commit 53aeffc

Please sign in to comment.