David Price

added constraint on wellname to well test

...@@ -85,16 +85,6 @@ arg:kindRef ...@@ -85,16 +85,6 @@ arg:kindRef
85 85
86 <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> 86 <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
87 spin:constraint 87 spin:constraint
88 - [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
89 - arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
90 - arg:type <http://www.reportinghub.no/ep/schema/facility#Platform>
91 - ] ;
92 - spin:constraint
93 - [ rdf:type mpr-proxy-constraints:CheckId ;
94 - arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
95 - arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
96 - ] ;
97 - spin:constraint
98 [ rdf:type sp:Construct ; 88 [ rdf:type sp:Construct ;
99 sp:templates ([ sp:object spin:ConstraintViolation ; 89 sp:templates ([ sp:object spin:ConstraintViolation ;
100 sp:predicate rdf:type ; 90 sp:predicate rdf:type ;
...@@ -105,44 +95,28 @@ arg:kindRef ...@@ -105,44 +95,28 @@ arg:kindRef
105 sp:predicate rdfs:label ; 95 sp:predicate rdfs:label ;
106 sp:subject _:b2 96 sp:subject _:b2
107 ]) ; 97 ]) ;
108 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ; 98 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
109 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 99 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
110 sp:subject spin:_this 100 sp:subject spin:_this
111 ] [ sp:object 101 ] [ sp:object
112 - [ sp:varName "wellBoreName"^^xsd:string 102 + [ sp:varName "fieldName"^^xsd:string
113 ] ; 103 ] ;
114 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 104 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
115 sp:subject spin:_this 105 sp:subject spin:_this
116 - ] [ rdf:type sp:Bind ;
117 - sp:expression
118 - [ rdf:type rhspin:wellBoreByName ;
119 - arg:wellBoreName
120 - [ sp:varName "wellBoreName"^^xsd:string
121 - ]
122 - ] ;
123 - sp:variable
124 - [ sp:varName "wellBore"^^xsd:string
125 - ]
126 - ] [ rdf:type sp:Filter ;
127 - sp:expression
128 - [ rdf:type sp:bound ;
129 - sp:arg1 [ sp:varName "wellBore"^^xsd:string
130 - ]
131 - ]
132 ] [ rdf:type sp:Filter ; 106 ] [ rdf:type sp:Filter ;
133 sp:expression 107 sp:expression
134 [ rdf:type sp:not ; 108 [ rdf:type sp:not ;
135 - sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfWellBore ; 109 + sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfFieldWithName ;
136 - arg:wellBore 110 + arg:fieldName
137 - [ sp:varName "wellBore"^^xsd:string 111 + [ sp:varName "fieldName"^^xsd:string
138 ] 112 ]
139 ] 113 ]
140 ] 114 ]
141 ] [ rdf:type sp:Bind ; 115 ] [ rdf:type sp:Bind ;
142 sp:expression 116 sp:expression
143 [ rdf:type fn:concat ; 117 [ rdf:type fn:concat ;
144 - sp:arg1 "Your company is not the operator of well bore with name " ; 118 + sp:arg1 "Your company is not the operator of field with name " ;
145 - sp:arg2 [ sp:varName "wellBoreName"^^xsd:string 119 + sp:arg2 [ sp:varName "fieldName"^^xsd:string
146 ] 120 ]
147 ] ; 121 ] ;
148 sp:variable 122 sp:variable
...@@ -161,28 +135,44 @@ arg:kindRef ...@@ -161,28 +135,44 @@ arg:kindRef
161 sp:predicate rdfs:label ; 135 sp:predicate rdfs:label ;
162 sp:subject _:b3 136 sp:subject _:b3
163 ]) ; 137 ]) ;
164 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; 138 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
165 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 139 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
166 sp:subject spin:_this 140 sp:subject spin:_this
167 ] [ sp:object 141 ] [ sp:object
168 - [ sp:varName "fieldName"^^xsd:string 142 + [ sp:varName "wellBoreName"^^xsd:string
169 ] ; 143 ] ;
170 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 144 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
171 sp:subject spin:_this 145 sp:subject spin:_this
146 + ] [ rdf:type sp:Bind ;
147 + sp:expression
148 + [ rdf:type rhspin:wellBoreByName ;
149 + arg:wellBoreName
150 + [ sp:varName "wellBoreName"^^xsd:string
151 + ]
152 + ] ;
153 + sp:variable
154 + [ sp:varName "wellBore"^^xsd:string
155 + ]
156 + ] [ rdf:type sp:Filter ;
157 + sp:expression
158 + [ rdf:type sp:bound ;
159 + sp:arg1 [ sp:varName "wellBore"^^xsd:string
160 + ]
161 + ]
172 ] [ rdf:type sp:Filter ; 162 ] [ rdf:type sp:Filter ;
173 sp:expression 163 sp:expression
174 [ rdf:type sp:not ; 164 [ rdf:type sp:not ;
175 - sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfFieldWithName ; 165 + sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfWellBore ;
176 - arg:fieldName 166 + arg:wellBore
177 - [ sp:varName "fieldName"^^xsd:string 167 + [ sp:varName "wellBore"^^xsd:string
178 ] 168 ]
179 ] 169 ]
180 ] 170 ]
181 ] [ rdf:type sp:Bind ; 171 ] [ rdf:type sp:Bind ;
182 sp:expression 172 sp:expression
183 [ rdf:type fn:concat ; 173 [ rdf:type fn:concat ;
184 - sp:arg1 "Your company is not the operator of field with name " ; 174 + sp:arg1 "Your company is not the operator of well bore with name " ;
185 - sp:arg2 [ sp:varName "fieldName"^^xsd:string 175 + sp:arg2 [ sp:varName "wellBoreName"^^xsd:string
186 ] 176 ]
187 ] ; 177 ] ;
188 sp:variable 178 sp:variable
...@@ -192,31 +182,31 @@ arg:kindRef ...@@ -192,31 +182,31 @@ arg:kindRef
192 ] ; 182 ] ;
193 spin:constraint 183 spin:constraint
194 [ rdf:type mpr-proxy-constraints:CheckId ; 184 [ rdf:type mpr-proxy-constraints:CheckId ;
195 - arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
196 - arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
197 - ] ;
198 - spin:constraint
199 - [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
200 - arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_field> ;
201 - arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
202 - ] ;
203 - spin:constraint
204 - [ rdf:type mpr-proxy-constraints:CheckName ;
205 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ; 185 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
206 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility> 186 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
207 ] ; 187 ] ;
208 spin:constraint 188 spin:constraint
209 [ rdf:type mpr-proxy-constraints:CheckId ; 189 [ rdf:type mpr-proxy-constraints:CheckId ;
210 - arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ; 190 + arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
211 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility> 191 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
212 ] ; 192 ] ;
213 spin:constraint 193 spin:constraint
214 - [ rdf:type mpr-proxy-constraints:CheckName ; 194 + [ rdf:type mpr-proxy-constraints:CheckId ;
195 + arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_field> ;
196 + arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
197 + ] ;
198 + spin:constraint
199 + [ rdf:type mpr-proxy-constraints:CheckId ;
215 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ; 200 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
216 arg:type <http://www.reportinghub.no/ep/schema/well#WellBore> 201 arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
217 ] ; 202 ] ;
218 spin:constraint 203 spin:constraint
219 [ rdf:type mpr-proxy-constraints:CheckName ; 204 [ rdf:type mpr-proxy-constraints:CheckName ;
205 + arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
206 + arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
207 + ] ;
208 + spin:constraint
209 + [ rdf:type mpr-proxy-constraints:CheckName ;
220 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ; 210 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
221 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility> 211 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
222 ] ; 212 ] ;
...@@ -226,17 +216,27 @@ arg:kindRef ...@@ -226,17 +216,27 @@ arg:kindRef
226 arg:type <http://www.reportinghub.no/ep/schema/facility#Field> 216 arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
227 ] ; 217 ] ;
228 spin:constraint 218 spin:constraint
219 + [ rdf:type mpr-proxy-constraints:CheckName ;
220 + arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
221 + arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
222 + ] ;
223 + spin:constraint
229 [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ; 224 [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
230 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ; 225 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
231 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility> 226 arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
232 ] ; 227 ] ;
233 spin:constraint 228 spin:constraint
234 - [ rdf:type mpr-proxy-constraints:CheckId ; 229 + [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
235 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_field> ; 230 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_field> ;
236 arg:type <http://www.reportinghub.no/ep/schema/facility#Field> 231 arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
237 ] ; 232 ] ;
238 spin:constraint 233 spin:constraint
239 [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ; 234 [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
235 + arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
236 + arg:type <http://www.reportinghub.no/ep/schema/facility#Platform>
237 + ] ;
238 + spin:constraint
239 + [ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
240 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ; 240 arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
241 arg:type <http://www.reportinghub.no/ep/schema/well#WellBore> 241 arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
242 ] . 242 ] .
...@@ -294,6 +294,46 @@ arg:kindRef ...@@ -294,6 +294,46 @@ arg:kindRef
294 ]) 294 ])
295 ] . 295 ] .
296 296
297 +<http://www.epim.no/schemas/mprml/1#Obj_wellTest>
298 + spin:constraint
299 + [ rdf:type sp:Construct ;
300 + sp:templates ([ sp:object spin:ConstraintViolation ;
301 + sp:predicate rdf:type ;
302 + sp:subject _:b5
303 + ] [ sp:object
304 + [ sp:varName "message"^^xsd:string
305 + ] ;
306 + sp:predicate rdfs:label ;
307 + sp:subject _:b5
308 + ]) ;
309 + sp:where ([ sp:object
310 + [ sp:varName "wellName"^^xsd:string
311 + ] ;
312 + sp:predicate <http://www.epim.no/schemas/mprml/1#nameWell> ;
313 + sp:subject spin:_this
314 + ] [ rdf:type sp:Filter ;
315 + sp:expression
316 + [ rdf:type sp:not ;
317 + sp:arg1 [ rdf:type rhspin:npdIndividualByName ;
318 + arg:name
319 + [ sp:varName "wellName"^^xsd:string
320 + ] ;
321 + arg:type <http://www.reportinghub.no/ep/schema/well#Well>
322 + ]
323 + ]
324 + ] [ rdf:type sp:Bind ;
325 + sp:expression
326 + [ rdf:type fn:concat ;
327 + sp:arg1 "[RH-19] Invalid well name : " ;
328 + sp:arg2 [ sp:varName "wellName"^^xsd:string
329 + ]
330 + ] ;
331 + sp:variable
332 + [ sp:varName "message"^^xsd:string
333 + ]
334 + ])
335 + ] .
336 +
297 <http://www.reportinghub.no/ep/spin/mpr-proxy-constraints> 337 <http://www.reportinghub.no/ep/spin/mpr-proxy-constraints>
298 rdf:type owl:Ontology ; 338 rdf:type owl:Ontology ;
299 rdfs:comment "Collection of constraints that are executed on the SXML proxy ontology for MPR schema based reports."^^xsd:string ; 339 rdfs:comment "Collection of constraints that are executed on the SXML proxy ontology for MPR schema based reports."^^xsd:string ;
...@@ -308,12 +348,12 @@ mpr-proxy-constraints:CheckId ...@@ -308,12 +348,12 @@ mpr-proxy-constraints:CheckId
308 [ rdf:type sp:Construct ; 348 [ rdf:type sp:Construct ;
309 sp:templates ([ sp:object spin:ConstraintViolation ; 349 sp:templates ([ sp:object spin:ConstraintViolation ;
310 sp:predicate rdf:type ; 350 sp:predicate rdf:type ;
311 - sp:subject _:b5 351 + sp:subject _:b6
312 ] [ sp:object 352 ] [ sp:object
313 [ sp:varName "message"^^xsd:string 353 [ sp:varName "message"^^xsd:string
314 ] ; 354 ] ;
315 sp:predicate rdfs:label ; 355 sp:predicate rdfs:label ;
316 - sp:subject _:b5 356 + sp:subject _:b6
317 ]) ; 357 ]) ;
318 sp:where ([ sp:object 358 sp:where ([ sp:object
319 [ sp:varName "kindRef"^^xsd:string 359 [ sp:varName "kindRef"^^xsd:string
...@@ -375,12 +415,12 @@ mpr-proxy-constraints:CheckIdAndNameMatch ...@@ -375,12 +415,12 @@ mpr-proxy-constraints:CheckIdAndNameMatch
375 [ rdf:type sp:Construct ; 415 [ rdf:type sp:Construct ;
376 sp:templates ([ sp:object spin:ConstraintViolation ; 416 sp:templates ([ sp:object spin:ConstraintViolation ;
377 sp:predicate rdf:type ; 417 sp:predicate rdf:type ;
378 - sp:subject _:b6 418 + sp:subject _:b7
379 ] [ sp:object 419 ] [ sp:object
380 [ sp:varName "message"^^xsd:string 420 [ sp:varName "message"^^xsd:string
381 ] ; 421 ] ;
382 sp:predicate rdfs:label ; 422 sp:predicate rdfs:label ;
383 - sp:subject _:b6 423 + sp:subject _:b7
384 ]) ; 424 ]) ;
385 sp:where ([ sp:object 425 sp:where ([ sp:object
386 [ sp:varName "kindRef"^^xsd:string 426 [ sp:varName "kindRef"^^xsd:string
...@@ -475,12 +515,12 @@ mpr-proxy-constraints:CheckName ...@@ -475,12 +515,12 @@ mpr-proxy-constraints:CheckName
475 [ rdf:type sp:Construct ; 515 [ rdf:type sp:Construct ;
476 sp:templates ([ sp:object spin:ConstraintViolation ; 516 sp:templates ([ sp:object spin:ConstraintViolation ;
477 sp:predicate rdf:type ; 517 sp:predicate rdf:type ;
478 - sp:subject _:b7 518 + sp:subject _:b8
479 ] [ sp:object 519 ] [ sp:object
480 [ sp:varName "message"^^xsd:string 520 [ sp:varName "message"^^xsd:string
481 ] ; 521 ] ;
482 sp:predicate rdfs:label ; 522 sp:predicate rdfs:label ;
483 - sp:subject _:b7 523 + sp:subject _:b8
484 ]) ; 524 ]) ;
485 sp:where ([ sp:object 525 sp:where ([ sp:object
486 [ sp:varName "kindRef"^^xsd:string 526 [ sp:varName "kindRef"^^xsd:string
......