David Price

Merge branch 'master' into mprg-swp30

...@@ -14,19 +14,16 @@ ...@@ -14,19 +14,16 @@
14 transhelp:derivedFrom 14 transhelp:derivedFrom
15 rdf:type owl:ObjectProperty . 15 rdf:type owl:ObjectProperty .
16 16
17 -transhelp:dummyTrue
18 - rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
19 -
20 transhelp:hasDerivedText 17 transhelp:hasDerivedText
21 rdf:type owl:DatatypeProperty . 18 rdf:type owl:DatatypeProperty .
22 19
23 transhelp:intervalIdentifier 20 transhelp:intervalIdentifier
24 - rdf:type owl:FunctionalProperty , owl:DatatypeProperty . 21 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
25 22
26 transhelp:mapsTo 23 transhelp:mapsTo
27 rdf:type rdf:Property . 24 rdf:type rdf:Property .
28 25
29 transhelp:materialClassMapsToMPREnumeration 26 transhelp:materialClassMapsToMPREnumeration
30 - rdf:type owl:ObjectProperty , owl:FunctionalProperty , owl:InverseFunctionalProperty ; 27 + rdf:type owl:InverseFunctionalProperty , owl:FunctionalProperty , owl:ObjectProperty ;
31 rdfs:label "material class maps to MPR enumeration"^^xsd:string ; 28 rdfs:label "material class maps to MPR enumeration"^^xsd:string ;
32 rdfs:subPropertyOf transhelp:mapsTo . 29 rdfs:subPropertyOf transhelp:mapsTo .
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
8 @prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1#> . 8 @prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1#> .
9 @prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> . 9 @prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
10 @prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> . 10 @prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
11 +@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
11 @prefix owl: <http://www.w3.org/2002/07/owl#> . 12 @prefix owl: <http://www.w3.org/2002/07/owl#> .
12 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 13 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
13 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 14 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
...@@ -19,58 +20,7 @@ ...@@ -19,58 +20,7 @@
19 <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> 20 <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
20 spin:rule 21 spin:rule
21 [ rdf:type sp:Construct ; 22 [ rdf:type sp:Construct ;
22 - rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc. 23 + rdfs:comment """STEP 00013 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
23 -Nothing is done with the namingSystem!"""^^xsd:string ;
24 - sp:templates ([ sp:object spin:_this ;
25 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
26 - sp:subject
27 - [ sp:varName "field"^^xsd:string
28 - ]
29 - ] [ sp:object
30 - [ sp:varName "fieldName"^^xsd:string
31 - ] ;
32 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
33 - sp:subject spin:_this
34 - ]) ;
35 - sp:where ([ rdf:type sp:Union ;
36 - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
37 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
38 - sp:subject spin:_this
39 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ;
40 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
41 - sp:subject spin:_this
42 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ;
43 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
44 - sp:subject spin:_this
45 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ;
46 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
47 - sp:subject spin:_this
48 - ]))
49 - ] [ sp:object
50 - [ sp:varName "fieldName"^^xsd:string
51 - ] ;
52 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
53 - sp:subject spin:_this
54 - ] [ rdf:type sp:NamedGraph ;
55 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
56 - sp:predicate rdf:type ;
57 - sp:subject
58 - [ sp:varName "field"^^xsd:string
59 - ]
60 - ] [ sp:object
61 - [ sp:varName "fieldName"^^xsd:string
62 - ] ;
63 - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
64 - sp:subject
65 - [ sp:varName "field"^^xsd:string
66 - ]
67 - ]) ;
68 - sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
69 - ])
70 - ] ;
71 - spin:rule
72 - [ rdf:type sp:Construct ;
73 - rdfs:comment """STEP 00012 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
74 Nothing is done with the namingSystem!"""^^xsd:string ; 24 Nothing is done with the namingSystem!"""^^xsd:string ;
75 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; 25 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
76 sp:predicate rdf:type ; 26 sp:predicate rdf:type ;
...@@ -126,7 +76,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -126,7 +76,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
126 ] ; 76 ] ;
127 spin:rule 77 spin:rule
128 [ rdf:type sp:Construct ; 78 [ rdf:type sp:Construct ;
129 - rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany 79 + rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
130 Nothing is done with the namingSystem!"""^^xsd:string ; 80 Nothing is done with the namingSystem!"""^^xsd:string ;
131 sp:templates ([ sp:object spin:_this ; 81 sp:templates ([ sp:object spin:_this ;
132 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 82 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
...@@ -134,7 +84,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -134,7 +84,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
134 [ sp:varName "company"^^xsd:string 84 [ sp:varName "company"^^xsd:string
135 ] 85 ]
136 ] [ sp:object 86 ] [ sp:object
137 - [ sp:varName "companyName"^^xsd:string 87 + [ sp:varName "companyLabel"^^xsd:string
138 ] ; 88 ] ;
139 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 89 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
140 sp:subject spin:_this 90 sp:subject spin:_this
...@@ -165,218 +115,258 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -165,218 +115,258 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
165 sp:subject 115 sp:subject
166 [ sp:varName "company"^^xsd:string 116 [ sp:varName "company"^^xsd:string
167 ] 117 ]
118 + ] [ sp:object
119 + [ sp:varName "companyId"^^xsd:string
120 + ] ;
121 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
122 + sp:subject
123 + [ sp:varName "company"^^xsd:string
124 + ]
168 ]) ; 125 ]) ;
169 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 126 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
127 + ] [ rdf:type sp:Bind ;
128 + sp:expression
129 + [ rdf:type fn:concat ;
130 + sp:arg1 "company-" ;
131 + sp:arg2 [ sp:varName "companyId"^^xsd:string
132 + ]
133 + ] ;
134 + sp:variable
135 + [ sp:varName "companyLabel"^^xsd:string
136 + ]
170 ]) 137 ])
171 ] ; 138 ] ;
172 spin:rule 139 spin:rule
173 [ rdf:type sp:Construct ; 140 [ rdf:type sp:Construct ;
174 - rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc. 141 + rdfs:comment """STEP 00005 Record the Facility that has the flows - kind is \"well\"
175 Nothing is done with the namingSystem!"""^^xsd:string ; 142 Nothing is done with the namingSystem!"""^^xsd:string ;
176 sp:templates ([ sp:object spin:_this ; 143 sp:templates ([ sp:object spin:_this ;
177 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 144 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
178 sp:subject 145 sp:subject
179 - [ sp:varName "tuf"^^xsd:string 146 + [ sp:varName "well"^^xsd:string
180 ] 147 ]
181 ] [ sp:object 148 ] [ sp:object
182 - [ sp:varName "tufName"^^xsd:string 149 + [ sp:varName "wellLabel"^^xsd:string
183 ] ; 150 ] ;
184 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 151 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
185 sp:subject spin:_this 152 sp:subject spin:_this
186 ]) ; 153 ]) ;
187 - sp:where ([ rdf:type sp:Union ; 154 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ;
188 - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; 155 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
189 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 156 + sp:subject spin:_this
190 - sp:subject spin:_this
191 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ;
192 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
193 - sp:subject spin:_this
194 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ;
195 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
196 - sp:subject spin:_this
197 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ;
198 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
199 - sp:subject spin:_this
200 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ;
201 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
202 - sp:subject spin:_this
203 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ;
204 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
205 - sp:subject spin:_this
206 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ;
207 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
208 - sp:subject spin:_this
209 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ;
210 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
211 - sp:subject spin:_this
212 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ;
213 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
214 - sp:subject spin:_this
215 - ]))
216 ] [ sp:object 157 ] [ sp:object
217 - [ sp:varName "tufName"^^xsd:string 158 + [ sp:varName "wellName"^^xsd:string
218 ] ; 159 ] ;
219 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 160 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
220 sp:subject spin:_this 161 sp:subject spin:_this
221 ] [ rdf:type sp:NamedGraph ; 162 ] [ rdf:type sp:NamedGraph ;
222 - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ; 163 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
223 sp:predicate rdf:type ; 164 sp:predicate rdf:type ;
224 sp:subject 165 sp:subject
225 - [ sp:varName "tuf"^^xsd:string 166 + [ sp:varName "well"^^xsd:string
226 ] 167 ]
227 ] [ sp:object 168 ] [ sp:object
228 - [ sp:varName "tufName"^^xsd:string 169 + [ sp:varName "wellName"^^xsd:string
229 ] ; 170 ] ;
230 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 171 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
231 sp:subject 172 sp:subject
232 - [ sp:varName "tuf"^^xsd:string 173 + [ sp:varName "well"^^xsd:string
174 + ]
175 + ] [ sp:object
176 + [ sp:varName "wellId"^^xsd:string
177 + ] ;
178 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
179 + sp:subject
180 + [ sp:varName "well"^^xsd:string
233 ] 181 ]
234 ]) ; 182 ]) ;
235 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 183 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
184 + ] [ rdf:type sp:Bind ;
185 + sp:expression
186 + [ rdf:type fn:concat ;
187 + sp:arg1 "well-" ;
188 + sp:arg2 [ sp:varName "wellId"^^xsd:string
189 + ]
190 + ] ;
191 + sp:variable
192 + [ sp:varName "wellLabel"^^xsd:string
193 + ]
236 ]) 194 ])
237 ] ; 195 ] ;
238 spin:rule 196 spin:rule
239 [ rdf:type sp:Construct ; 197 [ rdf:type sp:Construct ;
240 - rdfs:comment """STEP 00009 Record the Facility that has the flows - kind is \"licence\" 198 + rdfs:comment """STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility
241 Nothing is done with the namingSystem!"""^^xsd:string ; 199 Nothing is done with the namingSystem!"""^^xsd:string ;
242 sp:templates ([ sp:object spin:_this ; 200 sp:templates ([ sp:object spin:_this ;
243 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 201 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
244 sp:subject 202 sp:subject
245 - [ sp:varName "licence"^^xsd:string 203 + [ sp:varName "platform"^^xsd:string
246 ] 204 ]
247 ] [ sp:object 205 ] [ sp:object
248 - [ sp:varName "licenceName"^^xsd:string 206 + [ sp:varName "platformLabel"^^xsd:string
249 ] ; 207 ] ;
250 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 208 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
251 sp:subject spin:_this 209 sp:subject spin:_this
252 ]) ; 210 ]) ;
253 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ; 211 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
254 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 212 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
255 sp:subject spin:_this 213 sp:subject spin:_this
256 ] [ sp:object 214 ] [ sp:object
257 - [ sp:varName "licenceName"^^xsd:string 215 + [ sp:varName "platformName"^^xsd:string
258 ] ; 216 ] ;
259 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 217 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
260 sp:subject spin:_this 218 sp:subject spin:_this
261 ] [ rdf:type sp:NamedGraph ; 219 ] [ rdf:type sp:NamedGraph ;
262 - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ; 220 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
263 sp:predicate rdf:type ; 221 sp:predicate rdf:type ;
264 sp:subject 222 sp:subject
265 - [ sp:varName "licence"^^xsd:string 223 + [ sp:varName "platform"^^xsd:string
266 ] 224 ]
267 ] [ sp:object 225 ] [ sp:object
268 - [ sp:varName "licenceName"^^xsd:string 226 + [ sp:varName "platformName"^^xsd:string
269 ] ; 227 ] ;
270 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 228 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
271 sp:subject 229 sp:subject
272 - [ sp:varName "licence"^^xsd:string 230 + [ sp:varName "platform"^^xsd:string
231 + ]
232 + ] [ sp:object
233 + [ sp:varName "platformId"^^xsd:string
234 + ] ;
235 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
236 + sp:subject
237 + [ sp:varName "platform"^^xsd:string
273 ] 238 ]
274 ]) ; 239 ]) ;
275 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 240 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
241 + ] [ rdf:type sp:Bind ;
242 + sp:expression
243 + [ rdf:type fn:concat ;
244 + sp:arg1 "platform-" ;
245 + sp:arg2 [ sp:varName "platformId"^^xsd:string
246 + ]
247 + ] ;
248 + sp:variable
249 + [ sp:varName "platformLabel"^^xsd:string
250 + ]
276 ]) 251 ])
277 ] ; 252 ] ;
278 spin:rule 253 spin:rule
279 [ rdf:type sp:Construct ; 254 [ rdf:type sp:Construct ;
280 - rdfs:comment """STEP 00010 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file 255 + rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\"
281 Nothing is done with the namingSystem!"""^^xsd:string ; 256 Nothing is done with the namingSystem!"""^^xsd:string ;
282 sp:templates ([ sp:object spin:_this ; 257 sp:templates ([ sp:object spin:_this ;
283 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 258 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
284 sp:subject 259 sp:subject
285 - [ sp:varName "facility"^^xsd:string 260 + [ sp:varName "wellBore"^^xsd:string
286 ] 261 ]
262 + ] [ sp:object
263 + [ sp:varName "wellBoreLabel"^^xsd:string
264 + ] ;
265 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
266 + sp:subject spin:_this
287 ]) ; 267 ]) ;
288 - sp:where ([ rdf:type sp:Optional ; 268 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
289 - sp:elements ([ sp:object 269 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
290 - [ sp:varName "facilityKind"^^xsd:string 270 + sp:subject spin:_this
291 - ] ;
292 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
293 - sp:subject spin:_this
294 - ])
295 ] [ sp:object 271 ] [ sp:object
296 - [ sp:varName "facilityName"^^xsd:string 272 + [ sp:varName "wellBoreName"^^xsd:string
297 ] ; 273 ] ;
298 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 274 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
299 sp:subject spin:_this 275 sp:subject spin:_this
300 - ] [ rdf:type sp:NotExists ; 276 + ] [ rdf:type sp:NamedGraph ;
301 - sp:elements ([ sp:object spin:_this ; 277 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
302 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 278 + sp:predicate rdf:type ;
303 sp:subject 279 sp:subject
304 - [ sp:varName "something"^^xsd:string 280 + [ sp:varName "wellBore"^^xsd:string
305 ] 281 ]
306 - ]) 282 + ] [ sp:object
307 - ] [ sp:object 283 + [ sp:varName "wellBoreName"^^xsd:string
308 - [ sp:varName "aFacilityIdentifierStructure"^^xsd:string 284 + ] ;
309 - ] ; 285 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
310 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 286 + sp:subject
311 - sp:subject 287 + [ sp:varName "wellBore"^^xsd:string
312 - [ sp:varName "facility"^^xsd:string 288 + ]
313 - ] 289 + ] [ sp:object
314 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ; 290 + [ sp:varName "wellBoreId"^^xsd:string
315 - sp:predicate rdf:type ; 291 + ] ;
316 - sp:subject 292 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
317 - [ sp:varName "aFacilityIdentifierStructure"^^xsd:string 293 + sp:subject
318 - ] 294 + [ sp:varName "wellBore"^^xsd:string
319 - ] [ sp:object 295 + ]
320 - [ sp:varName "productionFacilityType"^^xsd:string 296 + ]) ;
321 - ] ; 297 + sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
322 - sp:predicate rdf:type ;
323 - sp:subject
324 - [ sp:varName "facility"^^xsd:string
325 - ]
326 ] [ rdf:type sp:Bind ; 298 ] [ rdf:type sp:Bind ;
327 sp:expression 299 sp:expression
328 - [ rdf:type ep-mpr-spin-lib:selectProductionFacilityType ; 300 + [ rdf:type fn:concat ;
329 - sp:arg1 [ sp:varName "facilityKind"^^xsd:string 301 + sp:arg1 "wellbore-" ;
302 + sp:arg2 [ sp:varName "wellBoreId"^^xsd:string
330 ] 303 ]
331 ] ; 304 ] ;
332 sp:variable 305 sp:variable
333 - [ sp:varName "productionFacilityType"^^xsd:string 306 + [ sp:varName "wellBoreLabel"^^xsd:string
334 ] 307 ]
335 ]) 308 ])
336 ] ; 309 ] ;
337 spin:rule 310 spin:rule
338 [ rdf:type sp:Construct ; 311 [ rdf:type sp:Construct ;
339 - rdfs:comment """STEP 00005 Record the Facility that has the flows - kind is \"well\" 312 + rdfs:comment """STEP 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility
340 Nothing is done with the namingSystem!"""^^xsd:string ; 313 Nothing is done with the namingSystem!"""^^xsd:string ;
341 sp:templates ([ sp:object spin:_this ; 314 sp:templates ([ sp:object spin:_this ;
342 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 315 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
343 sp:subject 316 sp:subject
344 - [ sp:varName "well"^^xsd:string 317 + [ sp:varName "platform"^^xsd:string
345 ] 318 ]
346 ] [ sp:object 319 ] [ sp:object
347 - [ sp:varName "wellName"^^xsd:string 320 + [ sp:varName "platformLabel"^^xsd:string
348 ] ; 321 ] ;
349 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 322 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
350 sp:subject spin:_this 323 sp:subject spin:_this
351 ]) ; 324 ]) ;
352 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ; 325 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
353 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 326 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
354 sp:subject spin:_this 327 sp:subject spin:_this
355 ] [ sp:object 328 ] [ sp:object
356 - [ sp:varName "wellName"^^xsd:string 329 + [ sp:varName "platformName"^^xsd:string
357 ] ; 330 ] ;
358 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 331 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
359 sp:subject spin:_this 332 sp:subject spin:_this
360 ] [ rdf:type sp:NamedGraph ; 333 ] [ rdf:type sp:NamedGraph ;
361 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ; 334 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ;
362 sp:predicate rdf:type ; 335 sp:predicate rdf:type ;
363 sp:subject 336 sp:subject
364 - [ sp:varName "well"^^xsd:string 337 + [ sp:varName "platform"^^xsd:string
365 ] 338 ]
366 ] [ sp:object 339 ] [ sp:object
367 - [ sp:varName "wellName"^^xsd:string 340 + [ sp:varName "platformName"^^xsd:string
368 ] ; 341 ] ;
369 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 342 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
370 sp:subject 343 sp:subject
371 - [ sp:varName "well"^^xsd:string 344 + [ sp:varName "platform"^^xsd:string
345 + ]
346 + ] [ sp:object
347 + [ sp:varName "platformId"^^xsd:string
348 + ] ;
349 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
350 + sp:subject
351 + [ sp:varName "platform"^^xsd:string
372 ] 352 ]
373 ]) ; 353 ]) ;
374 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 354 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
355 + ] [ rdf:type sp:Bind ;
356 + sp:expression
357 + [ rdf:type fn:concat ;
358 + sp:arg1 "platform-" ;
359 + sp:arg2 [ sp:varName "platformId"^^xsd:string
360 + ]
361 + ] ;
362 + sp:variable
363 + [ sp:varName "platformLabel"^^xsd:string
364 + ]
375 ]) 365 ])
376 ] ; 366 ] ;
377 spin:rule 367 spin:rule
378 [ rdf:type sp:Construct ; 368 [ rdf:type sp:Construct ;
379 - rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompany 369 + rdfs:comment """STEP 00009 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompany
380 Nothing is done with the namingSystem!"""^^xsd:string ; 370 Nothing is done with the namingSystem!"""^^xsd:string ;
381 sp:templates ([ sp:object spin:_this ; 371 sp:templates ([ sp:object spin:_this ;
382 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 372 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
...@@ -384,7 +374,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -384,7 +374,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
384 [ sp:varName "company"^^xsd:string 374 [ sp:varName "company"^^xsd:string
385 ] 375 ]
386 ] [ sp:object 376 ] [ sp:object
387 - [ sp:varName "companyName"^^xsd:string 377 + [ sp:varName "companyLabel"^^xsd:string
388 ] ; 378 ] ;
389 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 379 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
390 sp:subject spin:_this 380 sp:subject spin:_this
...@@ -415,13 +405,30 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -415,13 +405,30 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
415 sp:subject 405 sp:subject
416 [ sp:varName "company"^^xsd:string 406 [ sp:varName "company"^^xsd:string
417 ] 407 ]
408 + ] [ sp:object
409 + [ sp:varName "companyId"^^xsd:string
410 + ] ;
411 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
412 + sp:subject
413 + [ sp:varName "company"^^xsd:string
414 + ]
418 ]) ; 415 ]) ;
419 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 416 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
417 + ] [ rdf:type sp:Bind ;
418 + sp:expression
419 + [ rdf:type fn:concat ;
420 + sp:arg1 "company-" ;
421 + sp:arg2 [ sp:varName "companyId"^^xsd:string
422 + ]
423 + ] ;
424 + sp:variable
425 + [ sp:varName "companyLabel"^^xsd:string
426 + ]
420 ]) 427 ])
421 ] ; 428 ] ;
422 spin:rule 429 spin:rule
423 [ rdf:type sp:Construct ; 430 [ rdf:type sp:Construct ;
424 - rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal 431 + rdfs:comment """STEP 00012 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
425 Nothing is done with the namingSystem!"""^^xsd:string ; 432 Nothing is done with the namingSystem!"""^^xsd:string ;
426 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; 433 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
427 sp:predicate rdf:type ; 434 sp:predicate rdf:type ;
...@@ -479,122 +486,326 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -479,122 +486,326 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
479 ] ; 486 ] ;
480 spin:rule 487 spin:rule
481 [ rdf:type sp:Construct ; 488 [ rdf:type sp:Construct ;
482 - rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\" 489 + rdfs:comment """STEP 00010 Record the Facility that has the flows - kind is \"licence\"
483 Nothing is done with the namingSystem!"""^^xsd:string ; 490 Nothing is done with the namingSystem!"""^^xsd:string ;
484 sp:templates ([ sp:object spin:_this ; 491 sp:templates ([ sp:object spin:_this ;
485 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 492 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
486 sp:subject 493 sp:subject
487 - [ sp:varName "wellBore"^^xsd:string 494 + [ sp:varName "licence"^^xsd:string
488 ] 495 ]
489 ] [ sp:object 496 ] [ sp:object
490 - [ sp:varName "wellBoreName"^^xsd:string 497 + [ sp:varName "licenceLabel"^^xsd:string
491 ] ; 498 ] ;
492 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 499 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
493 sp:subject spin:_this 500 sp:subject spin:_this
494 ]) ; 501 ]) ;
495 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ; 502 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ;
496 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 503 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
497 sp:subject spin:_this 504 sp:subject spin:_this
498 ] [ sp:object 505 ] [ sp:object
499 - [ sp:varName "wellBoreName"^^xsd:string 506 + [ sp:varName "licenceName"^^xsd:string
500 ] ; 507 ] ;
501 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 508 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
502 sp:subject spin:_this 509 sp:subject spin:_this
503 ] [ rdf:type sp:NamedGraph ; 510 ] [ rdf:type sp:NamedGraph ;
504 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; 511 + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ;
505 sp:predicate rdf:type ; 512 sp:predicate rdf:type ;
506 sp:subject 513 sp:subject
507 - [ sp:varName "wellBore"^^xsd:string 514 + [ sp:varName "licence"^^xsd:string
508 ] 515 ]
509 ] [ sp:object 516 ] [ sp:object
510 - [ sp:varName "wellBoreName"^^xsd:string 517 + [ sp:varName "licenceName"^^xsd:string
511 ] ; 518 ] ;
512 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 519 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
513 sp:subject 520 sp:subject
514 - [ sp:varName "wellBore"^^xsd:string 521 + [ sp:varName "licence"^^xsd:string
522 + ]
523 + ] [ sp:object
524 + [ sp:varName "licenceId"^^xsd:string
525 + ] ;
526 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
527 + sp:subject
528 + [ sp:varName "livence"^^xsd:string
515 ] 529 ]
516 ]) ; 530 ]) ;
517 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 531 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
532 + ] [ rdf:type sp:Bind ;
533 + sp:expression
534 + [ rdf:type fn:concat ;
535 + sp:arg1 "licence-" ;
536 + sp:arg2 [ sp:varName "licenceId"^^xsd:string
537 + ]
538 + ] ;
539 + sp:variable
540 + [ sp:varName "licenceLabel"^^xsd:string
541 + ]
518 ]) 542 ])
519 ] ; 543 ] ;
520 spin:rule 544 spin:rule
521 [ rdf:type sp:Construct ; 545 [ rdf:type sp:Construct ;
522 - rdfs:comment """STEP 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility 546 + rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility
523 Nothing is done with the namingSystem!"""^^xsd:string ; 547 Nothing is done with the namingSystem!"""^^xsd:string ;
524 sp:templates ([ sp:object spin:_this ; 548 sp:templates ([ sp:object spin:_this ;
525 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 549 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
526 sp:subject 550 sp:subject
527 - [ sp:varName "platform"^^xsd:string 551 + [ sp:varName "terminal"^^xsd:string
528 ] 552 ]
529 ] [ sp:object 553 ] [ sp:object
530 - [ sp:varName "platformName"^^xsd:string 554 + [ sp:varName "terminalLabel"^^xsd:string
531 ] ; 555 ] ;
532 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 556 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
533 sp:subject spin:_this 557 sp:subject spin:_this
534 ]) ; 558 ]) ;
535 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ; 559 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
536 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 560 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
537 sp:subject spin:_this 561 sp:subject spin:_this
538 ] [ sp:object 562 ] [ sp:object
539 - [ sp:varName "platformName"^^xsd:string 563 + [ sp:varName "terminalName"^^xsd:string
540 ] ; 564 ] ;
541 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 565 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
542 sp:subject spin:_this 566 sp:subject spin:_this
543 ] [ rdf:type sp:NamedGraph ; 567 ] [ rdf:type sp:NamedGraph ;
544 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ; 568 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
545 sp:predicate rdf:type ; 569 sp:predicate rdf:type ;
546 sp:subject 570 sp:subject
547 - [ sp:varName "platform"^^xsd:string 571 + [ sp:varName "terminal"^^xsd:string
548 ] 572 ]
549 ] [ sp:object 573 ] [ sp:object
550 - [ sp:varName "platformName"^^xsd:string 574 + [ sp:varName "terminalName"^^xsd:string
551 ] ; 575 ] ;
552 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 576 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
553 sp:subject 577 sp:subject
554 - [ sp:varName "platform"^^xsd:string 578 + [ sp:varName "terminal"^^xsd:string
579 + ]
580 + ] [ sp:object
581 + [ sp:varName "terminalId"^^xsd:string
582 + ] ;
583 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
584 + sp:subject
585 + [ sp:varName "terminal"^^xsd:string
555 ] 586 ]
556 ]) ; 587 ]) ;
557 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 588 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
589 + ] [ rdf:type sp:Bind ;
590 + sp:expression
591 + [ rdf:type fn:concat ;
592 + sp:arg1 "terminal-" ;
593 + sp:arg2 [ sp:varName "terminalId"^^xsd:string
594 + ]
595 + ] ;
596 + sp:variable
597 + [ sp:varName "terminalLabel"^^xsd:string
598 + ]
558 ]) 599 ])
559 ] ; 600 ] ;
560 spin:rule 601 spin:rule
561 [ rdf:type sp:Construct ; 602 [ rdf:type sp:Construct ;
562 - rdfs:comment """STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility 603 + rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc.
563 Nothing is done with the namingSystem!"""^^xsd:string ; 604 Nothing is done with the namingSystem!"""^^xsd:string ;
564 sp:templates ([ sp:object spin:_this ; 605 sp:templates ([ sp:object spin:_this ;
565 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 606 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
566 sp:subject 607 sp:subject
567 - [ sp:varName "platform"^^xsd:string 608 + [ sp:varName "field"^^xsd:string
568 ] 609 ]
569 ] [ sp:object 610 ] [ sp:object
570 - [ sp:varName "platformName"^^xsd:string 611 + [ sp:varName "fieldLabel"^^xsd:string
571 ] ; 612 ] ;
572 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 613 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
573 sp:subject spin:_this 614 sp:subject spin:_this
574 ]) ; 615 ]) ;
575 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ; 616 + sp:where ([ rdf:type sp:Union ;
576 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 617 + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
618 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
619 + sp:subject spin:_this
620 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ;
621 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
622 + sp:subject spin:_this
623 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ;
624 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
625 + sp:subject spin:_this
626 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ;
627 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
628 + sp:subject spin:_this
629 + ]))
630 + ] [ sp:object
631 + [ sp:varName "fieldName"^^xsd:string
632 + ] ;
633 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
577 sp:subject spin:_this 634 sp:subject spin:_this
635 + ] [ rdf:type sp:NamedGraph ;
636 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
637 + sp:predicate rdf:type ;
638 + sp:subject
639 + [ sp:varName "field"^^xsd:string
640 + ]
641 + ] [ sp:object
642 + [ sp:varName "fieldName"^^xsd:string
643 + ] ;
644 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
645 + sp:subject
646 + [ sp:varName "field"^^xsd:string
647 + ]
648 + ] [ sp:object
649 + [ sp:varName "fieldId"^^xsd:string
650 + ] ;
651 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
652 + sp:subject
653 + [ sp:varName "field"^^xsd:string
654 + ]
655 + ]) ;
656 + sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
657 + ] [ rdf:type sp:Bind ;
658 + sp:expression
659 + [ rdf:type fn:concat ;
660 + sp:arg1 "field-" ;
661 + sp:arg2 [ sp:varName "fieldId"^^xsd:string
662 + ]
663 + ] ;
664 + sp:variable
665 + [ sp:varName "fieldLabel"^^xsd:string
666 + ]
667 + ])
668 + ] ;
669 + spin:rule
670 + [ rdf:type sp:Construct ;
671 + rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc.
672 +Nothing is done with the namingSystem!"""^^xsd:string ;
673 + sp:templates ([ sp:object spin:_this ;
674 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
675 + sp:subject
676 + [ sp:varName "tuf"^^xsd:string
677 + ]
578 ] [ sp:object 678 ] [ sp:object
579 - [ sp:varName "platformName"^^xsd:string 679 + [ sp:varName "tufLabel"^^xsd:string
680 + ] ;
681 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
682 + sp:subject spin:_this
683 + ]) ;
684 + sp:where ([ rdf:type sp:Union ;
685 + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
686 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
687 + sp:subject spin:_this
688 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ;
689 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
690 + sp:subject spin:_this
691 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ;
692 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
693 + sp:subject spin:_this
694 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ;
695 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
696 + sp:subject spin:_this
697 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ;
698 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
699 + sp:subject spin:_this
700 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ;
701 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
702 + sp:subject spin:_this
703 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ;
704 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
705 + sp:subject spin:_this
706 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ;
707 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
708 + sp:subject spin:_this
709 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ;
710 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
711 + sp:subject spin:_this
712 + ]))
713 + ] [ sp:object
714 + [ sp:varName "tufName"^^xsd:string
580 ] ; 715 ] ;
581 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 716 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
582 sp:subject spin:_this 717 sp:subject spin:_this
583 ] [ rdf:type sp:NamedGraph ; 718 ] [ rdf:type sp:NamedGraph ;
584 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ; 719 + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ;
585 sp:predicate rdf:type ; 720 sp:predicate rdf:type ;
586 sp:subject 721 sp:subject
587 - [ sp:varName "platform"^^xsd:string 722 + [ sp:varName "tuf"^^xsd:string
588 ] 723 ]
589 ] [ sp:object 724 ] [ sp:object
590 - [ sp:varName "platformName"^^xsd:string 725 + [ sp:varName "tufName"^^xsd:string
591 ] ; 726 ] ;
592 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 727 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
593 sp:subject 728 sp:subject
594 - [ sp:varName "platform"^^xsd:string 729 + [ sp:varName "tuf"^^xsd:string
730 + ]
731 + ] [ sp:object
732 + [ sp:varName "tufId"^^xsd:string
733 + ] ;
734 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
735 + sp:subject
736 + [ sp:varName "tuf"^^xsd:string
595 ] 737 ]
596 ]) ; 738 ]) ;
597 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 739 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
740 + ] [ rdf:type sp:Bind ;
741 + sp:expression
742 + [ rdf:type fn:concat ;
743 + sp:arg1 "tuf-" ;
744 + sp:arg2 [ sp:varName "tufId"^^xsd:string
745 + ]
746 + ] ;
747 + sp:variable
748 + [ sp:varName "tufLabel"^^xsd:string
749 + ]
750 + ])
751 + ] ;
752 + spin:rule
753 + [ rdf:type sp:Construct ;
754 + rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
755 +Nothing is done with the namingSystem!"""^^xsd:string ;
756 + sp:templates ([ sp:object spin:_this ;
757 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
758 + sp:subject
759 + [ sp:varName "facility"^^xsd:string
760 + ]
761 + ]) ;
762 + sp:where ([ rdf:type sp:Optional ;
763 + sp:elements ([ sp:object
764 + [ sp:varName "facilityKind"^^xsd:string
765 + ] ;
766 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
767 + sp:subject spin:_this
768 + ])
769 + ] [ sp:object
770 + [ sp:varName "facilityName"^^xsd:string
771 + ] ;
772 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
773 + sp:subject spin:_this
774 + ] [ rdf:type sp:NotExists ;
775 + sp:elements ([ sp:object spin:_this ;
776 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
777 + sp:subject
778 + [ sp:varName "something"^^xsd:string
779 + ]
780 + ])
781 + ] [ sp:object
782 + [ sp:varName "aFacilityIdentifierStructure"^^xsd:string
783 + ] ;
784 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
785 + sp:subject
786 + [ sp:varName "facility"^^xsd:string
787 + ]
788 + ] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ;
789 + sp:predicate rdf:type ;
790 + sp:subject
791 + [ sp:varName "aFacilityIdentifierStructure"^^xsd:string
792 + ]
793 + ] [ sp:object
794 + [ sp:varName "productionFacilityType"^^xsd:string
795 + ] ;
796 + sp:predicate rdf:type ;
797 + sp:subject
798 + [ sp:varName "facility"^^xsd:string
799 + ]
800 + ] [ rdf:type sp:Bind ;
801 + sp:expression
802 + [ rdf:type ep-mpr-spin-lib:selectProductionFacilityType ;
803 + sp:arg1 [ sp:varName "facilityKind"^^xsd:string
804 + ]
805 + ] ;
806 + sp:variable
807 + [ sp:varName "productionFacilityType"^^xsd:string
808 + ]
598 ]) 809 ])
599 ] . 810 ] .
600 811
......