Skip to content

Commit 704557a

Browse files
Merge pull request #143 from metadata101/feature/mobility-validation-theme-check
Mobility dcat:theme validation
2 parents dfa50f0 + b1418bd commit 704557a

11 files changed

+30
-28
lines changed

src/main/plugin/dcat-ap/layout/config-editor.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,14 @@
772772
</template>
773773
</action>
774774

775+
<field xpath="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dcat:theme"
776+
or="theme"
777+
in="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset"/>
778+
779+
<field xpath="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dcat:keyword"
780+
or="keyword"
781+
in="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset"/>
782+
775783
<section xpath="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dct:publisher"/>
776784
<action type="add" or="publisher" in="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset"
777785
if="count(rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dct:publisher) = 0">
@@ -795,10 +803,6 @@
795803
</template>
796804
</action>
797805

798-
<field xpath="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dcat:keyword"
799-
or="keyword"
800-
in="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset"/>
801-
802806
<field xpath="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dct:identifier"
803807
or="identifier"
804808
in="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset"/>
@@ -818,6 +822,7 @@
818822
</snippet>
819823
</template>
820824
</action>-->
825+
821826
</section>
822827

823828
<section name="vl-section-metadatadcat"
@@ -861,10 +866,6 @@
861866
</template>
862867
</action>
863868

864-
<field xpath="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dcat:theme"
865-
or="theme"
866-
in="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset"/>
867-
868869
<field xpath="/rdf:RDF/dcat:Catalog/dcat:dataset/dcat:Dataset/dcat:theme"
869870
if="$p2 = ('DCAT-AP-VL', 'metadata-dcat')"
870871
name="dcat:theme"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobiliteit - Aanbevolen</schematron.title>
4+
<recommended.dcat_theme_tran.title>DCAT thema</recommended.dcat_theme_tran.title>
5+
<recommended.dcat_theme_tran.report>Het Transport thema werd gebruikt</recommended.dcat_theme_tran.report>
6+
<recommended.dcat_theme_tran.assert>In de meeste gevallen wordt aangenomen dat de relevante waarde voor het thema van dataportalen in het domein Mobiliteit "Transport" is.</recommended.dcat_theme_tran.assert>
47
</strings>
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobility - Mandatory</schematron.title>
4-
<required.dcat_theme_tran.title>DCAT theme</required.dcat_theme_tran.title>
5-
<required.dcat_theme_tran.report>DCAT theme is set to Transport</required.dcat_theme_tran.report>
6-
<required.dcat_theme_tran.assert>In most cases, it is assumed that the relevant value for mobility data portals theme is Transport. Check the DCAT theme.</required.dcat_theme_tran.assert>
74
</strings>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobility - Recommended</schematron.title>
4+
<recommended.dcat_theme_tran.title>DCAT theme</recommended.dcat_theme_tran.title>
5+
<recommended.dcat_theme_tran.report>The Transport theme was used</recommended.dcat_theme_tran.report>
6+
<recommended.dcat_theme_tran.assert>In most cases, it is assumed that the relevant value for mobility data portals theme is Transport. Check the DCAT theme.</recommended.dcat_theme_tran.assert>
47
</strings>
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobility - Mandatory</schematron.title>
4-
<required.dcat_theme_tran.title>DCAT theme</required.dcat_theme_tran.title>
5-
<required.dcat_theme_tran.report>DCAT theme is set to Transport</required.dcat_theme_tran.report>
6-
<required.dcat_theme_tran.assert>In most cases, it is assumed that the relevant value for mobility data portals theme is Transport. Check the DCAT theme.</required.dcat_theme_tran.assert>
74
</strings>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobility - Recommandé</schematron.title>
4+
<recommended.dcat_theme_tran.title>DCAT thème</recommended.dcat_theme_tran.title>
5+
<recommended.dcat_theme_tran.report>Le thème Transport a été utilisé</recommended.dcat_theme_tran.report>
6+
<recommended.dcat_theme_tran.assert>Dans la plupart des cas, on considère que la valeur pertinente pour le sujet des portails de données dans le domaine de la mobilité est «Transport».</recommended.dcat_theme_tran.assert>
47
</strings>
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobility - Mandatory</schematron.title>
4-
<required.dcat_theme_tran.title>DCAT theme</required.dcat_theme_tran.title>
5-
<required.dcat_theme_tran.report>DCAT theme is set to Transport</required.dcat_theme_tran.report>
6-
<required.dcat_theme_tran.assert>In most cases, it is assumed that the relevant value for mobility data portals theme is Transport. Check the DCAT theme.</required.dcat_theme_tran.assert>
74
</strings>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobility - Empfohlen</schematron.title>
4+
<recommended.dcat_theme_tran.title>DCAT Thema</recommended.dcat_theme_tran.title>
5+
<recommended.dcat_theme_tran.report>Das Thema Transport wurde verwendet</recommended.dcat_theme_tran.report>
6+
<recommended.dcat_theme_tran.assert>In den meisten Fällen wird davon ausgegangen, dass der relevante Wert für das Thema Datenportale im Mobilitätsbereich „Transport“ lautet.</recommended.dcat_theme_tran.assert>
47
</strings>
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<strings>
33
<schematron.title>Mobility - Mandatory</schematron.title>
4-
<required.dcat_theme_tran.title>DCAT theme</required.dcat_theme_tran.title>
5-
<required.dcat_theme_tran.report>DCAT theme is set to Transport</required.dcat_theme_tran.report>
6-
<required.dcat_theme_tran.assert>In most cases, it is assumed that the relevant value for mobility data portals theme is Transport. Check the DCAT theme.</required.dcat_theme_tran.assert>
74
</strings>

src/main/plugin/dcat-ap/schematron/schematron-rules-dcat-ap-mobility-rec.sch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,13 @@
2424
<sch:ns prefix="rdfs" uri="http://www.w3.org/2000/01/rdf-schema#"/>
2525

2626
<sch:title xmlns="http://www.w3.org/2001/XMLSchema">{$loc/strings/schematron.title}</sch:title>
27+
28+
<sch:pattern id="recommended_theme">
29+
<sch:title>$loc/strings/recommended.dcat_theme_tran.title</sch:title>
30+
<sch:rule context="//dcat:Dataset|//dcat:DataService">
31+
<sch:let name="tranDcatTheme" value="dcat:theme[skos:Concept/@rdf:about='http://vocab.belgif.be/auth/datatheme/TRAN' or skos:Concept/@rdf:about='http://publications.europa.eu/resource/authority/data-theme/TRAN']"/>
32+
<sch:assert test="count($tranDcatTheme) = 1">$loc/strings/recommended.dcat_theme_tran.assert</sch:assert>
33+
<sch:report test="count($tranDcatTheme) = 1">$loc/strings/recommended.dcat_theme_tran.report</sch:report>
34+
</sch:rule>
35+
</sch:pattern>
2736
</sch:schema>

0 commit comments

Comments
 (0)