This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalidator.shacl.ttl
168 lines (154 loc) · 5.58 KB
/
validator.shacl.ttl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX req: <https://data.surroundaustralia.com/def/olapapi/requirement/>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
#
# Dataset
#
req:d-title
a sh:NodeShape ;
sh:targetClass dcat:Dataset ;
sh:message "Requirement D-title: Each Dataset MUST have one and only one English title which is an English text literal, indicated using the dcterms:title predicate"@en ;
sh:property [
sh:path dcterms:title ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype rdf:langString ;
sh:languageIn ("en") ;
]
.
req:d-desc
a sh:NodeShape ;
sh:targetClass dcat:Dataset ;
sh:message "Requirement D-defn: Each Dataset MUST have one and only one English description which is an English text literal, indicated using the dcterms:description predicate"@en ;
sh:property [
sh:path dcterms:description ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype rdf:langString ;
sh:languageIn ("en") ;
]
.
req:d-id
a sh:NodeShape ;
sh:targetClass dcat:Dataset ;
sh:message "Requirement D-id: Each Dataset MUST have one and only one identifier, an xsd:token, indicated using the dcterms:identifier predicate. Note: this identifier must be unique within the Dataset it is part of. This uniqueness is not testable in SHACL"@en ;
sh:property [
sh:path dcterms:identifier ;
sh:minCount 1 ;
sh:datatype xsd:token ;
]
.
req:d-members
a sh:NodeShape ;
sh:targetClass dcat:Dataset ;
sh:message "Requirement D-members: If a Dataset has a member, indicated by rdfs:member, it must be of type geo:FeatureCollection"@en ;
sh:property [
sh:path rdfs:member ;
sh:class geo:FeatureCollection ;
]
.
req:d-bb
a sh:NodeShape ;
sh:targetClass geo:Dataset ;
sh:message "Requirement D-bb: A Dataset SHOULD indicate a maximum of one Bounding Box geometry with a geo:hasBoundingBox predicate"@en ;
sh:property [
sh:path geo:hasBoundingBox ;
sh:class geo:Geometry ;
sh:maxCount 1;
]
.
#
# FeatureCollection
#
req:fc-title
a sh:NodeShape ;
sh:targetClass geo:FeatureCollection ;
sh:message "Requirement FC-title: Each Feature Collection MUST have one and only one English title which is an English text literal, indicated using the dcterms:title predicate"@en ;
sh:property [
sh:path dcterms:title ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype rdf:langString ;
sh:languageIn ("en") ;
]
.
req:fc-desc
a sh:NodeShape ;
sh:targetClass geo:FeatureCollection ;
sh:message "Requirement FC-defn: Each Feature Collection MUST have one and only one English definition which is an English text literal, indicated using the dcterms:description predicate"@en ;
sh:property [
sh:path dcterms:description ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype rdf:langString ;
sh:languageIn ("en") ;
]
.
req:fc-id
a sh:NodeShape ;
sh:targetClass geo:FeatureCollection ;
sh:message "Requirement FC-id: Each Feature Collection MUST have one and only one identifier, an xsd:token, indicated using the dcterms:identifier predicate. Note: this identifier must be unique within the Dataset it is part of. This uniqueness is not testable in SHACL"@en ;
sh:property [
sh:path dcterms:identifier ;
sh:minCount 1 ;
sh:datatype xsd:token ;
]
.
req:fc-bb
a sh:NodeShape ;
sh:targetClass geo:FeatureCollection ;
sh:message "Requirement FC-bb: A Feature Collection SHOULD indicate a maximum of one Bounding Box geometry with a geo:hasBoundingBox predicate"@en ;
sh:property [
sh:path geo:hasBoundingBox ;
sh:class geo:Geometry ;
sh:maxCount 1;
]
.
req:fc-members
a sh:NodeShape ;
sh:targetClass geo:FeatureCollection ;
sh:message "Requirement FC-members: A Feature Collection must have at least one member and all members must be type geo:Feature"@en ;
sh:property [
sh:path rdfs:member ;
sh:minCount 1 ;
sh:class geo:Feature ;
]
.
#
# Feature
#
req:f-id
a sh:NodeShape ;
sh:targetClass geo:Feature ;
sh:message "Requirement F-id: Each Feature MUST have one and only one identifier, an xsd:token, indicated using the dcterms:identifier predicate. Note: this identifier must be unique within the Dataset it is part of. This uniqueness is not testable in SHACL"@en ;
sh:property [
sh:path dcterms:identifier ;
sh:minCount 1 ;
sh:datatype xsd:token ;
]
.
req:f-partof
a sh:NodeShape ;
sh:targetClass geo:Feature ;
sh:message "Requirement F-part: Each Feature MAY indicate that it is part of at least one geo:FeatureCollection with use of the dcterms:isPartOf predicate. If not provided, this property will be calculated using any indications of FeatureCollection membership of a Feature made with rdfs:member"@en ;
sh:property [
sh:path dcterms:isPartOf ;
sh:class geo:FeatureCollection ;
]
.
# TODO: consider other, specialised, hasGeometry properties, such as hasCentroid
req:f-hasgeometry
a sh:NodeShape ;
sh:targetClass geo:Feature ;
sh:message "Requirement F-geometry: Each Feature MUST indicate that it has at least one geo:Geometry with use of the geo:hasGeometry predicate"@en ;
sh:property [
sh:path geo:hasGeometry ;
sh:minCount 1 ;
sh:class geo:Geometry ;
]
.