Showing
1 changed file
with
88 additions
and
14 deletions
... | @@ -11,40 +11,114 @@ | ... | @@ -11,40 +11,114 @@ |
11 | # imports: http://www.reportinghub.no/np/schema/1.0/npd | 11 | # imports: http://www.reportinghub.no/np/schema/1.0/npd |
12 | 12 | ||
13 | @prefix : <http://www.reportinghub.no/ep/spin/ddr-constraints#> . | 13 | @prefix : <http://www.reportinghub.no/ep/spin/ddr-constraints#> . |
14 | +@prefix ddr: <http://www.reportinghub.no/ep/schema/ddr#> . | ||
15 | +@prefix fn: <http://www.w3.org/2005/xpath-functions#> . | ||
14 | @prefix owl: <http://www.w3.org/2002/07/owl#> . | 16 | @prefix owl: <http://www.w3.org/2002/07/owl#> . |
15 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | 17 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
16 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | 18 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . |
19 | +@prefix rhspin: <http://www.reportinghub.no/spin/rh#> . | ||
17 | @prefix sp: <http://spinrdf.org/sp#> . | 20 | @prefix sp: <http://spinrdf.org/sp#> . |
18 | @prefix spin: <http://spinrdf.org/spin#> . | 21 | @prefix spin: <http://spinrdf.org/spin#> . |
19 | @prefix spl: <http://spinrdf.org/spl#> . | 22 | @prefix spl: <http://spinrdf.org/spl#> . |
20 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | 23 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
21 | 24 | ||
22 | -<http://www.reportinghub.no/ep/schema/ddr#Obj_drillReport> | 25 | +ddr:Obj_drillReport |
23 | spin:constraint | 26 | spin:constraint |
24 | - [ rdf:type sp:Ask ; | 27 | + [ rdf:type sp:Construct ; |
25 | - rdfs:comment "Unregistered well bore name"^^xsd:string ; | 28 | + sp:templates ([ sp:object spin:ConstraintViolation ; |
26 | - sp:where ([ sp:object _:b1 ; | 29 | + sp:predicate rdf:type ; |
27 | - sp:predicate <http://www.reportinghub.no/ep/schema/ddr#nameWellbore> ; | 30 | + sp:subject _:b1 |
31 | + ] [ sp:object spin:_this ; | ||
32 | + sp:predicate spin:violationRoot ; | ||
33 | + sp:subject _:b1 | ||
34 | + ] [ sp:object ddr:nameWell ; | ||
35 | + sp:predicate spin:violationPath ; | ||
36 | + sp:subject _:b1 | ||
37 | + ] [ sp:object _:b2 ; | ||
38 | + sp:predicate rdfs:label ; | ||
39 | + sp:subject _:b1 | ||
40 | + ]) ; | ||
41 | + sp:where ([ sp:object _:b3 ; | ||
42 | + sp:predicate ddr:nameWell ; | ||
28 | sp:subject spin:_this | 43 | sp:subject spin:_this |
29 | ] [ rdf:type sp:NamedGraph ; | 44 | ] [ rdf:type sp:NamedGraph ; |
30 | sp:elements ([ rdf:type sp:NotExists ; | 45 | sp:elements ([ rdf:type sp:NotExists ; |
31 | - sp:elements ([ sp:object _:b1 ; | 46 | + sp:elements ([ rdf:type sp:Bind ; |
32 | - sp:predicate <http://www.reportinghub.no/npd/schema#name> ; | 47 | + sp:expression |
33 | - sp:subject _:b2 | 48 | + [ rdf:type rhspin:wellByName ; |
34 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; | 49 | + sp:arg1 _:b3 |
50 | + ] ; | ||
51 | + sp:variable _:b4 | ||
52 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ; | ||
35 | sp:predicate rdf:type ; | 53 | sp:predicate rdf:type ; |
36 | - sp:subject _:b2 | 54 | + sp:subject _:b4 |
37 | ]) | 55 | ]) |
38 | ]) ; | 56 | ]) ; |
39 | - sp:graphNameNode <https://www.reportinghub.no/ep/data/npd> | 57 | + sp:graphNameNode <http://www.reportinghub.no/np/data/npd> |
58 | + ] [ rdf:type sp:Bind ; | ||
59 | + sp:expression | ||
60 | + [ rdf:type fn:concat ; | ||
61 | + sp:arg1 "Unregistered well name " ; | ||
62 | + sp:arg2 _:b3 | ||
63 | + ] ; | ||
64 | + sp:variable _:b2 | ||
65 | + ]) | ||
66 | + ] ; | ||
67 | + spin:constraint | ||
68 | + [ rdf:type sp:Construct ; | ||
69 | + sp:templates ([ sp:object spin:ConstraintViolation ; | ||
70 | + sp:predicate rdf:type ; | ||
71 | + sp:subject _:b5 | ||
72 | + ] [ sp:object spin:_this ; | ||
73 | + sp:predicate spin:violationRoot ; | ||
74 | + sp:subject _:b5 | ||
75 | + ] [ sp:object ddr:nameWellbore ; | ||
76 | + sp:predicate spin:violationPath ; | ||
77 | + sp:subject _:b5 | ||
78 | + ] [ sp:object _:b6 ; | ||
79 | + sp:predicate rdfs:label ; | ||
80 | + sp:subject _:b5 | ||
81 | + ]) ; | ||
82 | + sp:where ([ sp:object _:b7 ; | ||
83 | + sp:predicate ddr:nameWellbore ; | ||
84 | + sp:subject spin:_this | ||
85 | + ] [ rdf:type sp:Bind ; | ||
86 | + sp:expression | ||
87 | + [ rdf:type rhspin:wellBoreByName ; | ||
88 | + sp:arg1 _:b7 | ||
89 | + ] ; | ||
90 | + sp:variable _:b8 | ||
91 | + ] [ rdf:type sp:Filter ; | ||
92 | + sp:expression | ||
93 | + [ rdf:type sp:not ; | ||
94 | + sp:arg1 [ rdf:type sp:bound ; | ||
95 | + sp:arg1 _:b8 | ||
96 | + ] | ||
97 | + ] | ||
98 | + ] [ rdf:type sp:Bind ; | ||
99 | + sp:expression | ||
100 | + [ rdf:type fn:concat ; | ||
101 | + sp:arg1 "Unregistered well bore name " ; | ||
102 | + sp:arg2 _:b7 | ||
103 | + ] ; | ||
104 | + sp:variable _:b6 | ||
40 | ]) | 105 | ]) |
41 | ] . | 106 | ] . |
42 | 107 | ||
43 | <http://www.reportinghub.no/ep/spin/ddr-constraints> | 108 | <http://www.reportinghub.no/ep/spin/ddr-constraints> |
44 | rdf:type owl:Ontology ; | 109 | rdf:type owl:Ontology ; |
110 | + rdfs:comment "Constraints that need to be executed immediately after SXML import, i.e. not on the inferred triples."^^xsd:string ; | ||
45 | owl:imports <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/ddr> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://spinrdf.org/spin> ; | 111 | owl:imports <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/ddr> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://spinrdf.org/spin> ; |
46 | - owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | 112 | + owl:versionInfo "0.1.0"^^xsd:string . |
113 | + | ||
114 | +_:b2 sp:varName "message"^^xsd:string . | ||
115 | + | ||
116 | +_:b4 sp:varName "well"^^xsd:string . | ||
117 | + | ||
118 | +_:b3 sp:varName "nameWell"^^xsd:string . | ||
119 | + | ||
120 | +_:b6 sp:varName "message"^^xsd:string . | ||
47 | 121 | ||
48 | -_:b1 sp:varName "nameWellbore"^^xsd:string . | 122 | +_:b8 sp:varName "wellBore"^^xsd:string . |
49 | 123 | ||
50 | -_:b2 sp:varName "wellBore"^^xsd:string . | 124 | +_:b7 sp:varName "nameWellbore"^^xsd:string . | ... | ... |
-
Please register or login to post a comment