Showing
2 changed files
with
480 additions
and
488 deletions
... | @@ -21,63 +21,58 @@ | ... | @@ -21,63 +21,58 @@ |
21 | <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> | 21 | <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> |
22 | spin:rule | 22 | spin:rule |
23 | [ rdf:type sp:Construct ; | 23 | [ rdf:type sp:Construct ; |
24 | - rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany | 24 | + rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility |
25 | Nothing is done with the namingSystem!"""^^xsd:string ; | 25 | Nothing is done with the namingSystem!"""^^xsd:string ; |
26 | sp:templates ([ sp:object spin:_this ; | 26 | sp:templates ([ sp:object spin:_this ; |
27 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 27 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
28 | sp:subject | 28 | sp:subject |
29 | - [ sp:varName "company"^^xsd:string | 29 | + [ sp:varName "terminal"^^xsd:string |
30 | ] | 30 | ] |
31 | ] [ sp:object | 31 | ] [ sp:object |
32 | - [ sp:varName "companyLabel"^^xsd:string | 32 | + [ sp:varName "terminalLabel"^^xsd:string |
33 | ] ; | 33 | ] ; |
34 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | 34 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
35 | sp:subject spin:_this | 35 | sp:subject spin:_this |
36 | ]) ; | 36 | ]) ; |
37 | - sp:where ([ rdf:type sp:Union ; | 37 | + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; |
38 | - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ; | 38 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; |
39 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 39 | + sp:subject spin:_this |
40 | - sp:subject spin:_this | ||
41 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ; | ||
42 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
43 | - sp:subject spin:_this | ||
44 | - ])) | ||
45 | ] [ sp:object | 40 | ] [ sp:object |
46 | - [ sp:varName "companyName"^^xsd:string | 41 | + [ sp:varName "terminalName"^^xsd:string |
47 | ] ; | 42 | ] ; |
48 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 43 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
49 | sp:subject spin:_this | 44 | sp:subject spin:_this |
50 | ] [ rdf:type sp:NamedGraph ; | 45 | ] [ rdf:type sp:NamedGraph ; |
51 | - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ; | 46 | + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ; |
52 | sp:predicate rdf:type ; | 47 | sp:predicate rdf:type ; |
53 | sp:subject | 48 | sp:subject |
54 | - [ sp:varName "company"^^xsd:string | 49 | + [ sp:varName "terminal"^^xsd:string |
55 | ] | 50 | ] |
56 | ] [ sp:object | 51 | ] [ sp:object |
57 | - [ sp:varName "companyName"^^xsd:string | 52 | + [ sp:varName "terminalName"^^xsd:string |
58 | ] ; | 53 | ] ; |
59 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | 54 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; |
60 | sp:subject | 55 | sp:subject |
61 | - [ sp:varName "company"^^xsd:string | 56 | + [ sp:varName "terminal"^^xsd:string |
62 | ] | 57 | ] |
63 | ] [ sp:object | 58 | ] [ sp:object |
64 | - [ sp:varName "companyId"^^xsd:string | 59 | + [ sp:varName "terminalId"^^xsd:string |
65 | ] ; | 60 | ] ; |
66 | sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | 61 | sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; |
67 | sp:subject | 62 | sp:subject |
68 | - [ sp:varName "company"^^xsd:string | 63 | + [ sp:varName "terminal"^^xsd:string |
69 | ] | 64 | ] |
70 | ]) ; | 65 | ]) ; |
71 | sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | 66 | sp:graphNameNode <http://www.reportinghub.no/np/data/npd> |
72 | ] [ rdf:type sp:Bind ; | 67 | ] [ rdf:type sp:Bind ; |
73 | sp:expression | 68 | sp:expression |
74 | [ rdf:type fn:concat ; | 69 | [ rdf:type fn:concat ; |
75 | - sp:arg1 "company-" ; | 70 | + sp:arg1 "terminal-" ; |
76 | - sp:arg2 [ sp:varName "companyId"^^xsd:string | 71 | + sp:arg2 [ sp:varName "terminalId"^^xsd:string |
77 | ] | 72 | ] |
78 | ] ; | 73 | ] ; |
79 | sp:variable | 74 | sp:variable |
80 | - [ sp:varName "companyLabel"^^xsd:string | 75 | + [ sp:varName "terminalLabel"^^xsd:string |
81 | ] | 76 | ] |
82 | ]) | 77 | ]) |
83 | ] ; | 78 | ] ; |
... | @@ -140,190 +135,120 @@ Nothing is done with the namingSystem!"""^^xsd:string ; | ... | @@ -140,190 +135,120 @@ Nothing is done with the namingSystem!"""^^xsd:string ; |
140 | ] ; | 135 | ] ; |
141 | spin:rule | 136 | spin:rule |
142 | [ rdf:type sp:Construct ; | 137 | [ rdf:type sp:Construct ; |
143 | - rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc. | 138 | + rdfs:comment """STEP 00010 Record the Facility that has the flows - kind is \"licence\" |
144 | Nothing is done with the namingSystem!"""^^xsd:string ; | 139 | Nothing is done with the namingSystem!"""^^xsd:string ; |
145 | sp:templates ([ sp:object spin:_this ; | 140 | sp:templates ([ sp:object spin:_this ; |
146 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 141 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
147 | sp:subject | 142 | sp:subject |
148 | - [ sp:varName "field"^^xsd:string | 143 | + [ sp:varName "licence"^^xsd:string |
149 | ] | 144 | ] |
150 | ] [ sp:object | 145 | ] [ sp:object |
151 | - [ sp:varName "fieldLabel"^^xsd:string | 146 | + [ sp:varName "licenceLabel"^^xsd:string |
152 | ] ; | 147 | ] ; |
153 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | 148 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
154 | sp:subject spin:_this | 149 | sp:subject spin:_this |
155 | ]) ; | 150 | ]) ; |
156 | - sp:where ([ rdf:type sp:Union ; | 151 | + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ; |
157 | - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | 152 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; |
158 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 153 | + sp:subject spin:_this |
159 | - sp:subject spin:_this | ||
160 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ; | ||
161 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
162 | - sp:subject spin:_this | ||
163 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ; | ||
164 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
165 | - sp:subject spin:_this | ||
166 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ; | ||
167 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
168 | - sp:subject spin:_this | ||
169 | - ])) | ||
170 | ] [ sp:object | 154 | ] [ sp:object |
171 | - [ sp:varName "fieldName"^^xsd:string | 155 | + [ sp:varName "licenceName"^^xsd:string |
172 | ] ; | 156 | ] ; |
173 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 157 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
174 | sp:subject spin:_this | 158 | sp:subject spin:_this |
175 | ] [ rdf:type sp:NamedGraph ; | 159 | ] [ rdf:type sp:NamedGraph ; |
176 | - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ; | 160 | + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ; |
177 | sp:predicate rdf:type ; | 161 | sp:predicate rdf:type ; |
178 | sp:subject | 162 | sp:subject |
179 | - [ sp:varName "field"^^xsd:string | 163 | + [ sp:varName "licence"^^xsd:string |
180 | ] | 164 | ] |
181 | ] [ sp:object | 165 | ] [ sp:object |
182 | - [ sp:varName "fieldName"^^xsd:string | 166 | + [ sp:varName "licenceName"^^xsd:string |
183 | ] ; | 167 | ] ; |
184 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | 168 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; |
185 | sp:subject | 169 | sp:subject |
186 | - [ sp:varName "field"^^xsd:string | 170 | + [ sp:varName "licence"^^xsd:string |
187 | ] | 171 | ] |
188 | ] [ sp:object | 172 | ] [ sp:object |
189 | - [ sp:varName "fieldId"^^xsd:string | 173 | + [ sp:varName "licenceId"^^xsd:string |
190 | ] ; | 174 | ] ; |
191 | sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | 175 | sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; |
192 | sp:subject | 176 | sp:subject |
193 | - [ sp:varName "field"^^xsd:string | 177 | + [ sp:varName "livence"^^xsd:string |
194 | ] | 178 | ] |
195 | ]) ; | 179 | ]) ; |
196 | sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | 180 | sp:graphNameNode <http://www.reportinghub.no/np/data/npd> |
197 | ] [ rdf:type sp:Bind ; | 181 | ] [ rdf:type sp:Bind ; |
198 | sp:expression | 182 | sp:expression |
199 | [ rdf:type fn:concat ; | 183 | [ rdf:type fn:concat ; |
200 | - sp:arg1 "field-" ; | 184 | + sp:arg1 "licence-" ; |
201 | - sp:arg2 [ sp:varName "fieldId"^^xsd:string | 185 | + sp:arg2 [ sp:varName "licenceId"^^xsd:string |
202 | ] | 186 | ] |
203 | ] ; | 187 | ] ; |
204 | sp:variable | 188 | sp:variable |
205 | - [ sp:varName "fieldLabel"^^xsd:string | 189 | + [ sp:varName "licenceLabel"^^xsd:string |
206 | ] | 190 | ] |
207 | ]) | 191 | ]) |
208 | ] ; | 192 | ] ; |
209 | spin:rule | 193 | spin:rule |
210 | [ rdf:type sp:Construct ; | 194 | [ rdf:type sp:Construct ; |
211 | - rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file | 195 | + rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany |
212 | -Naming system supplied"""^^xsd:string ; | 196 | +Nothing is done with the namingSystem!"""^^xsd:string ; |
213 | sp:templates ([ sp:object spin:_this ; | 197 | sp:templates ([ sp:object spin:_this ; |
214 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 198 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
215 | sp:subject | 199 | sp:subject |
216 | - [ sp:varName "facility"^^xsd:string | 200 | + [ sp:varName "company"^^xsd:string |
217 | ] | 201 | ] |
218 | ] [ sp:object | 202 | ] [ sp:object |
219 | - [ sp:varName "facilityLabel"^^xsd:string | 203 | + [ sp:varName "companyLabel"^^xsd:string |
220 | ] ; | 204 | ] ; |
221 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | 205 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
222 | sp:subject spin:_this | 206 | sp:subject spin:_this |
223 | ]) ; | 207 | ]) ; |
224 | - sp:where ([ rdf:type sp:Optional ; | 208 | + sp:where ([ rdf:type sp:Union ; |
225 | - sp:elements ([ sp:object | 209 | + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ; |
226 | - [ sp:varName "facilityKind"^^xsd:string | 210 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; |
227 | - ] ; | 211 | + sp:subject spin:_this |
228 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 212 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ; |
229 | - sp:subject spin:_this | 213 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; |
230 | - ]) | 214 | + sp:subject spin:_this |
215 | + ])) | ||
231 | ] [ sp:object | 216 | ] [ sp:object |
232 | - [ sp:varName "facilityName"^^xsd:string | 217 | + [ sp:varName "companyName"^^xsd:string |
233 | ] ; | 218 | ] ; |
234 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 219 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
235 | sp:subject spin:_this | 220 | sp:subject spin:_this |
236 | - ] [ sp:object | 221 | + ] [ rdf:type sp:NamedGraph ; |
237 | - [ sp:varName "namingSystem"^^xsd:string | 222 | + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ; |
238 | - ] ; | 223 | + sp:predicate rdf:type ; |
239 | - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; | ||
240 | - sp:subject spin:_this | ||
241 | - ] [ rdf:type sp:NotExists ; | ||
242 | - sp:elements ([ sp:object spin:_this ; | ||
243 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
244 | sp:subject | 224 | sp:subject |
245 | - [ sp:varName "something"^^xsd:string | 225 | + [ sp:varName "company"^^xsd:string |
246 | ] | 226 | ] |
247 | - ]) | 227 | + ] [ sp:object |
248 | - ] [ rdf:type sp:Bind ; | 228 | + [ sp:varName "companyName"^^xsd:string |
249 | - sp:expression | 229 | + ] ; |
250 | - [ rdf:type ep-mpr-spin-lib:selectReportingFacilityType ; | 230 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; |
251 | - sp:arg1 [ sp:varName "facilityKind"^^xsd:string | 231 | + sp:subject |
252 | - ] | 232 | + [ sp:varName "company"^^xsd:string |
253 | - ] ; | 233 | + ] |
254 | - sp:variable | 234 | + ] [ sp:object |
255 | - [ sp:varName "reportingFacilityType"^^xsd:string | 235 | + [ sp:varName "companyId"^^xsd:string |
256 | - ] | 236 | + ] ; |
257 | - ] [ rdf:type sp:Bind ; | 237 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; |
258 | - sp:expression | 238 | + sp:subject |
259 | - [ rdf:type fn:concat ; | 239 | + [ sp:varName "company"^^xsd:string |
260 | - sp:arg1 [ sp:varName "namingSystem"^^xsd:string | 240 | + ] |
261 | - ] ; | 241 | + ]) ; |
262 | - sp:arg2 "$" ; | 242 | + sp:graphNameNode <http://www.reportinghub.no/np/data/npd> |
263 | - sp:arg3 [ sp:varName "facilityName"^^xsd:string | ||
264 | - ] | ||
265 | - ] ; | ||
266 | - sp:variable | ||
267 | - [ sp:varName "facilityNameWithContext"^^xsd:string | ||
268 | - ] | ||
269 | - ] [ rdf:type sp:Bind ; | ||
270 | - sp:expression | ||
271 | - [ rdf:type fn:concat ; | ||
272 | - sp:arg1 [ rdf:type ep-spin-lib:normalizeString ; | ||
273 | - sp:arg1 [ sp:varName "namingSystem"^^xsd:string | ||
274 | - ] | ||
275 | - ] ; | ||
276 | - sp:arg2 "-" ; | ||
277 | - sp:arg3 [ rdf:type ep-spin-lib:normalizeString ; | ||
278 | - sp:arg1 [ sp:varName "facilityName"^^xsd:string | ||
279 | - ] | ||
280 | - ] | ||
281 | - ] ; | ||
282 | - sp:variable | ||
283 | - [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | ||
284 | - ] | ||
285 | - ] [ rdf:type sp:Bind ; | ||
286 | - sp:expression | ||
287 | - [ rdf:type ep-spin-lib:normalizeString ; | ||
288 | - sp:arg1 [ rdf:type spl:object ; | ||
289 | - sp:arg1 [ sp:varName "reportingFacilityType"^^xsd:string | ||
290 | - ] ; | ||
291 | - sp:arg2 rdfs:label | ||
292 | - ] | ||
293 | - ] ; | ||
294 | - sp:variable | ||
295 | - [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string | ||
296 | - ] | ||
297 | ] [ rdf:type sp:Bind ; | 243 | ] [ rdf:type sp:Bind ; |
298 | sp:expression | 244 | sp:expression |
299 | [ rdf:type fn:concat ; | 245 | [ rdf:type fn:concat ; |
300 | - sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string | 246 | + sp:arg1 "company-" ; |
301 | - ] ; | 247 | + sp:arg2 [ sp:varName "companyId"^^xsd:string |
302 | - sp:arg2 "-" ; | ||
303 | - sp:arg3 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | ||
304 | ] | 248 | ] |
305 | ] ; | 249 | ] ; |
306 | sp:variable | 250 | sp:variable |
307 | - [ sp:varName "facilityLabel"^^xsd:string | 251 | + [ sp:varName "companyLabel"^^xsd:string |
308 | - ] | ||
309 | - ] [ sp:object | ||
310 | - [ sp:varName "aFacilityIdentifierStructure"^^xsd:string | ||
311 | - ] ; | ||
312 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
313 | - sp:subject | ||
314 | - [ sp:varName "facility"^^xsd:string | ||
315 | - ] | ||
316 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ; | ||
317 | - sp:predicate rdf:type ; | ||
318 | - sp:subject | ||
319 | - [ sp:varName "aFacilityIdentifierStructure"^^xsd:string | ||
320 | - ] | ||
321 | - ] [ sp:object | ||
322 | - [ sp:varName "facilityLabel"^^xsd:string | ||
323 | - ] ; | ||
324 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
325 | - sp:subject | ||
326 | - [ sp:varName "aFacilityIdentifierStructure"^^xsd:string | ||
327 | ] | 252 | ] |
328 | ]) | 253 | ]) |
329 | ] ; | 254 | ] ; |
... | @@ -386,50 +311,151 @@ Nothing is done with the namingSystem!"""^^xsd:string ; | ... | @@ -386,50 +311,151 @@ Nothing is done with the namingSystem!"""^^xsd:string ; |
386 | ] ; | 311 | ] ; |
387 | spin:rule | 312 | spin:rule |
388 | [ rdf:type sp:Construct ; | 313 | [ rdf:type sp:Construct ; |
389 | - rdfs:comment """STEP 00014 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file | 314 | + rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal |
390 | -Naming system not supplied | 315 | +Naming system supplied"""^^xsd:string ; |
391 | -now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) AS ?facility) ."""^^xsd:string ; | ||
392 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; | 316 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; |
393 | sp:predicate rdf:type ; | 317 | sp:predicate rdf:type ; |
394 | - sp:subject _:b1 | 318 | + sp:subject |
395 | - ] [ sp:object | 319 | + [ sp:varName "terminal"^^xsd:string |
396 | - [ sp:varName "reportingFacilityType"^^xsd:string | 320 | + ] |
397 | - ] ; | 321 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ; |
398 | sp:predicate rdf:type ; | 322 | sp:predicate rdf:type ; |
399 | - sp:subject _:b1 | 323 | + sp:subject |
324 | + [ sp:varName "terminal"^^xsd:string | ||
325 | + ] | ||
400 | ] [ sp:object | 326 | ] [ sp:object |
401 | - [ sp:varName "facilityName"^^xsd:string | 327 | + [ sp:varName "facilityNameWithContext"^^xsd:string |
402 | ] ; | 328 | ] ; |
403 | sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | 329 | sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; |
404 | - sp:subject _:b1 | 330 | + sp:subject |
331 | + [ sp:varName "terminal"^^xsd:string | ||
332 | + ] | ||
405 | ] [ sp:object spin:_this ; | 333 | ] [ sp:object spin:_this ; |
406 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 334 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
407 | - sp:subject _:b1 | 335 | + sp:subject |
336 | + [ sp:varName "terminal"^^xsd:string | ||
337 | + ] | ||
408 | ] [ sp:object | 338 | ] [ sp:object |
409 | [ sp:varName "facilityLabel"^^xsd:string | 339 | [ sp:varName "facilityLabel"^^xsd:string |
410 | ] ; | 340 | ] ; |
411 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | 341 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
412 | sp:subject spin:_this | 342 | sp:subject spin:_this |
413 | ]) ; | 343 | ]) ; |
414 | - sp:where ([ rdf:type sp:Optional ; | 344 | + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; |
415 | - sp:elements ([ sp:object | 345 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; |
416 | - [ sp:varName "facilityKind"^^xsd:string | 346 | + sp:subject spin:_this |
417 | - ] ; | ||
418 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
419 | - sp:subject spin:_this | ||
420 | - ]) | ||
421 | ] [ sp:object | 347 | ] [ sp:object |
422 | [ sp:varName "facilityName"^^xsd:string | 348 | [ sp:varName "facilityName"^^xsd:string |
423 | ] ; | 349 | ] ; |
424 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 350 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
425 | sp:subject spin:_this | 351 | sp:subject spin:_this |
352 | + ] [ sp:object | ||
353 | + [ sp:varName "namingSystem"^^xsd:string | ||
354 | + ] ; | ||
355 | + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; | ||
356 | + sp:subject spin:_this | ||
426 | ] [ rdf:type sp:NotExists ; | 357 | ] [ rdf:type sp:NotExists ; |
427 | - sp:elements ([ sp:object | 358 | + sp:elements ([ sp:object spin:_this ; |
428 | - [ sp:varName "namingSystem"^^xsd:string | 359 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
429 | - ] ; | 360 | + sp:subject |
430 | - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; | 361 | + [ sp:varName "something"^^xsd:string |
431 | - sp:subject spin:_this | 362 | + ] |
432 | - ]) | 363 | + ]) |
364 | + ] [ rdf:type sp:Bind ; | ||
365 | + sp:expression | ||
366 | + [ rdf:type fn:concat ; | ||
367 | + sp:arg1 [ sp:varName "namingSystem"^^xsd:string | ||
368 | + ] ; | ||
369 | + sp:arg2 "$" ; | ||
370 | + sp:arg3 [ sp:varName "facilityName"^^xsd:string | ||
371 | + ] | ||
372 | + ] ; | ||
373 | + sp:variable | ||
374 | + [ sp:varName "facilityNameWithContext"^^xsd:string | ||
375 | + ] | ||
376 | + ] [ rdf:type sp:Bind ; | ||
377 | + sp:expression | ||
378 | + [ rdf:type fn:concat ; | ||
379 | + sp:arg1 [ rdf:type ep-spin-lib:normalizeString ; | ||
380 | + sp:arg1 [ sp:varName "namingSystem"^^xsd:string | ||
381 | + ] | ||
382 | + ] ; | ||
383 | + sp:arg2 "-" ; | ||
384 | + sp:arg3 [ rdf:type ep-spin-lib:normalizeString ; | ||
385 | + sp:arg1 [ sp:varName "facilityName"^^xsd:string | ||
386 | + ] | ||
387 | + ] | ||
388 | + ] ; | ||
389 | + sp:variable | ||
390 | + [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | ||
391 | + ] | ||
392 | + ] [ rdf:type sp:Bind ; | ||
393 | + sp:expression | ||
394 | + [ rdf:type ep-dpr-spin-lib:buildTerminalURI ; | ||
395 | + sp:arg1 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | ||
396 | + ] | ||
397 | + ] ; | ||
398 | + sp:variable | ||
399 | + [ sp:varName "terminal"^^xsd:string | ||
400 | + ] | ||
401 | + ] [ rdf:type sp:Bind ; | ||
402 | + sp:expression | ||
403 | + [ rdf:type fn:concat ; | ||
404 | + sp:arg1 "terminal-" ; | ||
405 | + sp:arg2 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | ||
406 | + ] | ||
407 | + ] ; | ||
408 | + sp:variable | ||
409 | + [ sp:varName "facilityLabel"^^xsd:string | ||
410 | + ] | ||
411 | + ]) | ||
412 | + ] ; | ||
413 | + spin:rule | ||
414 | + [ rdf:type sp:Construct ; | ||
415 | + rdfs:comment """STEP 00012d Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file | ||
416 | +Naming system not supplied | ||
417 | +now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) AS ?facility) ."""^^xsd:string ; | ||
418 | + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; | ||
419 | + sp:predicate rdf:type ; | ||
420 | + sp:subject _:b1 | ||
421 | + ] [ sp:object | ||
422 | + [ sp:varName "reportingFacilityType"^^xsd:string | ||
423 | + ] ; | ||
424 | + sp:predicate rdf:type ; | ||
425 | + sp:subject _:b1 | ||
426 | + ] [ sp:object | ||
427 | + [ sp:varName "facilityName"^^xsd:string | ||
428 | + ] ; | ||
429 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | ||
430 | + sp:subject _:b1 | ||
431 | + ] [ sp:object spin:_this ; | ||
432 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
433 | + sp:subject _:b1 | ||
434 | + ] [ sp:object | ||
435 | + [ sp:varName "facilityLabel"^^xsd:string | ||
436 | + ] ; | ||
437 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
438 | + sp:subject spin:_this | ||
439 | + ]) ; | ||
440 | + sp:where ([ rdf:type sp:Optional ; | ||
441 | + sp:elements ([ sp:object | ||
442 | + [ sp:varName "facilityKind"^^xsd:string | ||
443 | + ] ; | ||
444 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
445 | + sp:subject spin:_this | ||
446 | + ]) | ||
447 | + ] [ sp:object | ||
448 | + [ sp:varName "facilityName"^^xsd:string | ||
449 | + ] ; | ||
450 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
451 | + sp:subject spin:_this | ||
452 | + ] [ rdf:type sp:NotExists ; | ||
453 | + sp:elements ([ sp:object | ||
454 | + [ sp:varName "namingSystem"^^xsd:string | ||
455 | + ] ; | ||
456 | + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; | ||
457 | + sp:subject spin:_this | ||
458 | + ]) | ||
433 | ] [ rdf:type sp:NotExists ; | 459 | ] [ rdf:type sp:NotExists ; |
434 | sp:elements ([ sp:object spin:_this ; | 460 | sp:elements ([ sp:object spin:_this ; |
435 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 461 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
... | @@ -545,8 +571,8 @@ Nothing is done with the namingSystem!"""^^xsd:string ; | ... | @@ -545,8 +571,8 @@ Nothing is done with the namingSystem!"""^^xsd:string ; |
545 | ] ; | 571 | ] ; |
546 | spin:rule | 572 | spin:rule |
547 | [ rdf:type sp:Construct ; | 573 | [ rdf:type sp:Construct ; |
548 | - rdfs:comment """STEP 00011a Record the Facility that has the flows - not in the NPD Fact Pages - already in the file | 574 | + rdfs:comment """STEP 00012a Record the Facility that has the flows - not in the NPD Fact Pages - already in the file |
549 | -Naming system not supplied"""^^xsd:string ; | 575 | +Naming system supplied"""^^xsd:string ; |
550 | sp:templates ([ sp:object spin:_this ; | 576 | sp:templates ([ sp:object spin:_this ; |
551 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 577 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
552 | sp:subject | 578 | sp:subject |
... | @@ -570,13 +596,11 @@ Naming system not supplied"""^^xsd:string ; | ... | @@ -570,13 +596,11 @@ Naming system not supplied"""^^xsd:string ; |
570 | ] ; | 596 | ] ; |
571 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 597 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
572 | sp:subject spin:_this | 598 | sp:subject spin:_this |
573 | - ] [ rdf:type sp:NotExists ; | 599 | + ] [ sp:object |
574 | - sp:elements ([ sp:object | 600 | + [ sp:varName "namingSystem"^^xsd:string |
575 | - [ sp:varName "namingSystem"^^xsd:string | 601 | + ] ; |
576 | - ] ; | 602 | + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; |
577 | - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; | 603 | + sp:subject spin:_this |
578 | - sp:subject spin:_this | ||
579 | - ]) | ||
580 | ] [ rdf:type sp:NotExists ; | 604 | ] [ rdf:type sp:NotExists ; |
581 | sp:elements ([ sp:object spin:_this ; | 605 | sp:elements ([ sp:object spin:_this ; |
582 | 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> ; |
... | @@ -595,12 +619,31 @@ Naming system not supplied"""^^xsd:string ; | ... | @@ -595,12 +619,31 @@ Naming system not supplied"""^^xsd:string ; |
595 | ] | 619 | ] |
596 | ] [ rdf:type sp:Bind ; | 620 | ] [ rdf:type sp:Bind ; |
597 | sp:expression | 621 | sp:expression |
598 | - [ rdf:type ep-spin-lib:normalizeString ; | 622 | + [ rdf:type fn:concat ; |
599 | - sp:arg1 [ sp:varName "facilityName"^^xsd:string | 623 | + sp:arg1 [ sp:varName "namingSystem"^^xsd:string |
624 | + ] ; | ||
625 | + sp:arg2 "$" ; | ||
626 | + sp:arg3 [ sp:varName "facilityName"^^xsd:string | ||
600 | ] | 627 | ] |
601 | ] ; | 628 | ] ; |
602 | sp:variable | 629 | sp:variable |
603 | - [ sp:varName "normalizedfacilityName"^^xsd:string | 630 | + [ sp:varName "facilityNameWithContext"^^xsd:string |
631 | + ] | ||
632 | + ] [ rdf:type sp:Bind ; | ||
633 | + sp:expression | ||
634 | + [ rdf:type fn:concat ; | ||
635 | + sp:arg1 [ rdf:type ep-spin-lib:normalizeString ; | ||
636 | + sp:arg1 [ sp:varName "namingSystem"^^xsd:string | ||
637 | + ] | ||
638 | + ] ; | ||
639 | + sp:arg2 "-" ; | ||
640 | + sp:arg3 [ rdf:type ep-spin-lib:normalizeString ; | ||
641 | + sp:arg1 [ sp:varName "facilityName"^^xsd:string | ||
642 | + ] | ||
643 | + ] | ||
644 | + ] ; | ||
645 | + sp:variable | ||
646 | + [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | ||
604 | ] | 647 | ] |
605 | ] [ rdf:type sp:Bind ; | 648 | ] [ rdf:type sp:Bind ; |
606 | sp:expression | 649 | sp:expression |
... | @@ -620,7 +663,7 @@ Naming system not supplied"""^^xsd:string ; | ... | @@ -620,7 +663,7 @@ Naming system not supplied"""^^xsd:string ; |
620 | sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string | 663 | sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string |
621 | ] ; | 664 | ] ; |
622 | sp:arg2 "-" ; | 665 | sp:arg2 "-" ; |
623 | - sp:arg3 [ sp:varName "normalizedFacilityName"^^xsd:string | 666 | + sp:arg3 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string |
624 | ] | 667 | ] |
625 | ] ; | 668 | ] ; |
626 | sp:variable | 669 | sp:variable |
... | @@ -649,50 +692,247 @@ Naming system not supplied"""^^xsd:string ; | ... | @@ -649,50 +692,247 @@ Naming system not supplied"""^^xsd:string ; |
649 | ] ; | 692 | ] ; |
650 | spin:rule | 693 | spin:rule |
651 | [ rdf:type sp:Construct ; | 694 | [ rdf:type sp:Construct ; |
652 | - rdfs:comment """STEP 00012 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal | 695 | + rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc. |
653 | -Naming system supplied"""^^xsd:string ; | 696 | +Nothing is done with the namingSystem!"""^^xsd:string ; |
654 | - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; | 697 | + sp:templates ([ sp:object spin:_this ; |
655 | - sp:predicate rdf:type ; | 698 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
656 | - sp:subject | ||
657 | - [ sp:varName "terminal"^^xsd:string | ||
658 | - ] | ||
659 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ; | ||
660 | - sp:predicate rdf:type ; | ||
661 | sp:subject | 699 | sp:subject |
662 | - [ sp:varName "terminal"^^xsd:string | 700 | + [ sp:varName "field"^^xsd:string |
663 | ] | 701 | ] |
664 | ] [ sp:object | 702 | ] [ sp:object |
665 | - [ sp:varName "facilityName"^^xsd:string | 703 | + [ sp:varName "fieldLabel"^^xsd:string |
666 | ] ; | 704 | ] ; |
667 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | 705 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
668 | - sp:subject | 706 | + sp:subject spin:_this |
669 | - [ sp:varName "terminal"^^xsd:string | 707 | + ]) ; |
708 | + sp:where ([ rdf:type sp:Union ; | ||
709 | + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | ||
710 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
711 | + sp:subject spin:_this | ||
712 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ; | ||
713 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
714 | + sp:subject spin:_this | ||
715 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ; | ||
716 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
717 | + sp:subject spin:_this | ||
718 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ; | ||
719 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
720 | + sp:subject spin:_this | ||
721 | + ])) | ||
722 | + ] [ sp:object | ||
723 | + [ sp:varName "fieldName"^^xsd:string | ||
724 | + ] ; | ||
725 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
726 | + sp:subject spin:_this | ||
727 | + ] [ rdf:type sp:NamedGraph ; | ||
728 | + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ; | ||
729 | + sp:predicate rdf:type ; | ||
730 | + sp:subject | ||
731 | + [ sp:varName "field"^^xsd:string | ||
732 | + ] | ||
733 | + ] [ sp:object | ||
734 | + [ sp:varName "fieldName"^^xsd:string | ||
735 | + ] ; | ||
736 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
737 | + sp:subject | ||
738 | + [ sp:varName "field"^^xsd:string | ||
739 | + ] | ||
740 | + ] [ sp:object | ||
741 | + [ sp:varName "fieldId"^^xsd:string | ||
742 | + ] ; | ||
743 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | ||
744 | + sp:subject | ||
745 | + [ sp:varName "field"^^xsd:string | ||
746 | + ] | ||
747 | + ]) ; | ||
748 | + sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | ||
749 | + ] [ rdf:type sp:Bind ; | ||
750 | + sp:expression | ||
751 | + [ rdf:type fn:concat ; | ||
752 | + sp:arg1 "field-" ; | ||
753 | + sp:arg2 [ sp:varName "fieldId"^^xsd:string | ||
754 | + ] | ||
755 | + ] ; | ||
756 | + sp:variable | ||
757 | + [ sp:varName "fieldLabel"^^xsd:string | ||
670 | ] | 758 | ] |
671 | - ] [ sp:object spin:_this ; | 759 | + ]) |
760 | + ] ; | ||
761 | + spin:rule | ||
762 | + [ rdf:type sp:Construct ; | ||
763 | + rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\" | ||
764 | +Nothing is done with the namingSystem!"""^^xsd:string ; | ||
765 | + sp:templates ([ sp:object spin:_this ; | ||
672 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 766 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
673 | sp:subject | 767 | sp:subject |
674 | - [ sp:varName "terminal"^^xsd:string | 768 | + [ sp:varName "wellBore"^^xsd:string |
675 | ] | 769 | ] |
676 | ] [ sp:object | 770 | ] [ sp:object |
677 | - [ sp:varName "facilityLabel"^^xsd:string | 771 | + [ sp:varName "wellBoreLabel"^^xsd:string |
678 | ] ; | 772 | ] ; |
679 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | 773 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
680 | sp:subject spin:_this | 774 | sp:subject spin:_this |
681 | ]) ; | 775 | ]) ; |
682 | - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; | 776 | + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ; |
683 | sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 777 | sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; |
684 | sp:subject spin:_this | 778 | sp:subject spin:_this |
685 | ] [ sp:object | 779 | ] [ sp:object |
686 | - [ sp:varName "facilityName"^^xsd:string | 780 | + [ sp:varName "wellBoreName"^^xsd:string |
687 | ] ; | 781 | ] ; |
688 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 782 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
689 | sp:subject spin:_this | 783 | sp:subject spin:_this |
784 | + ] [ rdf:type sp:NamedGraph ; | ||
785 | + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; | ||
786 | + sp:predicate rdf:type ; | ||
787 | + sp:subject | ||
788 | + [ sp:varName "wellBore"^^xsd:string | ||
789 | + ] | ||
790 | + ] [ sp:object | ||
791 | + [ sp:varName "wellBoreName"^^xsd:string | ||
792 | + ] ; | ||
793 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
794 | + sp:subject | ||
795 | + [ sp:varName "wellBore"^^xsd:string | ||
796 | + ] | ||
797 | + ] [ sp:object | ||
798 | + [ sp:varName "wellBoreId"^^xsd:string | ||
799 | + ] ; | ||
800 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | ||
801 | + sp:subject | ||
802 | + [ sp:varName "wellBore"^^xsd:string | ||
803 | + ] | ||
804 | + ]) ; | ||
805 | + sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | ||
806 | + ] [ rdf:type sp:Bind ; | ||
807 | + sp:expression | ||
808 | + [ rdf:type fn:concat ; | ||
809 | + sp:arg1 "wellbore-" ; | ||
810 | + sp:arg2 [ sp:varName "wellBoreId"^^xsd:string | ||
811 | + ] | ||
812 | + ] ; | ||
813 | + sp:variable | ||
814 | + [ sp:varName "wellBoreLabel"^^xsd:string | ||
815 | + ] | ||
816 | + ]) | ||
817 | + ] ; | ||
818 | + spin:rule | ||
819 | + [ rdf:type sp:Construct ; | ||
820 | + rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc. | ||
821 | +Nothing is done with the namingSystem!"""^^xsd:string ; | ||
822 | + sp:templates ([ sp:object spin:_this ; | ||
823 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
824 | + sp:subject | ||
825 | + [ sp:varName "tuf"^^xsd:string | ||
826 | + ] | ||
690 | ] [ sp:object | 827 | ] [ sp:object |
691 | - [ sp:varName "namingSystem"^^xsd:string | 828 | + [ sp:varName "tufLabel"^^xsd:string |
692 | ] ; | 829 | ] ; |
693 | - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; | 830 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
831 | + sp:subject spin:_this | ||
832 | + ]) ; | ||
833 | + sp:where ([ rdf:type sp:Union ; | ||
834 | + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; | ||
835 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
836 | + sp:subject spin:_this | ||
837 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ; | ||
838 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
839 | + sp:subject spin:_this | ||
840 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ; | ||
841 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
842 | + sp:subject spin:_this | ||
843 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ; | ||
844 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
845 | + sp:subject spin:_this | ||
846 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ; | ||
847 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
848 | + sp:subject spin:_this | ||
849 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ; | ||
850 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
851 | + sp:subject spin:_this | ||
852 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ; | ||
853 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
854 | + sp:subject spin:_this | ||
855 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ; | ||
856 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
857 | + sp:subject spin:_this | ||
858 | + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ; | ||
859 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
860 | + sp:subject spin:_this | ||
861 | + ])) | ||
862 | + ] [ sp:object | ||
863 | + [ sp:varName "tufName"^^xsd:string | ||
864 | + ] ; | ||
865 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
866 | + sp:subject spin:_this | ||
867 | + ] [ rdf:type sp:NamedGraph ; | ||
868 | + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ; | ||
869 | + sp:predicate rdf:type ; | ||
870 | + sp:subject | ||
871 | + [ sp:varName "tuf"^^xsd:string | ||
872 | + ] | ||
873 | + ] [ sp:object | ||
874 | + [ sp:varName "tufName"^^xsd:string | ||
875 | + ] ; | ||
876 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
877 | + sp:subject | ||
878 | + [ sp:varName "tuf"^^xsd:string | ||
879 | + ] | ||
880 | + ] [ sp:object | ||
881 | + [ sp:varName "tufId"^^xsd:string | ||
882 | + ] ; | ||
883 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | ||
884 | + sp:subject | ||
885 | + [ sp:varName "tuf"^^xsd:string | ||
886 | + ] | ||
887 | + ]) ; | ||
888 | + sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | ||
889 | + ] [ rdf:type sp:Bind ; | ||
890 | + sp:expression | ||
891 | + [ rdf:type fn:concat ; | ||
892 | + sp:arg1 "tuf-" ; | ||
893 | + sp:arg2 [ sp:varName "tufId"^^xsd:string | ||
894 | + ] | ||
895 | + ] ; | ||
896 | + sp:variable | ||
897 | + [ sp:varName "tufLabel"^^xsd:string | ||
898 | + ] | ||
899 | + ]) | ||
900 | + ] ; | ||
901 | + spin:rule | ||
902 | + [ rdf:type sp:Construct ; | ||
903 | + rdfs:comment """STEP 00012b Record the Facility that has the flows - not in the NPD Fact Pages - already in the file | ||
904 | +Naming system not supplied"""^^xsd:string ; | ||
905 | + sp:templates ([ sp:object spin:_this ; | ||
906 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
907 | + sp:subject | ||
908 | + [ sp:varName "facility"^^xsd:string | ||
909 | + ] | ||
910 | + ] [ sp:object | ||
911 | + [ sp:varName "facilityLabel"^^xsd:string | ||
912 | + ] ; | ||
913 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
914 | + sp:subject spin:_this | ||
915 | + ]) ; | ||
916 | + sp:where ([ rdf:type sp:Optional ; | ||
917 | + sp:elements ([ sp:object | ||
918 | + [ sp:varName "facilityKind"^^xsd:string | ||
919 | + ] ; | ||
920 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
921 | + sp:subject spin:_this | ||
922 | + ]) | ||
923 | + ] [ sp:object | ||
924 | + [ sp:varName "facilityName"^^xsd:string | ||
925 | + ] ; | ||
926 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
694 | sp:subject spin:_this | 927 | sp:subject spin:_this |
695 | ] [ rdf:type sp:NotExists ; | 928 | ] [ rdf:type sp:NotExists ; |
929 | + sp:elements ([ sp:object | ||
930 | + [ sp:varName "namingSystem"^^xsd:string | ||
931 | + ] ; | ||
932 | + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; | ||
933 | + sp:subject spin:_this | ||
934 | + ]) | ||
935 | + ] [ rdf:type sp:NotExists ; | ||
696 | sp:elements ([ sp:object spin:_this ; | 936 | sp:elements ([ sp:object spin:_this ; |
697 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 937 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
698 | sp:subject | 938 | sp:subject |
... | @@ -701,51 +941,65 @@ Naming system supplied"""^^xsd:string ; | ... | @@ -701,51 +941,65 @@ Naming system supplied"""^^xsd:string ; |
701 | ]) | 941 | ]) |
702 | ] [ rdf:type sp:Bind ; | 942 | ] [ rdf:type sp:Bind ; |
703 | sp:expression | 943 | sp:expression |
704 | - [ rdf:type fn:concat ; | 944 | + [ rdf:type ep-mpr-spin-lib:selectReportingFacilityType ; |
705 | - sp:arg1 [ sp:varName "namingSystem"^^xsd:string | 945 | + sp:arg1 [ sp:varName "facilityKind"^^xsd:string |
706 | - ] ; | ||
707 | - sp:arg2 "$" ; | ||
708 | - sp:arg3 [ sp:varName "facilityName"^^xsd:string | ||
709 | ] | 946 | ] |
710 | ] ; | 947 | ] ; |
711 | sp:variable | 948 | sp:variable |
712 | - [ sp:varName "facilityNameWithContext"^^xsd:string | 949 | + [ sp:varName "reportingFacilityType"^^xsd:string |
713 | ] | 950 | ] |
714 | ] [ rdf:type sp:Bind ; | 951 | ] [ rdf:type sp:Bind ; |
715 | sp:expression | 952 | sp:expression |
716 | - [ rdf:type fn:concat ; | 953 | + [ rdf:type ep-spin-lib:normalizeString ; |
717 | - sp:arg1 [ rdf:type ep-spin-lib:normalizeString ; | 954 | + sp:arg1 [ sp:varName "facilityName"^^xsd:string |
718 | - sp:arg1 [ sp:varName "namingSystem"^^xsd:string | ||
719 | - ] | ||
720 | - ] ; | ||
721 | - sp:arg2 "-" ; | ||
722 | - sp:arg3 [ rdf:type ep-spin-lib:normalizeString ; | ||
723 | - sp:arg1 [ sp:varName "facilityName"^^xsd:string | ||
724 | - ] | ||
725 | ] | 955 | ] |
726 | ] ; | 956 | ] ; |
727 | sp:variable | 957 | sp:variable |
728 | - [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | 958 | + [ sp:varName "normalizedfacilityName"^^xsd:string |
729 | ] | 959 | ] |
730 | ] [ rdf:type sp:Bind ; | 960 | ] [ rdf:type sp:Bind ; |
731 | sp:expression | 961 | sp:expression |
732 | - [ rdf:type ep-dpr-spin-lib:buildTerminalURI ; | 962 | + [ rdf:type ep-spin-lib:normalizeString ; |
733 | - sp:arg1 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | 963 | + sp:arg1 [ rdf:type spl:object ; |
964 | + sp:arg1 [ sp:varName "reportingFacilityType"^^xsd:string | ||
965 | + ] ; | ||
966 | + sp:arg2 rdfs:label | ||
734 | ] | 967 | ] |
735 | ] ; | 968 | ] ; |
736 | sp:variable | 969 | sp:variable |
737 | - [ sp:varName "terminal"^^xsd:string | 970 | + [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string |
738 | ] | 971 | ] |
739 | ] [ rdf:type sp:Bind ; | 972 | ] [ rdf:type sp:Bind ; |
740 | sp:expression | 973 | sp:expression |
741 | [ rdf:type fn:concat ; | 974 | [ rdf:type fn:concat ; |
742 | - sp:arg1 "terminal-" ; | 975 | + sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string |
743 | - sp:arg2 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string | 976 | + ] ; |
977 | + sp:arg2 "-" ; | ||
978 | + sp:arg3 [ sp:varName "normalizedFacilityName"^^xsd:string | ||
744 | ] | 979 | ] |
745 | ] ; | 980 | ] ; |
746 | sp:variable | 981 | sp:variable |
747 | [ sp:varName "facilityLabel"^^xsd:string | 982 | [ sp:varName "facilityLabel"^^xsd:string |
748 | ] | 983 | ] |
984 | + ] [ sp:object | ||
985 | + [ sp:varName "aFacilityIdentifierStructure"^^xsd:string | ||
986 | + ] ; | ||
987 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
988 | + sp:subject | ||
989 | + [ sp:varName "facility"^^xsd:string | ||
990 | + ] | ||
991 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ; | ||
992 | + sp:predicate rdf:type ; | ||
993 | + sp:subject | ||
994 | + [ sp:varName "aFacilityIdentifierStructure"^^xsd:string | ||
995 | + ] | ||
996 | + ] [ sp:object | ||
997 | + [ sp:varName "facilityLabel"^^xsd:string | ||
998 | + ] ; | ||
999 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
1000 | + sp:subject | ||
1001 | + [ sp:varName "aFacilityIdentifierStructure"^^xsd:string | ||
1002 | + ] | ||
749 | ]) | 1003 | ]) |
750 | ] ; | 1004 | ] ; |
751 | spin:rule | 1005 | spin:rule |
... | @@ -807,64 +1061,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ; | ... | @@ -807,64 +1061,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ; |
807 | ] ; | 1061 | ] ; |
808 | spin:rule | 1062 | spin:rule |
809 | [ rdf:type sp:Construct ; | 1063 | [ rdf:type sp:Construct ; |
810 | - rdfs:comment """STEP 00010 Record the Facility that has the flows - kind is \"licence\" | 1064 | + rdfs:comment """STEP 00011a Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal |
811 | -Nothing is done with the namingSystem!"""^^xsd:string ; | ||
812 | - sp:templates ([ sp:object spin:_this ; | ||
813 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
814 | - sp:subject | ||
815 | - [ sp:varName "licence"^^xsd:string | ||
816 | - ] | ||
817 | - ] [ sp:object | ||
818 | - [ sp:varName "licenceLabel"^^xsd:string | ||
819 | - ] ; | ||
820 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
821 | - sp:subject spin:_this | ||
822 | - ]) ; | ||
823 | - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ; | ||
824 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
825 | - sp:subject spin:_this | ||
826 | - ] [ sp:object | ||
827 | - [ sp:varName "licenceName"^^xsd:string | ||
828 | - ] ; | ||
829 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
830 | - sp:subject spin:_this | ||
831 | - ] [ rdf:type sp:NamedGraph ; | ||
832 | - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ; | ||
833 | - sp:predicate rdf:type ; | ||
834 | - sp:subject | ||
835 | - [ sp:varName "licence"^^xsd:string | ||
836 | - ] | ||
837 | - ] [ sp:object | ||
838 | - [ sp:varName "licenceName"^^xsd:string | ||
839 | - ] ; | ||
840 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
841 | - sp:subject | ||
842 | - [ sp:varName "licence"^^xsd:string | ||
843 | - ] | ||
844 | - ] [ sp:object | ||
845 | - [ sp:varName "licenceId"^^xsd:string | ||
846 | - ] ; | ||
847 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | ||
848 | - sp:subject | ||
849 | - [ sp:varName "livence"^^xsd:string | ||
850 | - ] | ||
851 | - ]) ; | ||
852 | - sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | ||
853 | - ] [ rdf:type sp:Bind ; | ||
854 | - sp:expression | ||
855 | - [ rdf:type fn:concat ; | ||
856 | - sp:arg1 "licence-" ; | ||
857 | - sp:arg2 [ sp:varName "licenceId"^^xsd:string | ||
858 | - ] | ||
859 | - ] ; | ||
860 | - sp:variable | ||
861 | - [ sp:varName "licenceLabel"^^xsd:string | ||
862 | - ] | ||
863 | - ]) | ||
864 | - ] ; | ||
865 | - spin:rule | ||
866 | - [ rdf:type sp:Construct ; | ||
867 | - rdfs:comment """STEP 00012a Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal | ||
868 | Naming system not supplied"""^^xsd:string ; | 1065 | Naming system not supplied"""^^xsd:string ; |
869 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; | 1066 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; |
870 | sp:predicate rdf:type ; | 1067 | sp:predicate rdf:type ; |
... | @@ -948,147 +1145,7 @@ Naming system not supplied"""^^xsd:string ; | ... | @@ -948,147 +1145,7 @@ Naming system not supplied"""^^xsd:string ; |
948 | ] ; | 1145 | ] ; |
949 | spin:rule | 1146 | spin:rule |
950 | [ rdf:type sp:Construct ; | 1147 | [ rdf:type sp:Construct ; |
951 | - rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility | 1148 | + rdfs:comment """STEP 00012c Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file |
952 | -Nothing is done with the namingSystem!"""^^xsd:string ; | ||
953 | - sp:templates ([ sp:object spin:_this ; | ||
954 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
955 | - sp:subject | ||
956 | - [ sp:varName "terminal"^^xsd:string | ||
957 | - ] | ||
958 | - ] [ sp:object | ||
959 | - [ sp:varName "terminalLabel"^^xsd:string | ||
960 | - ] ; | ||
961 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
962 | - sp:subject spin:_this | ||
963 | - ]) ; | ||
964 | - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; | ||
965 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
966 | - sp:subject spin:_this | ||
967 | - ] [ sp:object | ||
968 | - [ sp:varName "terminalName"^^xsd:string | ||
969 | - ] ; | ||
970 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
971 | - sp:subject spin:_this | ||
972 | - ] [ rdf:type sp:NamedGraph ; | ||
973 | - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ; | ||
974 | - sp:predicate rdf:type ; | ||
975 | - sp:subject | ||
976 | - [ sp:varName "terminal"^^xsd:string | ||
977 | - ] | ||
978 | - ] [ sp:object | ||
979 | - [ sp:varName "terminalName"^^xsd:string | ||
980 | - ] ; | ||
981 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
982 | - sp:subject | ||
983 | - [ sp:varName "terminal"^^xsd:string | ||
984 | - ] | ||
985 | - ] [ sp:object | ||
986 | - [ sp:varName "terminalId"^^xsd:string | ||
987 | - ] ; | ||
988 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | ||
989 | - sp:subject | ||
990 | - [ sp:varName "terminal"^^xsd:string | ||
991 | - ] | ||
992 | - ]) ; | ||
993 | - sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | ||
994 | - ] [ rdf:type sp:Bind ; | ||
995 | - sp:expression | ||
996 | - [ rdf:type fn:concat ; | ||
997 | - sp:arg1 "terminal-" ; | ||
998 | - sp:arg2 [ sp:varName "terminalId"^^xsd:string | ||
999 | - ] | ||
1000 | - ] ; | ||
1001 | - sp:variable | ||
1002 | - [ sp:varName "terminalLabel"^^xsd:string | ||
1003 | - ] | ||
1004 | - ]) | ||
1005 | - ] ; | ||
1006 | - spin:rule | ||
1007 | - [ rdf:type sp:Construct ; | ||
1008 | - rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc. | ||
1009 | -Nothing is done with the namingSystem!"""^^xsd:string ; | ||
1010 | - sp:templates ([ sp:object spin:_this ; | ||
1011 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1012 | - sp:subject | ||
1013 | - [ sp:varName "tuf"^^xsd:string | ||
1014 | - ] | ||
1015 | - ] [ sp:object | ||
1016 | - [ sp:varName "tufLabel"^^xsd:string | ||
1017 | - ] ; | ||
1018 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
1019 | - sp:subject spin:_this | ||
1020 | - ]) ; | ||
1021 | - sp:where ([ rdf:type sp:Union ; | ||
1022 | - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; | ||
1023 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1024 | - sp:subject spin:_this | ||
1025 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ; | ||
1026 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1027 | - sp:subject spin:_this | ||
1028 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ; | ||
1029 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1030 | - sp:subject spin:_this | ||
1031 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ; | ||
1032 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1033 | - sp:subject spin:_this | ||
1034 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ; | ||
1035 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1036 | - sp:subject spin:_this | ||
1037 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ; | ||
1038 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1039 | - sp:subject spin:_this | ||
1040 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ; | ||
1041 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1042 | - sp:subject spin:_this | ||
1043 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ; | ||
1044 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1045 | - sp:subject spin:_this | ||
1046 | - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ; | ||
1047 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1048 | - sp:subject spin:_this | ||
1049 | - ])) | ||
1050 | - ] [ sp:object | ||
1051 | - [ sp:varName "tufName"^^xsd:string | ||
1052 | - ] ; | ||
1053 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
1054 | - sp:subject spin:_this | ||
1055 | - ] [ rdf:type sp:NamedGraph ; | ||
1056 | - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ; | ||
1057 | - sp:predicate rdf:type ; | ||
1058 | - sp:subject | ||
1059 | - [ sp:varName "tuf"^^xsd:string | ||
1060 | - ] | ||
1061 | - ] [ sp:object | ||
1062 | - [ sp:varName "tufName"^^xsd:string | ||
1063 | - ] ; | ||
1064 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
1065 | - sp:subject | ||
1066 | - [ sp:varName "tuf"^^xsd:string | ||
1067 | - ] | ||
1068 | - ] [ sp:object | ||
1069 | - [ sp:varName "tufId"^^xsd:string | ||
1070 | - ] ; | ||
1071 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | ||
1072 | - sp:subject | ||
1073 | - [ sp:varName "tuf"^^xsd:string | ||
1074 | - ] | ||
1075 | - ]) ; | ||
1076 | - sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | ||
1077 | - ] [ rdf:type sp:Bind ; | ||
1078 | - sp:expression | ||
1079 | - [ rdf:type fn:concat ; | ||
1080 | - sp:arg1 "tuf-" ; | ||
1081 | - sp:arg2 [ sp:varName "tufId"^^xsd:string | ||
1082 | - ] | ||
1083 | - ] ; | ||
1084 | - sp:variable | ||
1085 | - [ sp:varName "tufLabel"^^xsd:string | ||
1086 | - ] | ||
1087 | - ]) | ||
1088 | - ] ; | ||
1089 | - spin:rule | ||
1090 | - [ rdf:type sp:Construct ; | ||
1091 | - rdfs:comment """STEP 00013 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file | ||
1092 | Naming system supplied | 1149 | Naming system supplied |
1093 | now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) . | 1150 | now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) . |
1094 | now context not in name"""^^xsd:string ; | 1151 | now context not in name"""^^xsd:string ; |
... | @@ -1101,7 +1158,7 @@ now context not in name"""^^xsd:string ; | ... | @@ -1101,7 +1158,7 @@ now context not in name"""^^xsd:string ; |
1101 | sp:predicate rdf:type ; | 1158 | sp:predicate rdf:type ; |
1102 | sp:subject _:b2 | 1159 | sp:subject _:b2 |
1103 | ] [ sp:object | 1160 | ] [ sp:object |
1104 | - [ sp:varName "facilityName"^^xsd:string | 1161 | + [ sp:varName "facilityNameWithContext"^^xsd:string |
1105 | ] ; | 1162 | ] ; |
1106 | sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | 1163 | sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; |
1107 | sp:subject _:b2 | 1164 | sp:subject _:b2 |
... | @@ -1200,66 +1257,9 @@ now context not in name"""^^xsd:string ; | ... | @@ -1200,66 +1257,9 @@ now context not in name"""^^xsd:string ; |
1200 | [ sp:varName "facilityLabel"^^xsd:string | 1257 | [ sp:varName "facilityLabel"^^xsd:string |
1201 | ] | 1258 | ] |
1202 | ]) | 1259 | ]) |
1203 | - ] ; | ||
1204 | - spin:rule | ||
1205 | - [ rdf:type sp:Construct ; | ||
1206 | - rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\" | ||
1207 | -Nothing is done with the namingSystem!"""^^xsd:string ; | ||
1208 | - sp:templates ([ sp:object spin:_this ; | ||
1209 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1210 | - sp:subject | ||
1211 | - [ sp:varName "wellBore"^^xsd:string | ||
1212 | - ] | ||
1213 | - ] [ sp:object | ||
1214 | - [ sp:varName "wellBoreLabel"^^xsd:string | ||
1215 | - ] ; | ||
1216 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
1217 | - sp:subject spin:_this | ||
1218 | - ]) ; | ||
1219 | - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ; | ||
1220 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
1221 | - sp:subject spin:_this | ||
1222 | - ] [ sp:object | ||
1223 | - [ sp:varName "wellBoreName"^^xsd:string | ||
1224 | - ] ; | ||
1225 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
1226 | - sp:subject spin:_this | ||
1227 | - ] [ rdf:type sp:NamedGraph ; | ||
1228 | - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; | ||
1229 | - sp:predicate rdf:type ; | ||
1230 | - sp:subject | ||
1231 | - [ sp:varName "wellBore"^^xsd:string | ||
1232 | - ] | ||
1233 | - ] [ sp:object | ||
1234 | - [ sp:varName "wellBoreName"^^xsd:string | ||
1235 | - ] ; | ||
1236 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
1237 | - sp:subject | ||
1238 | - [ sp:varName "wellBore"^^xsd:string | ||
1239 | - ] | ||
1240 | - ] [ sp:object | ||
1241 | - [ sp:varName "wellBoreId"^^xsd:string | ||
1242 | - ] ; | ||
1243 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | ||
1244 | - sp:subject | ||
1245 | - [ sp:varName "wellBore"^^xsd:string | ||
1246 | - ] | ||
1247 | - ]) ; | ||
1248 | - sp:graphNameNode <http://www.reportinghub.no/np/data/npd> | ||
1249 | - ] [ rdf:type sp:Bind ; | ||
1250 | - sp:expression | ||
1251 | - [ rdf:type fn:concat ; | ||
1252 | - sp:arg1 "wellbore-" ; | ||
1253 | - sp:arg2 [ sp:varName "wellBoreId"^^xsd:string | ||
1254 | - ] | ||
1255 | - ] ; | ||
1256 | - sp:variable | ||
1257 | - [ sp:varName "wellBoreLabel"^^xsd:string | ||
1258 | - ] | ||
1259 | - ]) | ||
1260 | ] . | 1260 | ] . |
1261 | 1261 | ||
1262 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1> | 1262 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1> |
1263 | rdf:type owl:Ontology ; | 1263 | rdf:type owl:Ontology ; |
1264 | - owl:imports <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ; | 1264 | + owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> ; |
1265 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | 1265 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | ... | ... |
... | @@ -61,11 +61,3 @@ | ... | @@ -61,11 +61,3 @@ |
61 | <http://www.reportinghub.no/np/data/npd/Field-5506919> ; | 61 | <http://www.reportinghub.no/np/data/npd/Field-5506919> ; |
62 | flowFacts:possibleTemporalPartName | 62 | flowFacts:possibleTemporalPartName |
63 | "OSL MEG TANK1 CONS MEAS CHEM"^^xsd:string , "OSL MEG TANK2 CONS MEAS CHEM"^^xsd:string . | 63 | "OSL MEG TANK1 CONS MEAS CHEM"^^xsd:string , "OSL MEG TANK2 CONS MEAS CHEM"^^xsd:string . |
64 | - | ||
65 | -<https://www.reportinghub.no/ep/data/tank/DONG$TK0420> | ||
66 | - rdf:type ep-eqt:Tank ; | ||
67 | - ep-core:name "TK0420"^^xsd:string . | ||
68 | - | ||
69 | -<https://www.reportinghub.no/ep/data/tank/DONG$TK0421> | ||
70 | - rdf:type ep-eqt:Tank ; | ||
71 | - ep-core:name "TK0421"^^xsd:string . | ... | ... |
-
Please register or login to post a comment