Showing
1 changed file
with
50 additions
and
20 deletions
... | @@ -176,26 +176,6 @@ ddr:Obj_drillReport | ... | @@ -176,26 +176,6 @@ ddr:Obj_drillReport |
176 | ]) | 176 | ]) |
177 | ] ; | 177 | ] ; |
178 | spin:constraint | 178 | spin:constraint |
179 | - [ rdf:type sp:Ask ; | ||
180 | - rdfs:comment "DDRs can only be submitted if a user is logged in"^^xsd:string ; | ||
181 | - sp:where ([ rdf:type sp:Bind ; | ||
182 | - sp:expression | ||
183 | - [ rdf:type rhspin:companyName | ||
184 | - ] ; | ||
185 | - sp:variable | ||
186 | - [ sp:varName "companyName"^^xsd:string | ||
187 | - ] | ||
188 | - ] [ rdf:type sp:Filter ; | ||
189 | - sp:expression | ||
190 | - [ rdf:type sp:not ; | ||
191 | - sp:arg1 [ rdf:type sp:bound ; | ||
192 | - sp:arg1 [ sp:varName "companyName"^^xsd:string | ||
193 | - ] | ||
194 | - ] | ||
195 | - ] | ||
196 | - ]) | ||
197 | - ] ; | ||
198 | - spin:constraint | ||
199 | [ rdf:type sp:Construct ; | 179 | [ rdf:type sp:Construct ; |
200 | sp:templates ([ sp:object spin:ConstraintViolation ; | 180 | sp:templates ([ sp:object spin:ConstraintViolation ; |
201 | sp:predicate rdf:type ; | 181 | sp:predicate rdf:type ; |
... | @@ -263,4 +243,54 @@ ddr:Obj_drillReport | ... | @@ -263,4 +243,54 @@ ddr:Obj_drillReport |
263 | [ sp:varName "message"^^xsd:string | 243 | [ sp:varName "message"^^xsd:string |
264 | ] | 244 | ] |
265 | ]) | 245 | ]) |
246 | + ] ; | ||
247 | + spin:constraint | ||
248 | + [ rdf:type sp:Ask ; | ||
249 | + rdfs:comment "DDRs can only be submitted if the logged-in user is from a registered company"^^xsd:string ; | ||
250 | + sp:where ([ rdf:type sp:Bind ; | ||
251 | + sp:expression | ||
252 | + [ rdf:type rhspin:companyName | ||
253 | + ] ; | ||
254 | + sp:variable | ||
255 | + [ sp:varName "companyName"^^xsd:string | ||
256 | + ] | ||
257 | + ] [ rdf:type sp:Bind ; | ||
258 | + sp:expression | ||
259 | + [ rdf:type rhspin:companyWithName ; | ||
260 | + arg:name | ||
261 | + [ sp:varName "companyName"^^xsd:string | ||
262 | + ] | ||
263 | + ] ; | ||
264 | + sp:variable | ||
265 | + [ sp:varName "company"^^xsd:string | ||
266 | + ] | ||
267 | + ] [ rdf:type sp:Filter ; | ||
268 | + sp:expression | ||
269 | + [ rdf:type sp:not ; | ||
270 | + sp:arg1 [ rdf:type sp:bound ; | ||
271 | + sp:arg1 [ sp:varName "company"^^xsd:string | ||
272 | + ] | ||
273 | + ] | ||
274 | + ] | ||
275 | + ]) | ||
276 | + ] ; | ||
277 | + spin:constraint | ||
278 | + [ rdf:type sp:Ask ; | ||
279 | + rdfs:comment "DDRs can only be submitted if a user is logged in"^^xsd:string ; | ||
280 | + sp:where ([ rdf:type sp:Bind ; | ||
281 | + sp:expression | ||
282 | + [ rdf:type rhspin:companyName | ||
283 | + ] ; | ||
284 | + sp:variable | ||
285 | + [ sp:varName "companyName"^^xsd:string | ||
286 | + ] | ||
287 | + ] [ rdf:type sp:Filter ; | ||
288 | + sp:expression | ||
289 | + [ rdf:type sp:not ; | ||
290 | + sp:arg1 [ rdf:type sp:bound ; | ||
291 | + sp:arg1 [ sp:varName "companyName"^^xsd:string | ||
292 | + ] | ||
293 | + ] | ||
294 | + ] | ||
295 | + ]) | ||
266 | ] . | 296 | ] . | ... | ... |
-
Please register or login to post a comment