Showing
2 changed files
with
109 additions
and
93 deletions
... | @@ -124,54 +124,52 @@ ddr:Cs_drillReportWellboreInfo | ... | @@ -124,54 +124,52 @@ ddr:Cs_drillReportWellboreInfo |
124 | 124 | ||
125 | ddr:Obj_drillReport | 125 | ddr:Obj_drillReport |
126 | spin:constraint | 126 | spin:constraint |
127 | - [ rdf:type sp:Construct ; | 127 | + [ rdf:type sp:Ask ; |
128 | - sp:templates ([ sp:object spin:ConstraintViolation ; | 128 | + rdfs:comment "DDRs can only be submitted if a user is logged in"^^xsd:string ; |
129 | - sp:predicate rdf:type ; | 129 | + sp:where ([ rdf:type sp:Bind ; |
130 | - sp:subject _:b2 | ||
131 | - ] [ sp:object spin:_this ; | ||
132 | - sp:predicate spin:violationRoot ; | ||
133 | - sp:subject _:b2 | ||
134 | - ] [ sp:object ddr:nameWellbore ; | ||
135 | - sp:predicate spin:violationPath ; | ||
136 | - sp:subject _:b2 | ||
137 | - ] [ sp:object | ||
138 | - [ sp:varName "message"^^xsd:string | ||
139 | - ] ; | ||
140 | - sp:predicate rdfs:label ; | ||
141 | - sp:subject _:b2 | ||
142 | - ]) ; | ||
143 | - sp:where ([ sp:object | ||
144 | - [ sp:varName "wellBoreName"^^xsd:string | ||
145 | - ] ; | ||
146 | - sp:predicate <http://www.reportinghub.no/ep/spin/lib#nameWellbore> ; | ||
147 | - sp:subject spin:_this | ||
148 | - ] [ rdf:type sp:Bind ; | ||
149 | sp:expression | 130 | sp:expression |
150 | - [ rdf:type rhspin:wellBoreByName ; | 131 | + [ rdf:type rhspin:companyName |
151 | - arg:wellBoreName | ||
152 | - [ sp:varName "wellBoreName"^^xsd:string | ||
153 | - ] | ||
154 | ] ; | 132 | ] ; |
155 | sp:variable | 133 | sp:variable |
156 | - [ sp:varName "wellBore"^^xsd:string | 134 | + [ sp:varName "companyName"^^xsd:string |
157 | ] | 135 | ] |
158 | ] [ rdf:type sp:Filter ; | 136 | ] [ rdf:type sp:Filter ; |
159 | sp:expression | 137 | sp:expression |
160 | [ rdf:type sp:not ; | 138 | [ rdf:type sp:not ; |
161 | sp:arg1 [ rdf:type sp:bound ; | 139 | sp:arg1 [ rdf:type sp:bound ; |
162 | - sp:arg1 [ sp:varName "wellBore"^^xsd:string | 140 | + sp:arg1 [ sp:varName "companyName"^^xsd:string |
163 | ] | 141 | ] |
164 | ] | 142 | ] |
165 | ] | 143 | ] |
144 | + ]) | ||
145 | + ] ; | ||
146 | + spin:constraint | ||
147 | + [ rdf:type sp:Ask ; | ||
148 | + rdfs:comment "DDRs can only be submitted if the logged-in user is from a registered company"^^xsd:string ; | ||
149 | + sp:where ([ rdf:type sp:Bind ; | ||
150 | + sp:expression | ||
151 | + [ rdf:type rhspin:companyName | ||
152 | + ] ; | ||
153 | + sp:variable | ||
154 | + [ sp:varName "companyName"^^xsd:string | ||
155 | + ] | ||
166 | ] [ rdf:type sp:Bind ; | 156 | ] [ rdf:type sp:Bind ; |
167 | sp:expression | 157 | sp:expression |
168 | - [ rdf:type fn:concat ; | 158 | + [ rdf:type rhspin:companyWithName ; |
169 | - sp:arg1 "Unregistered well bore name " ; | 159 | + arg:name |
170 | - sp:arg2 [ sp:varName "wellBoreName"^^xsd:string | 160 | + [ sp:varName "companyName"^^xsd:string |
171 | ] | 161 | ] |
172 | ] ; | 162 | ] ; |
173 | sp:variable | 163 | sp:variable |
174 | - [ sp:varName "message"^^xsd:string | 164 | + [ sp:varName "company"^^xsd:string |
165 | + ] | ||
166 | + ] [ rdf:type sp:Filter ; | ||
167 | + sp:expression | ||
168 | + [ rdf:type sp:not ; | ||
169 | + sp:arg1 [ rdf:type sp:bound ; | ||
170 | + sp:arg1 [ sp:varName "company"^^xsd:string | ||
171 | + ] | ||
172 | + ] | ||
175 | ] | 173 | ] |
176 | ]) | 174 | ]) |
177 | ] ; | 175 | ] ; |
... | @@ -179,18 +177,18 @@ ddr:Obj_drillReport | ... | @@ -179,18 +177,18 @@ ddr:Obj_drillReport |
179 | [ rdf:type sp:Construct ; | 177 | [ rdf:type sp:Construct ; |
180 | sp:templates ([ sp:object spin:ConstraintViolation ; | 178 | sp:templates ([ sp:object spin:ConstraintViolation ; |
181 | sp:predicate rdf:type ; | 179 | sp:predicate rdf:type ; |
182 | - sp:subject _:b3 | 180 | + sp:subject _:b2 |
183 | ] [ sp:object spin:_this ; | 181 | ] [ sp:object spin:_this ; |
184 | sp:predicate spin:violationRoot ; | 182 | sp:predicate spin:violationRoot ; |
185 | - sp:subject _:b3 | 183 | + sp:subject _:b2 |
186 | ] [ sp:object ddr:nameWellbore ; | 184 | ] [ sp:object ddr:nameWellbore ; |
187 | sp:predicate spin:violationPath ; | 185 | sp:predicate spin:violationPath ; |
188 | - sp:subject _:b3 | 186 | + sp:subject _:b2 |
189 | ] [ sp:object | 187 | ] [ sp:object |
190 | [ sp:varName "message"^^xsd:string | 188 | [ sp:varName "message"^^xsd:string |
191 | ] ; | 189 | ] ; |
192 | sp:predicate rdfs:label ; | 190 | sp:predicate rdfs:label ; |
193 | - sp:subject _:b3 | 191 | + sp:subject _:b2 |
194 | ]) ; | 192 | ]) ; |
195 | sp:where ([ sp:object | 193 | sp:where ([ sp:object |
196 | [ sp:varName "wellBoreName"^^xsd:string | 194 | [ sp:varName "wellBoreName"^^xsd:string |
... | @@ -235,7 +233,7 @@ ddr:Obj_drillReport | ... | @@ -235,7 +233,7 @@ ddr:Obj_drillReport |
235 | sp:arg1 "Well bore number " ; | 233 | sp:arg1 "Well bore number " ; |
236 | sp:arg2 [ sp:varName "wellBoreNumber"^^xsd:string | 234 | sp:arg2 [ sp:varName "wellBoreNumber"^^xsd:string |
237 | ] ; | 235 | ] ; |
238 | - sp:arg3 "mismatches well bore name " ; | 236 | + sp:arg3 " mismatches well bore name " ; |
239 | sp:arg4 [ sp:varName "wellBoreName"^^xsd:string | 237 | sp:arg4 [ sp:varName "wellBoreName"^^xsd:string |
240 | ] | 238 | ] |
241 | ] ; | 239 | ] ; |
... | @@ -245,52 +243,54 @@ ddr:Obj_drillReport | ... | @@ -245,52 +243,54 @@ ddr:Obj_drillReport |
245 | ]) | 243 | ]) |
246 | ] ; | 244 | ] ; |
247 | spin:constraint | 245 | spin:constraint |
248 | - [ rdf:type sp:Ask ; | 246 | + [ rdf:type sp:Construct ; |
249 | - rdfs:comment "DDRs can only be submitted if the logged-in user is from a registered company"^^xsd:string ; | 247 | + sp:templates ([ sp:object spin:ConstraintViolation ; |
250 | - sp:where ([ rdf:type sp:Bind ; | 248 | + sp:predicate rdf:type ; |
251 | - sp:expression | 249 | + sp:subject _:b3 |
252 | - [ rdf:type rhspin:companyName | 250 | + ] [ sp:object spin:_this ; |
251 | + sp:predicate spin:violationRoot ; | ||
252 | + sp:subject _:b3 | ||
253 | + ] [ sp:object ddr:nameWellbore ; | ||
254 | + sp:predicate spin:violationPath ; | ||
255 | + sp:subject _:b3 | ||
256 | + ] [ sp:object | ||
257 | + [ sp:varName "message"^^xsd:string | ||
253 | ] ; | 258 | ] ; |
254 | - sp:variable | 259 | + sp:predicate rdfs:label ; |
255 | - [ sp:varName "companyName"^^xsd:string | 260 | + sp:subject _:b3 |
256 | - ] | 261 | + ]) ; |
262 | + sp:where ([ sp:object | ||
263 | + [ sp:varName "wellBoreName"^^xsd:string | ||
264 | + ] ; | ||
265 | + sp:predicate <http://www.reportinghub.no/ep/spin/lib#nameWellbore> ; | ||
266 | + sp:subject spin:_this | ||
257 | ] [ rdf:type sp:Bind ; | 267 | ] [ rdf:type sp:Bind ; |
258 | sp:expression | 268 | sp:expression |
259 | - [ rdf:type rhspin:companyWithName ; | 269 | + [ rdf:type rhspin:wellBoreByName ; |
260 | - arg:name | 270 | + arg:wellBoreName |
261 | - [ sp:varName "companyName"^^xsd:string | 271 | + [ sp:varName "wellBoreName"^^xsd:string |
262 | ] | 272 | ] |
263 | ] ; | 273 | ] ; |
264 | sp:variable | 274 | sp:variable |
265 | - [ sp:varName "company"^^xsd:string | 275 | + [ sp:varName "wellBore"^^xsd:string |
266 | ] | 276 | ] |
267 | ] [ rdf:type sp:Filter ; | 277 | ] [ rdf:type sp:Filter ; |
268 | sp:expression | 278 | sp:expression |
269 | [ rdf:type sp:not ; | 279 | [ rdf:type sp:not ; |
270 | sp:arg1 [ rdf:type sp:bound ; | 280 | sp:arg1 [ rdf:type sp:bound ; |
271 | - sp:arg1 [ sp:varName "company"^^xsd:string | 281 | + sp:arg1 [ sp:varName "wellBore"^^xsd:string |
272 | ] | 282 | ] |
273 | ] | 283 | ] |
274 | ] | 284 | ] |
275 | - ]) | 285 | + ] [ rdf:type sp:Bind ; |
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 | 286 | sp:expression |
282 | - [ rdf:type rhspin:companyName | 287 | + [ rdf:type fn:concat ; |
288 | + sp:arg1 "Unregistered well bore name " ; | ||
289 | + sp:arg2 [ sp:varName "wellBoreName"^^xsd:string | ||
290 | + ] | ||
283 | ] ; | 291 | ] ; |
284 | sp:variable | 292 | sp:variable |
285 | - [ sp:varName "companyName"^^xsd:string | 293 | + [ sp:varName "message"^^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 | ] | 294 | ] |
295 | ]) | 295 | ]) |
296 | ] . | 296 | ] . | ... | ... |
... | @@ -5,6 +5,7 @@ | ... | @@ -5,6 +5,7 @@ |
5 | @prefix ep-well: <http://www.reportinghub.no/ep/schema/well#> . | 5 | @prefix ep-well: <http://www.reportinghub.no/ep/schema/well#> . |
6 | @prefix npd: <http://www.reportinghub.no/np/schema/npd#> . | 6 | @prefix npd: <http://www.reportinghub.no/np/schema/npd#> . |
7 | @prefix npd-test: <http://www.reportinghub.no/np/data/npd-test#> . | 7 | @prefix npd-test: <http://www.reportinghub.no/np/data/npd-test#> . |
8 | +@prefix npdi: <http://www.reportinghub.no/np/data/npd/> . | ||
8 | @prefix owl: <http://www.w3.org/2002/07/owl#> . | 9 | @prefix owl: <http://www.w3.org/2002/07/owl#> . |
9 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | 10 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
10 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | 11 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . |
... | @@ -15,55 +16,70 @@ | ... | @@ -15,55 +16,70 @@ |
15 | rdfs:comment "These triples will be added to the NPD Fact Pages automatically. They contain additional test companies, well bores etc that allows the developers and admins to upload and download dummy data."^^xsd:string ; | 16 | rdfs:comment "These triples will be added to the NPD Fact Pages automatically. They contain additional test companies, well bores etc that allows the developers and admins to upload and download dummy data."^^xsd:string ; |
16 | owl:imports <http://www.reportinghub.no/np/schema/1.0/npd> . | 17 | owl:imports <http://www.reportinghub.no/np/schema/1.0/npd> . |
17 | 18 | ||
18 | -npd-test:BA_ERH_TEST | 19 | +npd-test:ShareOfBAA_1 |
20 | + rdf:type npd:ShareOfBAA ; | ||
21 | + npd:baaShared npdi:BAA-2222222222 ; | ||
22 | + npd:shareHolder npdi:Company-5555555555 . | ||
23 | + | ||
24 | +npd-test:ShareOfLicence_1 | ||
25 | + rdf:type npd:ShareOfLicence ; | ||
26 | + npd:licenceShared npdi:Licence-3333333333 ; | ||
27 | + npd:shareHolder npdi:Company-5555555555 . | ||
28 | + | ||
29 | +npdi:BAA-2222222222 | ||
19 | rdf:type npd:BusinessArrangementArea ; | 30 | rdf:type npd:BusinessArrangementArea ; |
31 | + npd:baaOperator npdi:Company-5555555555 ; | ||
20 | npd:id "2222222222"^^xsd:string ; | 32 | npd:id "2222222222"^^xsd:string ; |
21 | npd:name "BA_ERH_TEST"^^xsd:string . | 33 | npd:name "BA_ERH_TEST"^^xsd:string . |
22 | 34 | ||
23 | -npd-test:EPIM | 35 | +npdi:Company-5555555555 |
24 | rdf:type npd:OperatingCompany ; | 36 | rdf:type npd:OperatingCompany ; |
25 | npd:companyShortName | 37 | npd:companyShortName |
26 | "EPIM"^^xsd:string ; | 38 | "EPIM"^^xsd:string ; |
27 | npd:id "5555555555"^^xsd:string ; | 39 | npd:id "5555555555"^^xsd:string ; |
28 | npd:name "EPIM"^^xsd:string . | 40 | npd:name "EPIM"^^xsd:string . |
29 | 41 | ||
30 | -npd-test:ERH-TEST-WELL-01 | 42 | +npdi:Field-1111111111 |
43 | + rdf:type ep-fac:Field ; | ||
44 | + npd:fieldOwner npdi:BAA-2222222222 ; | ||
45 | + npd:id "1111111111"^^xsd:string ; | ||
46 | + npd:name "ERH_TEST_FIELD_01"^^xsd:string . | ||
47 | + | ||
48 | +npdi:Field-1222222222 | ||
49 | + rdf:type ep-fac:Field ; | ||
50 | + npd:fieldOwner npdi:Licence-3333333333 ; | ||
51 | + npd:id "1222222222"^^xsd:string ; | ||
52 | + npd:name "ERH_TEST_FIELD_02"^^xsd:string . | ||
53 | + | ||
54 | +npdi:Licence-3333333333 | ||
55 | + rdf:type npd:Licence ; | ||
56 | + npd:id "3333333333"^^xsd:string ; | ||
57 | + npd:licenceOperator npdi:Company-5555555555 ; | ||
58 | + npd:licenceStatus npd:LS_Active ; | ||
59 | + npd:name "PL_ERH_TEST"^^xsd:string . | ||
60 | + | ||
61 | +npdi:Well-ERH-TEST-WELL-01 | ||
31 | rdf:type ep-well:Well ; | 62 | rdf:type ep-well:Well ; |
32 | npd:name "ERH-TEST-WELL-01"^^xsd:string ; | 63 | npd:name "ERH-TEST-WELL-01"^^xsd:string ; |
33 | - npd:wellPartOfField npd-test:ERH_TEST_FIELD_01 . | 64 | + npd:wellPartOfField npdi:Field-1111111111 . |
34 | 65 | ||
35 | -npd-test:ERH-TEST-WELL-02 | 66 | +npdi:Well-ERH-TEST-WELL-02 |
36 | rdf:type ep-well:Well ; | 67 | rdf:type ep-well:Well ; |
37 | npd:name "ERH-TEST-WELL-02"^^xsd:string ; | 68 | npd:name "ERH-TEST-WELL-02"^^xsd:string ; |
38 | - npd:wellPartOfField npd-test:ERH_TEST_FIELD_02 . | 69 | + npd:wellPartOfField npdi:Field-1222222222 . |
39 | 70 | ||
40 | -npd-test:ERH-TEST-WELLBORE-01 | 71 | +npdi:WellBore-4111111111 |
41 | rdf:type ep-well:WellBore ; | 72 | rdf:type ep-well:WellBore ; |
73 | + npd:drilledInProductionLicence | ||
74 | + npdi:Licence-3333333333 ; | ||
42 | npd:id "4111111111"^^xsd:string ; | 75 | npd:id "4111111111"^^xsd:string ; |
43 | npd:name "ERH-TEST-WELLBORE-01"^^xsd:string ; | 76 | npd:name "ERH-TEST-WELLBORE-01"^^xsd:string ; |
44 | - npd:partOfWell npd-test:ERH-TEST-WELL-01 ; | 77 | + npd:partOfWell npdi:Well-ERH-TEST-WELL-01 ; |
45 | npd:wellBoreType "DEVELOPMENT"^^xsd:string . | 78 | npd:wellBoreType "DEVELOPMENT"^^xsd:string . |
46 | 79 | ||
47 | -npd-test:ERH-TEST-WELLBORE-02 | 80 | +npdi:WellBore-4222222222 |
48 | rdf:type ep-well:WellBore ; | 81 | rdf:type ep-well:WellBore ; |
49 | npd:id "4222222222"^^xsd:string ; | 82 | npd:id "4222222222"^^xsd:string ; |
50 | npd:name "ERH-TEST-WELLBORE-02"^^xsd:string ; | 83 | npd:name "ERH-TEST-WELLBORE-02"^^xsd:string ; |
51 | - npd:partOfWell npd-test:ERH-TEST-WELL-02 ; | 84 | + npd:partOfWell npdi:Well-ERH-TEST-WELL-02 ; |
52 | npd:wellBoreType "DEVELOPMENT"^^xsd:string . | 85 | npd:wellBoreType "DEVELOPMENT"^^xsd:string . |
53 | - | ||
54 | -npd-test:ERH_TEST_FIELD_01 | ||
55 | - rdf:type ep-fac:Field ; | ||
56 | - npd:fieldOwner npd-test:BA_ERH_TEST ; | ||
57 | - npd:id "1111111111"^^xsd:string ; | ||
58 | - npd:name "ERH_TEST_FIELD_01"^^xsd:string . | ||
59 | - | ||
60 | -npd-test:ERH_TEST_FIELD_02 | ||
61 | - rdf:type ep-fac:Field ; | ||
62 | - npd:fieldOwner npd-test:PL_ERH_TEST ; | ||
63 | - npd:id "1222222222"^^xsd:string ; | ||
64 | - npd:name "ERH_TEST_FIELD_02"^^xsd:string . | ||
65 | - | ||
66 | -npd-test:PL_ERH_TEST | ||
67 | - rdf:type npd:Licence ; | ||
68 | - npd:id "3333333333"^^xsd:string ; | ||
69 | - npd:name "PL_ERH_TEST"^^xsd:string . | ... | ... |
-
Please register or login to post a comment