-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathshape.ttl
262 lines (242 loc) · 5.72 KB
/
shape.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
@prefix fno: <https://w3id.org/function/ontology#> .
@prefix fnom: <https://w3id.org/function/vocabulary/mapping#> .
@prefix fnoi: <https://w3id.org/function/vocabulary/implementation#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix fnosh: <https://w3id.org/function/shape#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/terms/> .
fnosh:FunctionShape
a sh:NodeShape ;
sh:targetClass fno:Function ;
sh:property [
sh:path fno:solves ;
sh:node fnosh:ProblemShape
] ;
sh:property [
sh:path fno:implements;
sh:maxCount 1;
sh:node fnosh:AlgorithmShape
] ;
sh:property [
sh:path fno:expects ;
sh:minCount 1;
sh:maxCount 1;
sh:node fnosh:ListShape
] ;
sh:property [
sh:path fno:returns ;
sh:minCount 1;
sh:maxCount 1;
sh:node fnosh:ListShape
] .
fnosh:ParameterShape
a sh:NodeShape ;
sh:targetClass fno:Parameter;
sh:property [
sh:path fno:predicate ;
sh:maxCount 1;
sh:minCount 1
] ;
sh:property [
sh:path fno:required ;
sh:maxCount 1 ;
sh:datatype xsd:boolean;
] ;
sh:property [
sh:path fno:type;
sh:maxCount 1;
sh:minCount 1
] .
fnosh:OutputShape
a sh:NodeShape ;
sh:targetClass fno:Output;
sh:property [
sh:path fno:predicate ;
sh:maxCount 1;
sh:minCount 1
] ;
sh:property [
sh:path fno:required ;
sh:maxCount 1 ;
sh:datatype xsd:boolean;
] ;
sh:property [
sh:path fno:type;
sh:maxCount 1;
sh:minCount 1
] .
fnosh:nameShape
a sh:NodeShape ;
sh:targetObjectsOf fno:name;
sh:datatype xsd:string .
fnosh:descriptionShape
a sh:NodeShape ;
sh:targetObjectsOf dc:description;
sh:datatype xsd:string .
fnosh:ProblemShape
a sh:NodeShape ;
sh:targetClass fno:Problem .
fnosh:AlgorithmShape
a sh:NodeShape ;
sh:targetClass fno:Algorithm.
fnosh:ExecutionShape
a sh:NodeShape ;
sh:targetClass fno:Execution ;
sh:property [
sh:path fno:executes ;
sh:maxCount 1;
sh:node fnosh:FunctionShape
] .
fnosh:MappingShape
a sh:NodeShape ;
sh:targetClass fno:mapping ;
sh:property [
sh:path fno:methodMapping ;
sh:minCount 1;
sh:maxCount 1;
sh:node fnosh:methodMappingShape
] ;
sh:property [
sh:path fno:parameterMapping ;
sh:node fnosh:parameterMappingShape
] ;
sh:property [
sh:path rdfs:seeAlso ;
sh:datatype xsd:string
] ;
.
fnosh:methodMappingShape
a sh:NodeShape ;
sh:targetClass fno:MethodMapping ;
.
fnosh:stringMethodMappingShape
a sh:NodeShape ;
sh:targetClass fnom:StringMethodMapping ;
sh:property [
sh:path fnom:method-name ;
sh:datatype xsd:string ;
] ;
.
fnosh:parameterMappingShape
a sh:NodeShape ;
sh:targetClass fno:ParameterMapping;
sh:property [
sh:path fnom:functionParameter ;
sh:minCount 1;
sh:maxCount 1;
sh:node fnosh:FunctionShape
] ;
sh:property [
sh:path fnom:constantParameterValue;
sh:maxCount 1
] ;
sh:property [
sh:path fnom:repeatableParameter;
sh:maxCount 1
] ;
.
fnosh:positionParameterMappingShape
a sh:NodeShape ;
sh:targetClass fnom:PositionParameterMapping ;
sh:property [
sh:path fnom:implementationParameterPosition ;
sh:minCount 1;
sh:maxCount 1;
sh:datatype xsd:integer ;
] ;
.
fnosh:PropertyParameterMappingShape
a sh:NodeShape ;
sh:targetClass fnom:PropertyParameterMapping ;
sh:property [
sh:path fnom:implementationProperty;
sh:minCount 1;
sh:maxCount 1;
sh:datatype xsd:string
] ;
.
fnosh:JavaScriptFunctionShape
a sh:NodeShape ;
sh:targetClass fnoi:JavaScriptFunction ;
sh:property [
sh:path doap:download-page ;
sh:datatype xsd:string ;
sh:minCount 1;
sh:maxCount 1
] ;
sh:property [
sh:path doap:name ;
sh:datatype xsd:string ;
sh:minCount 1;
sh:maxCount 1
] ;
.
fnosh:NpmPackageShape
a sh:NodeShape ;
sh:targetClass fnoi:NpmPackage;
sh:property [
sh:path doap:name ;
sh:datatype xsd:string ;
sh:minCount 1;
sh:maxCount 1
] ;
.
fnosh:JavaClassShape
a sh:NodeShape ;
sh:targetClass fnoi:JavaClass;
sh:property [
sh:path fnoi:class-name ;
sh:datatype xsd:string ;
sh:minCount 1;
sh:maxCount 1
] ;
sh:property [
sh:path doap:download-page ;
sh:datatype xsd:string ;
sh:minCount 1;
sh:maxCount 1
] ;
.
fnosh:ListShape
a sh:NodeShape ;
rdfs:label "List shape"@en ;
rdfs:comment "A shape describing well-formed RDF lists. Currently does not check for non-recursion. This could be expressed using SHACL-SPARQL."@en ;
rdfs:seeAlso <https://www.w3.org/TR/shacl/#syntax-rule-SHACL-list> ;
sh:property [
sh:path [ sh:zeroOrMorePath rdf:rest ] ;
rdfs:comment "Each list member (including this node) must be have the shape fnosh:ListNodeShape."@en ;
sh:hasValue rdf:nil ;
sh:node fnosh:ListNodeShape ;
] .
fnosh:ListNodeShape
a sh:NodeShape ;
rdfs:label "List node shape"@en ;
rdfs:comment "Defines constraints on what it means for a node to be a node within a well-formed RDF list. Note that this does not check whether the rdf:rest items are also well-formed lists as this would lead to unsupported recursion."@en ;
sh:or ( [
sh:hasValue rdf:nil ;
sh:property [
sh:path rdf:first ;
sh:maxCount 0 ;
] ;
sh:property [
sh:path rdf:rest ;
sh:maxCount 0 ;
] ;
]
[
sh:not [ sh:hasValue rdf:nil ] ;
sh:property [
sh:path rdf:first ;
sh:maxCount 1 ;
sh:minCount 1 ;
# TODO set what kind of thinky
] ;
sh:property [
sh:path rdf:rest ;
sh:maxCount 1 ;
sh:minCount 1 ;
] ;
] ) .