David Leal

Context removed from name of facilities not on fact pages

...@@ -21,280 +21,200 @@ ...@@ -21,280 +21,200 @@
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 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility 24 + rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
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 "platform"^^xsd:string 29 + [ sp:varName "company"^^xsd:string
30 ] 30 ]
31 ] [ sp:object 31 ] [ sp:object
32 - [ sp:varName "platformLabel"^^xsd:string 32 + [ sp:varName "companyLabel"^^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 ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ; 37 + sp:where ([ rdf:type sp:Union ;
38 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 38 + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
39 - sp:subject spin:_this 39 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
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 + ]))
40 ] [ sp:object 45 ] [ sp:object
41 - [ sp:varName "platformName"^^xsd:string 46 + [ sp:varName "companyName"^^xsd:string
42 ] ; 47 ] ;
43 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 48 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
44 sp:subject spin:_this 49 sp:subject spin:_this
45 ] [ rdf:type sp:NamedGraph ; 50 ] [ rdf:type sp:NamedGraph ;
46 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ; 51 + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
47 sp:predicate rdf:type ; 52 sp:predicate rdf:type ;
48 sp:subject 53 sp:subject
49 - [ sp:varName "platform"^^xsd:string 54 + [ sp:varName "company"^^xsd:string
50 ] 55 ]
51 ] [ sp:object 56 ] [ sp:object
52 - [ sp:varName "platformName"^^xsd:string 57 + [ sp:varName "companyName"^^xsd:string
53 ] ; 58 ] ;
54 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 59 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
55 sp:subject 60 sp:subject
56 - [ sp:varName "platform"^^xsd:string 61 + [ sp:varName "company"^^xsd:string
57 ] 62 ]
58 ] [ sp:object 63 ] [ sp:object
59 - [ sp:varName "platformId"^^xsd:string 64 + [ sp:varName "companyId"^^xsd:string
60 ] ; 65 ] ;
61 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 66 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
62 sp:subject 67 sp:subject
63 - [ sp:varName "platform"^^xsd:string 68 + [ sp:varName "company"^^xsd:string
64 ] 69 ]
65 ]) ; 70 ]) ;
66 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 71 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
67 ] [ rdf:type sp:Bind ; 72 ] [ rdf:type sp:Bind ;
68 sp:expression 73 sp:expression
69 [ rdf:type fn:concat ; 74 [ rdf:type fn:concat ;
70 - sp:arg1 "platform-" ; 75 + sp:arg1 "company-" ;
71 - sp:arg2 [ sp:varName "platformId"^^xsd:string 76 + sp:arg2 [ sp:varName "companyId"^^xsd:string
72 - ]
73 - ] ;
74 - sp:variable
75 - [ sp:varName "platformLabel"^^xsd:string
76 - ]
77 - ])
78 - ] ;
79 - spin:rule
80 - [ rdf:type sp:Construct ;
81 - rdfs:comment """STEP 00012a Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
82 -Naming system not supplied"""^^xsd:string ;
83 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
84 - sp:predicate rdf:type ;
85 - sp:subject
86 - [ sp:varName "terminal"^^xsd:string
87 - ]
88 - ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
89 - sp:predicate rdf:type ;
90 - sp:subject
91 - [ sp:varName "terminal"^^xsd:string
92 - ]
93 - ] [ sp:object
94 - [ sp:varName "facilityName"^^xsd:string
95 - ] ;
96 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
97 - sp:subject
98 - [ sp:varName "terminal"^^xsd:string
99 - ]
100 - ] [ sp:object spin:_this ;
101 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
102 - sp:subject
103 - [ sp:varName "terminal"^^xsd:string
104 - ]
105 - ] [ sp:object
106 - [ sp:varName "facilityLabel"^^xsd:string
107 - ] ;
108 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
109 - sp:subject spin:_this
110 - ]) ;
111 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
112 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
113 - sp:subject spin:_this
114 - ] [ sp:object
115 - [ sp:varName "facilityName"^^xsd:string
116 - ] ;
117 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
118 - sp:subject spin:_this
119 - ] [ rdf:type sp:NotExists ;
120 - sp:elements ([ sp:object
121 - [ sp:varName "namingSystem"^^xsd:string
122 - ] ;
123 - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
124 - sp:subject spin:_this
125 - ])
126 - ] [ rdf:type sp:NotExists ;
127 - sp:elements ([ sp:object spin:_this ;
128 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
129 - sp:subject
130 - [ sp:varName "something"^^xsd:string
131 - ]
132 - ])
133 - ] [ rdf:type sp:Bind ;
134 - sp:expression
135 - [ rdf:type ep-spin-lib:normalizeString ;
136 - sp:arg1 [ sp:varName "facilityName"^^xsd:string
137 - ]
138 - ] ;
139 - sp:variable
140 - [ sp:varName "normalizedfacilityName"^^xsd:string
141 - ]
142 - ] [ rdf:type sp:Bind ;
143 - sp:expression
144 - [ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
145 - sp:arg1 [ sp:varName "normalizedFacilityName"^^xsd:string
146 - ]
147 - ] ;
148 - sp:variable
149 - [ sp:varName "terminal"^^xsd:string
150 - ]
151 - ] [ rdf:type sp:Bind ;
152 - sp:expression
153 - [ rdf:type fn:concat ;
154 - sp:arg1 "terminal-" ;
155 - sp:arg2 [ sp:varName "normalizedFacilityName"^^xsd:string
156 ] 77 ]
157 ] ; 78 ] ;
158 sp:variable 79 sp:variable
159 - [ sp:varName "facilityLabel"^^xsd:string 80 + [ sp:varName "companyLabel"^^xsd:string
160 ] 81 ]
161 ]) 82 ])
162 ] ; 83 ] ;
163 spin:rule 84 spin:rule
164 [ rdf:type sp:Construct ; 85 [ rdf:type sp:Construct ;
165 - rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility 86 + rdfs:comment """STEP 00005 Record the Facility that has the flows - kind is \"well\"
166 Nothing is done with the namingSystem!"""^^xsd:string ; 87 Nothing is done with the namingSystem!"""^^xsd:string ;
167 sp:templates ([ sp:object spin:_this ; 88 sp:templates ([ sp:object spin:_this ;
168 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 89 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
169 sp:subject 90 sp:subject
170 - [ sp:varName "terminal"^^xsd:string 91 + [ sp:varName "well"^^xsd:string
171 ] 92 ]
172 ] [ sp:object 93 ] [ sp:object
173 - [ sp:varName "terminalLabel"^^xsd:string 94 + [ sp:varName "wellLabel"^^xsd:string
174 ] ; 95 ] ;
175 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 96 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
176 sp:subject spin:_this 97 sp:subject spin:_this
177 ]) ; 98 ]) ;
178 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; 99 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ;
179 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 100 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
180 sp:subject spin:_this 101 sp:subject spin:_this
181 ] [ sp:object 102 ] [ sp:object
182 - [ sp:varName "terminalName"^^xsd:string 103 + [ sp:varName "wellName"^^xsd:string
183 ] ; 104 ] ;
184 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 105 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
185 sp:subject spin:_this 106 sp:subject spin:_this
186 ] [ rdf:type sp:NamedGraph ; 107 ] [ rdf:type sp:NamedGraph ;
187 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ; 108 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
188 sp:predicate rdf:type ; 109 sp:predicate rdf:type ;
189 sp:subject 110 sp:subject
190 - [ sp:varName "terminal"^^xsd:string 111 + [ sp:varName "well"^^xsd:string
191 ] 112 ]
192 ] [ sp:object 113 ] [ sp:object
193 - [ sp:varName "terminalName"^^xsd:string 114 + [ sp:varName "wellName"^^xsd:string
194 ] ; 115 ] ;
195 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 116 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
196 sp:subject 117 sp:subject
197 - [ sp:varName "terminal"^^xsd:string 118 + [ sp:varName "well"^^xsd:string
198 ] 119 ]
199 ] [ sp:object 120 ] [ sp:object
200 - [ sp:varName "terminalId"^^xsd:string 121 + [ sp:varName "wellId"^^xsd:string
201 ] ; 122 ] ;
202 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 123 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
203 sp:subject 124 sp:subject
204 - [ sp:varName "terminal"^^xsd:string 125 + [ sp:varName "well"^^xsd:string
205 ] 126 ]
206 ]) ; 127 ]) ;
207 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 128 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
208 ] [ rdf:type sp:Bind ; 129 ] [ rdf:type sp:Bind ;
209 sp:expression 130 sp:expression
210 [ rdf:type fn:concat ; 131 [ rdf:type fn:concat ;
211 - sp:arg1 "terminal-" ; 132 + sp:arg1 "well-" ;
212 - sp:arg2 [ sp:varName "terminalId"^^xsd:string 133 + sp:arg2 [ sp:varName "wellId"^^xsd:string
213 ] 134 ]
214 ] ; 135 ] ;
215 sp:variable 136 sp:variable
216 - [ sp:varName "terminalLabel"^^xsd:string 137 + [ sp:varName "wellLabel"^^xsd:string
217 ] 138 ]
218 ]) 139 ])
219 ] ; 140 ] ;
220 spin:rule 141 spin:rule
221 [ rdf:type sp:Construct ; 142 [ rdf:type sp:Construct ;
222 - rdfs:comment """STEP 00005 Record the Facility that has the flows - kind is \"well\" 143 + rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc.
223 Nothing is done with the namingSystem!"""^^xsd:string ; 144 Nothing is done with the namingSystem!"""^^xsd:string ;
224 sp:templates ([ sp:object spin:_this ; 145 sp:templates ([ sp:object spin:_this ;
225 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 146 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
226 sp:subject 147 sp:subject
227 - [ sp:varName "well"^^xsd:string 148 + [ sp:varName "field"^^xsd:string
228 ] 149 ]
229 ] [ sp:object 150 ] [ sp:object
230 - [ sp:varName "wellLabel"^^xsd:string 151 + [ sp:varName "fieldLabel"^^xsd:string
231 ] ; 152 ] ;
232 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 153 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
233 sp:subject spin:_this 154 sp:subject spin:_this
234 ]) ; 155 ]) ;
235 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ; 156 + sp:where ([ rdf:type sp:Union ;
236 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 157 + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
237 - sp:subject spin:_this 158 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
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 + ]))
238 ] [ sp:object 170 ] [ sp:object
239 - [ sp:varName "wellName"^^xsd:string 171 + [ sp:varName "fieldName"^^xsd:string
240 ] ; 172 ] ;
241 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 173 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
242 sp:subject spin:_this 174 sp:subject spin:_this
243 ] [ rdf:type sp:NamedGraph ; 175 ] [ rdf:type sp:NamedGraph ;
244 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ; 176 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
245 sp:predicate rdf:type ; 177 sp:predicate rdf:type ;
246 sp:subject 178 sp:subject
247 - [ sp:varName "well"^^xsd:string 179 + [ sp:varName "field"^^xsd:string
248 ] 180 ]
249 ] [ sp:object 181 ] [ sp:object
250 - [ sp:varName "wellName"^^xsd:string 182 + [ sp:varName "fieldName"^^xsd:string
251 ] ; 183 ] ;
252 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 184 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
253 sp:subject 185 sp:subject
254 - [ sp:varName "well"^^xsd:string 186 + [ sp:varName "field"^^xsd:string
255 ] 187 ]
256 ] [ sp:object 188 ] [ sp:object
257 - [ sp:varName "wellId"^^xsd:string 189 + [ sp:varName "fieldId"^^xsd:string
258 ] ; 190 ] ;
259 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 191 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
260 sp:subject 192 sp:subject
261 - [ sp:varName "well"^^xsd:string 193 + [ sp:varName "field"^^xsd:string
262 ] 194 ]
263 ]) ; 195 ]) ;
264 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 196 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
265 ] [ rdf:type sp:Bind ; 197 ] [ rdf:type sp:Bind ;
266 sp:expression 198 sp:expression
267 [ rdf:type fn:concat ; 199 [ rdf:type fn:concat ;
268 - sp:arg1 "well-" ; 200 + sp:arg1 "field-" ;
269 - sp:arg2 [ sp:varName "wellId"^^xsd:string 201 + sp:arg2 [ sp:varName "fieldId"^^xsd:string
270 ] 202 ]
271 ] ; 203 ] ;
272 sp:variable 204 sp:variable
273 - [ sp:varName "wellLabel"^^xsd:string 205 + [ sp:varName "fieldLabel"^^xsd:string
274 ] 206 ]
275 ]) 207 ])
276 ] ; 208 ] ;
277 spin:rule 209 spin:rule
278 [ rdf:type sp:Construct ; 210 [ rdf:type sp:Construct ;
279 - rdfs:comment """STEP 00014 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file 211 + rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
280 -Naming system not supplied 212 +Naming system supplied"""^^xsd:string ;
281 -now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) AS ?facility) ."""^^xsd:string ; 213 + sp:templates ([ sp:object spin:_this ;
282 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
283 - sp:predicate rdf:type ;
284 - sp:subject _:b1
285 - ] [ sp:object
286 - [ sp:varName "reportingFacilityType"^^xsd:string
287 - ] ;
288 - sp:predicate rdf:type ;
289 - sp:subject _:b1
290 - ] [ sp:object
291 - [ sp:varName "facilityName"^^xsd:string
292 - ] ;
293 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
294 - sp:subject _:b1
295 - ] [ sp:object spin:_this ;
296 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 214 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
297 - sp:subject _:b1 215 + sp:subject
216 + [ sp:varName "facility"^^xsd:string
217 + ]
298 ] [ sp:object 218 ] [ sp:object
299 [ sp:varName "facilityLabel"^^xsd:string 219 [ sp:varName "facilityLabel"^^xsd:string
300 ] ; 220 ] ;
...@@ -313,13 +233,11 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) ...@@ -313,13 +233,11 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName)
313 ] ; 233 ] ;
314 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 234 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
315 sp:subject spin:_this 235 sp:subject spin:_this
316 - ] [ rdf:type sp:NotExists ; 236 + ] [ sp:object
317 - sp:elements ([ sp:object 237 + [ sp:varName "namingSystem"^^xsd:string
318 - [ sp:varName "namingSystem"^^xsd:string 238 + ] ;
319 - ] ; 239 + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
320 - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ; 240 + sp:subject spin:_this
321 - sp:subject spin:_this
322 - ])
323 ] [ rdf:type sp:NotExists ; 241 ] [ rdf:type sp:NotExists ;
324 sp:elements ([ sp:object spin:_this ; 242 sp:elements ([ sp:object spin:_this ;
325 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 243 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
...@@ -338,12 +256,31 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) ...@@ -338,12 +256,31 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName)
338 ] 256 ]
339 ] [ rdf:type sp:Bind ; 257 ] [ rdf:type sp:Bind ;
340 sp:expression 258 sp:expression
341 - [ rdf:type ep-spin-lib:normalizeString ; 259 + [ rdf:type fn:concat ;
342 - sp:arg1 [ sp:varName "facilityName"^^xsd:string 260 + sp:arg1 [ sp:varName "namingSystem"^^xsd:string
261 + ] ;
262 + sp:arg2 "$" ;
263 + sp:arg3 [ sp:varName "facilityName"^^xsd:string
343 ] 264 ]
344 ] ; 265 ] ;
345 sp:variable 266 sp:variable
346 - [ sp:varName "normalizedfacilityName"^^xsd:string 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
347 ] 284 ]
348 ] [ rdf:type sp:Bind ; 285 ] [ rdf:type sp:Bind ;
349 sp:expression 286 sp:expression
...@@ -363,210 +300,7 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) ...@@ -363,210 +300,7 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName)
363 sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string 300 sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
364 ] ; 301 ] ;
365 sp:arg2 "-" ; 302 sp:arg2 "-" ;
366 - sp:arg3 [ sp:varName "normalizedFacilityName"^^xsd:string 303 + sp:arg3 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
367 - ]
368 - ] ;
369 - sp:variable
370 - [ sp:varName "facilityLabel"^^xsd:string
371 - ]
372 - ])
373 - ] ;
374 - spin:rule
375 - [ rdf:type sp:Construct ;
376 - rdfs:comment """STEP 00012 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
377 -Naming system supplied"""^^xsd:string ;
378 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
379 - sp:predicate rdf:type ;
380 - sp:subject
381 - [ sp:varName "terminal"^^xsd:string
382 - ]
383 - ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
384 - sp:predicate rdf:type ;
385 - sp:subject
386 - [ sp:varName "terminal"^^xsd:string
387 - ]
388 - ] [ sp:object
389 - [ sp:varName "facilityName"^^xsd:string
390 - ] ;
391 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
392 - sp:subject
393 - [ sp:varName "terminal"^^xsd:string
394 - ]
395 - ] [ sp:object spin:_this ;
396 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
397 - sp:subject
398 - [ sp:varName "terminal"^^xsd:string
399 - ]
400 - ] [ sp:object
401 - [ sp:varName "facilityLabel"^^xsd:string
402 - ] ;
403 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
404 - sp:subject spin:_this
405 - ]) ;
406 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
407 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
408 - sp:subject spin:_this
409 - ] [ sp:object
410 - [ sp:varName "facilityName"^^xsd:string
411 - ] ;
412 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
413 - sp:subject spin:_this
414 - ] [ sp:object
415 - [ sp:varName "namingSystem"^^xsd:string
416 - ] ;
417 - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
418 - sp:subject spin:_this
419 - ] [ rdf:type sp:NotExists ;
420 - sp:elements ([ sp:object spin:_this ;
421 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
422 - sp:subject
423 - [ sp:varName "something"^^xsd:string
424 - ]
425 - ])
426 - ] [ rdf:type sp:Bind ;
427 - sp:expression
428 - [ rdf:type fn:concat ;
429 - sp:arg1 [ sp:varName "namingSystem"^^xsd:string
430 - ] ;
431 - sp:arg2 "$" ;
432 - sp:arg3 [ sp:varName "facilityName"^^xsd:string
433 - ]
434 - ] ;
435 - sp:variable
436 - [ sp:varName "facilityNameWithContext"^^xsd:string
437 - ]
438 - ] [ rdf:type sp:Bind ;
439 - sp:expression
440 - [ rdf:type fn:concat ;
441 - sp:arg1 [ rdf:type ep-spin-lib:normalizeString ;
442 - sp:arg1 [ sp:varName "namingSystem"^^xsd:string
443 - ]
444 - ] ;
445 - sp:arg2 "-" ;
446 - sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
447 - sp:arg1 [ sp:varName "facilityName"^^xsd:string
448 - ]
449 - ]
450 - ] ;
451 - sp:variable
452 - [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
453 - ]
454 - ] [ rdf:type sp:Bind ;
455 - sp:expression
456 - [ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
457 - sp:arg1 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
458 - ]
459 - ] ;
460 - sp:variable
461 - [ sp:varName "terminal"^^xsd:string
462 - ]
463 - ] [ rdf:type sp:Bind ;
464 - sp:expression
465 - [ rdf:type fn:concat ;
466 - sp:arg1 "terminal-" ;
467 - sp:arg2 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
468 - ]
469 - ] ;
470 - sp:variable
471 - [ sp:varName "facilityLabel"^^xsd:string
472 - ]
473 - ])
474 - ] ;
475 - spin:rule
476 - [ rdf:type sp:Construct ;
477 - rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
478 -Naming system supplied"""^^xsd:string ;
479 - sp:templates ([ sp:object spin:_this ;
480 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
481 - sp:subject
482 - [ sp:varName "facility"^^xsd:string
483 - ]
484 - ] [ sp:object
485 - [ sp:varName "facilityLabel"^^xsd:string
486 - ] ;
487 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
488 - sp:subject spin:_this
489 - ]) ;
490 - sp:where ([ rdf:type sp:Optional ;
491 - sp:elements ([ sp:object
492 - [ sp:varName "facilityKind"^^xsd:string
493 - ] ;
494 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
495 - sp:subject spin:_this
496 - ])
497 - ] [ sp:object
498 - [ sp:varName "facilityName"^^xsd:string
499 - ] ;
500 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
501 - sp:subject spin:_this
502 - ] [ sp:object
503 - [ sp:varName "namingSystem"^^xsd:string
504 - ] ;
505 - sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
506 - sp:subject spin:_this
507 - ] [ rdf:type sp:NotExists ;
508 - sp:elements ([ sp:object spin:_this ;
509 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
510 - sp:subject
511 - [ sp:varName "something"^^xsd:string
512 - ]
513 - ])
514 - ] [ rdf:type sp:Bind ;
515 - sp:expression
516 - [ rdf:type ep-mpr-spin-lib:selectReportingFacilityType ;
517 - sp:arg1 [ sp:varName "facilityKind"^^xsd:string
518 - ]
519 - ] ;
520 - sp:variable
521 - [ sp:varName "reportingFacilityType"^^xsd:string
522 - ]
523 - ] [ rdf:type sp:Bind ;
524 - sp:expression
525 - [ rdf:type fn:concat ;
526 - sp:arg1 [ sp:varName "namingSystem"^^xsd:string
527 - ] ;
528 - sp:arg2 "$" ;
529 - sp:arg3 [ sp:varName "facilityName"^^xsd:string
530 - ]
531 - ] ;
532 - sp:variable
533 - [ sp:varName "facilityNameWithContext"^^xsd:string
534 - ]
535 - ] [ rdf:type sp:Bind ;
536 - sp:expression
537 - [ rdf:type fn:concat ;
538 - sp:arg1 [ rdf:type ep-spin-lib:normalizeString ;
539 - sp:arg1 [ sp:varName "namingSystem"^^xsd:string
540 - ]
541 - ] ;
542 - sp:arg2 "-" ;
543 - sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
544 - sp:arg1 [ sp:varName "facilityName"^^xsd:string
545 - ]
546 - ]
547 - ] ;
548 - sp:variable
549 - [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
550 - ]
551 - ] [ rdf:type sp:Bind ;
552 - sp:expression
553 - [ rdf:type ep-spin-lib:normalizeString ;
554 - sp:arg1 [ rdf:type spl:object ;
555 - sp:arg1 [ sp:varName "reportingFacilityType"^^xsd:string
556 - ] ;
557 - sp:arg2 rdfs:label
558 - ]
559 - ] ;
560 - sp:variable
561 - [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
562 - ]
563 - ] [ rdf:type sp:Bind ;
564 - sp:expression
565 - [ rdf:type fn:concat ;
566 - sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
567 - ] ;
568 - sp:arg2 "-" ;
569 - sp:arg3 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
570 ] 304 ]
571 ] ; 305 ] ;
572 sp:variable 306 sp:variable
...@@ -595,7 +329,7 @@ Naming system supplied"""^^xsd:string ; ...@@ -595,7 +329,7 @@ Naming system supplied"""^^xsd:string ;
595 ] ; 329 ] ;
596 spin:rule 330 spin:rule
597 [ rdf:type sp:Construct ; 331 [ rdf:type sp:Construct ;
598 - rdfs:comment """STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility 332 + rdfs:comment """STEP 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility
599 Nothing is done with the namingSystem!"""^^xsd:string ; 333 Nothing is done with the namingSystem!"""^^xsd:string ;
600 sp:templates ([ sp:object spin:_this ; 334 sp:templates ([ sp:object spin:_this ;
601 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 335 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
...@@ -617,7 +351,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -617,7 +351,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
617 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 351 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
618 sp:subject spin:_this 352 sp:subject spin:_this
619 ] [ rdf:type sp:NamedGraph ; 353 ] [ rdf:type sp:NamedGraph ;
620 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ; 354 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ;
621 sp:predicate rdf:type ; 355 sp:predicate rdf:type ;
622 sp:subject 356 sp:subject
623 [ sp:varName "platform"^^xsd:string 357 [ sp:varName "platform"^^xsd:string
...@@ -652,141 +386,160 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -652,141 +386,160 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
652 ] ; 386 ] ;
653 spin:rule 387 spin:rule
654 [ rdf:type sp:Construct ; 388 [ rdf:type sp:Construct ;
655 - rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc. 389 + rdfs:comment """STEP 00014 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
656 -Nothing is done with the namingSystem!"""^^xsd:string ; 390 +Naming system not supplied
657 - sp:templates ([ sp:object spin:_this ; 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> ;
393 + sp:predicate rdf:type ;
394 + sp:subject _:b1
395 + ] [ sp:object
396 + [ sp:varName "reportingFacilityType"^^xsd:string
397 + ] ;
398 + sp:predicate rdf:type ;
399 + sp:subject _:b1
400 + ] [ sp:object
401 + [ sp:varName "facilityName"^^xsd:string
402 + ] ;
403 + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
404 + sp:subject _:b1
405 + ] [ sp:object spin:_this ;
658 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 406 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
659 - sp:subject 407 + sp:subject _:b1
660 - [ sp:varName "tuf"^^xsd:string
661 - ]
662 ] [ sp:object 408 ] [ sp:object
663 - [ sp:varName "tufLabel"^^xsd:string 409 + [ sp:varName "facilityLabel"^^xsd:string
664 ] ; 410 ] ;
665 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 411 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
666 sp:subject spin:_this 412 sp:subject spin:_this
667 ]) ; 413 ]) ;
668 - sp:where ([ rdf:type sp:Union ; 414 + sp:where ([ rdf:type sp:Optional ;
669 - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ; 415 + sp:elements ([ sp:object
670 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 416 + [ sp:varName "facilityKind"^^xsd:string
671 - sp:subject spin:_this 417 + ] ;
672 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ; 418 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
673 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 419 + sp:subject spin:_this
674 - sp:subject spin:_this 420 + ])
675 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ;
676 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
677 - sp:subject spin:_this
678 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ;
679 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
680 - sp:subject spin:_this
681 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ;
682 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
683 - sp:subject spin:_this
684 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ;
685 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
686 - sp:subject spin:_this
687 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ;
688 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
689 - sp:subject spin:_this
690 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ;
691 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
692 - sp:subject spin:_this
693 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ;
694 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
695 - sp:subject spin:_this
696 - ]))
697 ] [ sp:object 421 ] [ sp:object
698 - [ sp:varName "tufName"^^xsd:string 422 + [ sp:varName "facilityName"^^xsd:string
699 ] ; 423 ] ;
700 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 424 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
701 sp:subject spin:_this 425 sp:subject spin:_this
702 - ] [ rdf:type sp:NamedGraph ; 426 + ] [ rdf:type sp:NotExists ;
703 - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ; 427 + sp:elements ([ sp:object
704 - sp:predicate rdf:type ; 428 + [ sp:varName "namingSystem"^^xsd:string
705 - sp:subject
706 - [ sp:varName "tuf"^^xsd:string
707 - ]
708 - ] [ sp:object
709 - [ sp:varName "tufName"^^xsd:string
710 - ] ;
711 - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
712 - sp:subject
713 - [ sp:varName "tuf"^^xsd:string
714 - ]
715 - ] [ sp:object
716 - [ sp:varName "tufId"^^xsd:string
717 ] ; 429 ] ;
718 - sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 430 + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
431 + sp:subject spin:_this
432 + ])
433 + ] [ rdf:type sp:NotExists ;
434 + sp:elements ([ sp:object spin:_this ;
435 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
719 sp:subject 436 sp:subject
720 - [ sp:varName "tuf"^^xsd:string 437 + [ sp:varName "something"^^xsd:string
721 ] 438 ]
722 - ]) ; 439 + ])
723 - sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 440 + ] [ rdf:type sp:Bind ;
441 + sp:expression
442 + [ rdf:type ep-mpr-spin-lib:selectReportingFacilityType ;
443 + sp:arg1 [ sp:varName "facilityKind"^^xsd:string
444 + ]
445 + ] ;
446 + sp:variable
447 + [ sp:varName "reportingFacilityType"^^xsd:string
448 + ]
449 + ] [ rdf:type sp:Bind ;
450 + sp:expression
451 + [ rdf:type ep-spin-lib:normalizeString ;
452 + sp:arg1 [ sp:varName "facilityName"^^xsd:string
453 + ]
454 + ] ;
455 + sp:variable
456 + [ sp:varName "normalizedfacilityName"^^xsd:string
457 + ]
458 + ] [ rdf:type sp:Bind ;
459 + sp:expression
460 + [ rdf:type ep-spin-lib:normalizeString ;
461 + sp:arg1 [ rdf:type spl:object ;
462 + sp:arg1 [ sp:varName "reportingFacilityType"^^xsd:string
463 + ] ;
464 + sp:arg2 rdfs:label
465 + ]
466 + ] ;
467 + sp:variable
468 + [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
469 + ]
724 ] [ rdf:type sp:Bind ; 470 ] [ rdf:type sp:Bind ;
725 sp:expression 471 sp:expression
726 [ rdf:type fn:concat ; 472 [ rdf:type fn:concat ;
727 - sp:arg1 "tuf-" ; 473 + sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
728 - sp:arg2 [ sp:varName "tufId"^^xsd:string 474 + ] ;
475 + sp:arg2 "-" ;
476 + sp:arg3 [ sp:varName "normalizedFacilityName"^^xsd:string
729 ] 477 ]
730 ] ; 478 ] ;
731 sp:variable 479 sp:variable
732 - [ sp:varName "tufLabel"^^xsd:string 480 + [ sp:varName "facilityLabel"^^xsd:string
733 ] 481 ]
734 ]) 482 ])
735 ] ; 483 ] ;
736 spin:rule 484 spin:rule
737 [ rdf:type sp:Construct ; 485 [ rdf:type sp:Construct ;
738 - rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\" 486 + rdfs:comment """STEP 00009 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompany
739 Nothing is done with the namingSystem!"""^^xsd:string ; 487 Nothing is done with the namingSystem!"""^^xsd:string ;
740 sp:templates ([ sp:object spin:_this ; 488 sp:templates ([ sp:object spin:_this ;
741 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 489 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
742 sp:subject 490 sp:subject
743 - [ sp:varName "wellBore"^^xsd:string 491 + [ sp:varName "company"^^xsd:string
744 ] 492 ]
745 ] [ sp:object 493 ] [ sp:object
746 - [ sp:varName "wellBoreLabel"^^xsd:string 494 + [ sp:varName "companyLabel"^^xsd:string
747 ] ; 495 ] ;
748 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 496 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
749 sp:subject spin:_this 497 sp:subject spin:_this
750 ]) ; 498 ]) ;
751 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ; 499 + sp:where ([ rdf:type sp:Union ;
752 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 500 + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
753 - sp:subject spin:_this 501 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
502 + sp:subject spin:_this
503 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
504 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
505 + sp:subject spin:_this
506 + ]))
754 ] [ sp:object 507 ] [ sp:object
755 - [ sp:varName "wellBoreName"^^xsd:string 508 + [ sp:varName "companyName"^^xsd:string
756 ] ; 509 ] ;
757 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 510 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
758 sp:subject spin:_this 511 sp:subject spin:_this
759 ] [ rdf:type sp:NamedGraph ; 512 ] [ rdf:type sp:NamedGraph ;
760 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; 513 + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
761 sp:predicate rdf:type ; 514 sp:predicate rdf:type ;
762 sp:subject 515 sp:subject
763 - [ sp:varName "wellBore"^^xsd:string 516 + [ sp:varName "company"^^xsd:string
764 ] 517 ]
765 ] [ sp:object 518 ] [ sp:object
766 - [ sp:varName "wellBoreName"^^xsd:string 519 + [ sp:varName "companyName"^^xsd:string
767 ] ; 520 ] ;
768 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 521 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
769 sp:subject 522 sp:subject
770 - [ sp:varName "wellBore"^^xsd:string 523 + [ sp:varName "company"^^xsd:string
771 ] 524 ]
772 ] [ sp:object 525 ] [ sp:object
773 - [ sp:varName "wellBoreId"^^xsd:string 526 + [ sp:varName "companyId"^^xsd:string
774 ] ; 527 ] ;
775 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 528 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
776 sp:subject 529 sp:subject
777 - [ sp:varName "wellBore"^^xsd:string 530 + [ sp:varName "company"^^xsd:string
778 ] 531 ]
779 ]) ; 532 ]) ;
780 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 533 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
781 ] [ rdf:type sp:Bind ; 534 ] [ rdf:type sp:Bind ;
782 sp:expression 535 sp:expression
783 [ rdf:type fn:concat ; 536 [ rdf:type fn:concat ;
784 - sp:arg1 "wellbore-" ; 537 + sp:arg1 "company-" ;
785 - sp:arg2 [ sp:varName "wellBoreId"^^xsd:string 538 + sp:arg2 [ sp:varName "companyId"^^xsd:string
786 ] 539 ]
787 ] ; 540 ] ;
788 sp:variable 541 sp:variable
789 - [ sp:varName "wellBoreLabel"^^xsd:string 542 + [ sp:varName "companyLabel"^^xsd:string
790 ] 543 ]
791 ]) 544 ])
792 ] ; 545 ] ;
...@@ -896,250 +649,440 @@ Naming system not supplied"""^^xsd:string ; ...@@ -896,250 +649,440 @@ Naming system not supplied"""^^xsd:string ;
896 ] ; 649 ] ;
897 spin:rule 650 spin:rule
898 [ rdf:type sp:Construct ; 651 [ rdf:type sp:Construct ;
899 - rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany 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
653 +Naming system supplied"""^^xsd:string ;
654 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
655 + sp:predicate rdf:type ;
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
662 + [ sp:varName "terminal"^^xsd:string
663 + ]
664 + ] [ sp:object
665 + [ sp:varName "facilityName"^^xsd:string
666 + ] ;
667 + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
668 + sp:subject
669 + [ sp:varName "terminal"^^xsd:string
670 + ]
671 + ] [ sp:object spin:_this ;
672 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
673 + sp:subject
674 + [ sp:varName "terminal"^^xsd:string
675 + ]
676 + ] [ sp:object
677 + [ sp:varName "facilityLabel"^^xsd:string
678 + ] ;
679 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
680 + sp:subject spin:_this
681 + ]) ;
682 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
683 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
684 + sp:subject spin:_this
685 + ] [ sp:object
686 + [ sp:varName "facilityName"^^xsd:string
687 + ] ;
688 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
689 + sp:subject spin:_this
690 + ] [ sp:object
691 + [ sp:varName "namingSystem"^^xsd:string
692 + ] ;
693 + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
694 + sp:subject spin:_this
695 + ] [ rdf:type sp:NotExists ;
696 + sp:elements ([ sp:object spin:_this ;
697 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
698 + sp:subject
699 + [ sp:varName "something"^^xsd:string
700 + ]
701 + ])
702 + ] [ rdf:type sp:Bind ;
703 + sp:expression
704 + [ rdf:type fn:concat ;
705 + sp:arg1 [ sp:varName "namingSystem"^^xsd:string
706 + ] ;
707 + sp:arg2 "$" ;
708 + sp:arg3 [ sp:varName "facilityName"^^xsd:string
709 + ]
710 + ] ;
711 + sp:variable
712 + [ sp:varName "facilityNameWithContext"^^xsd:string
713 + ]
714 + ] [ rdf:type sp:Bind ;
715 + sp:expression
716 + [ rdf:type fn:concat ;
717 + sp:arg1 [ rdf:type ep-spin-lib:normalizeString ;
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 + ]
726 + ] ;
727 + sp:variable
728 + [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
729 + ]
730 + ] [ rdf:type sp:Bind ;
731 + sp:expression
732 + [ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
733 + sp:arg1 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
734 + ]
735 + ] ;
736 + sp:variable
737 + [ sp:varName "terminal"^^xsd:string
738 + ]
739 + ] [ rdf:type sp:Bind ;
740 + sp:expression
741 + [ rdf:type fn:concat ;
742 + sp:arg1 "terminal-" ;
743 + sp:arg2 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
744 + ]
745 + ] ;
746 + sp:variable
747 + [ sp:varName "facilityLabel"^^xsd:string
748 + ]
749 + ])
750 + ] ;
751 + spin:rule
752 + [ rdf:type sp:Construct ;
753 + rdfs:comment """STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility
900 Nothing is done with the namingSystem!"""^^xsd:string ; 754 Nothing is done with the namingSystem!"""^^xsd:string ;
901 sp:templates ([ sp:object spin:_this ; 755 sp:templates ([ sp:object spin:_this ;
902 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 756 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
903 sp:subject 757 sp:subject
904 - [ sp:varName "company"^^xsd:string 758 + [ sp:varName "platform"^^xsd:string
905 ] 759 ]
906 ] [ sp:object 760 ] [ sp:object
907 - [ sp:varName "companyLabel"^^xsd:string 761 + [ sp:varName "platformLabel"^^xsd:string
908 ] ; 762 ] ;
909 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 763 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
910 sp:subject spin:_this 764 sp:subject spin:_this
911 ]) ; 765 ]) ;
912 - sp:where ([ rdf:type sp:Union ; 766 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
913 - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ; 767 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
914 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 768 + sp:subject spin:_this
915 - sp:subject spin:_this 769 + ] [ sp:object
916 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ; 770 + [ sp:varName "platformName"^^xsd:string
917 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 771 + ] ;
918 - sp:subject spin:_this 772 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
919 - ])) 773 + sp:subject spin:_this
774 + ] [ rdf:type sp:NamedGraph ;
775 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
776 + sp:predicate rdf:type ;
777 + sp:subject
778 + [ sp:varName "platform"^^xsd:string
779 + ]
780 + ] [ sp:object
781 + [ sp:varName "platformName"^^xsd:string
782 + ] ;
783 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
784 + sp:subject
785 + [ sp:varName "platform"^^xsd:string
786 + ]
787 + ] [ sp:object
788 + [ sp:varName "platformId"^^xsd:string
789 + ] ;
790 + sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
791 + sp:subject
792 + [ sp:varName "platform"^^xsd:string
793 + ]
794 + ]) ;
795 + sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
796 + ] [ rdf:type sp:Bind ;
797 + sp:expression
798 + [ rdf:type fn:concat ;
799 + sp:arg1 "platform-" ;
800 + sp:arg2 [ sp:varName "platformId"^^xsd:string
801 + ]
802 + ] ;
803 + sp:variable
804 + [ sp:varName "platformLabel"^^xsd:string
805 + ]
806 + ])
807 + ] ;
808 + spin:rule
809 + [ rdf:type sp:Construct ;
810 + rdfs:comment """STEP 00010 Record the Facility that has the flows - kind is \"licence\"
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
920 ] [ sp:object 826 ] [ sp:object
921 - [ sp:varName "companyName"^^xsd:string 827 + [ sp:varName "licenceName"^^xsd:string
922 ] ; 828 ] ;
923 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 829 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
924 sp:subject spin:_this 830 sp:subject spin:_this
925 ] [ rdf:type sp:NamedGraph ; 831 ] [ rdf:type sp:NamedGraph ;
926 - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ; 832 + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ;
927 sp:predicate rdf:type ; 833 sp:predicate rdf:type ;
928 sp:subject 834 sp:subject
929 - [ sp:varName "company"^^xsd:string 835 + [ sp:varName "licence"^^xsd:string
930 ] 836 ]
931 ] [ sp:object 837 ] [ sp:object
932 - [ sp:varName "companyName"^^xsd:string 838 + [ sp:varName "licenceName"^^xsd:string
933 ] ; 839 ] ;
934 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 840 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
935 sp:subject 841 sp:subject
936 - [ sp:varName "company"^^xsd:string 842 + [ sp:varName "licence"^^xsd:string
937 ] 843 ]
938 ] [ sp:object 844 ] [ sp:object
939 - [ sp:varName "companyId"^^xsd:string 845 + [ sp:varName "licenceId"^^xsd:string
940 ] ; 846 ] ;
941 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 847 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
942 sp:subject 848 sp:subject
943 - [ sp:varName "company"^^xsd:string 849 + [ sp:varName "livence"^^xsd:string
944 ] 850 ]
945 ]) ; 851 ]) ;
946 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 852 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
947 ] [ rdf:type sp:Bind ; 853 ] [ rdf:type sp:Bind ;
948 sp:expression 854 sp:expression
949 [ rdf:type fn:concat ; 855 [ rdf:type fn:concat ;
950 - sp:arg1 "company-" ; 856 + sp:arg1 "licence-" ;
951 - sp:arg2 [ sp:varName "companyId"^^xsd:string 857 + sp:arg2 [ sp:varName "licenceId"^^xsd:string
952 ] 858 ]
953 ] ; 859 ] ;
954 sp:variable 860 sp:variable
955 - [ sp:varName "companyLabel"^^xsd:string 861 + [ sp:varName "licenceLabel"^^xsd:string
956 ] 862 ]
957 ]) 863 ])
958 ] ; 864 ] ;
959 spin:rule 865 spin:rule
960 [ rdf:type sp:Construct ; 866 [ rdf:type sp:Construct ;
961 - rdfs:comment """STEP 00009 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompany 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
962 -Nothing is done with the namingSystem!"""^^xsd:string ; 868 +Naming system not supplied"""^^xsd:string ;
963 - sp:templates ([ sp:object spin:_this ; 869 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
870 + sp:predicate rdf:type ;
871 + sp:subject
872 + [ sp:varName "terminal"^^xsd:string
873 + ]
874 + ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
875 + sp:predicate rdf:type ;
876 + sp:subject
877 + [ sp:varName "terminal"^^xsd:string
878 + ]
879 + ] [ sp:object
880 + [ sp:varName "facilityName"^^xsd:string
881 + ] ;
882 + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
883 + sp:subject
884 + [ sp:varName "terminal"^^xsd:string
885 + ]
886 + ] [ sp:object spin:_this ;
964 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 887 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
965 sp:subject 888 sp:subject
966 - [ sp:varName "company"^^xsd:string 889 + [ sp:varName "terminal"^^xsd:string
967 ] 890 ]
968 ] [ sp:object 891 ] [ sp:object
969 - [ sp:varName "companyLabel"^^xsd:string 892 + [ sp:varName "facilityLabel"^^xsd:string
970 ] ; 893 ] ;
971 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 894 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
972 sp:subject spin:_this 895 sp:subject spin:_this
973 ]) ; 896 ]) ;
974 - sp:where ([ rdf:type sp:Union ; 897 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
975 - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ; 898 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
976 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 899 + sp:subject spin:_this
977 - sp:subject spin:_this
978 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
979 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
980 - sp:subject spin:_this
981 - ]))
982 ] [ sp:object 900 ] [ sp:object
983 - [ sp:varName "companyName"^^xsd:string 901 + [ sp:varName "facilityName"^^xsd:string
984 ] ; 902 ] ;
985 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 903 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
986 sp:subject spin:_this 904 sp:subject spin:_this
987 - ] [ rdf:type sp:NamedGraph ; 905 + ] [ rdf:type sp:NotExists ;
988 - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ; 906 + sp:elements ([ sp:object
989 - sp:predicate rdf:type ; 907 + [ sp:varName "namingSystem"^^xsd:string
990 - sp:subject
991 - [ sp:varName "company"^^xsd:string
992 - ]
993 - ] [ sp:object
994 - [ sp:varName "companyName"^^xsd:string
995 - ] ;
996 - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
997 - sp:subject
998 - [ sp:varName "company"^^xsd:string
999 - ]
1000 - ] [ sp:object
1001 - [ sp:varName "companyId"^^xsd:string
1002 ] ; 908 ] ;
1003 - sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 909 + sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
910 + sp:subject spin:_this
911 + ])
912 + ] [ rdf:type sp:NotExists ;
913 + sp:elements ([ sp:object spin:_this ;
914 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
1004 sp:subject 915 sp:subject
1005 - [ sp:varName "company"^^xsd:string 916 + [ sp:varName "something"^^xsd:string
1006 ] 917 ]
1007 - ]) ; 918 + ])
1008 - sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 919 + ] [ rdf:type sp:Bind ;
920 + sp:expression
921 + [ rdf:type ep-spin-lib:normalizeString ;
922 + sp:arg1 [ sp:varName "facilityName"^^xsd:string
923 + ]
924 + ] ;
925 + sp:variable
926 + [ sp:varName "normalizedfacilityName"^^xsd:string
927 + ]
928 + ] [ rdf:type sp:Bind ;
929 + sp:expression
930 + [ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
931 + sp:arg1 [ sp:varName "normalizedFacilityName"^^xsd:string
932 + ]
933 + ] ;
934 + sp:variable
935 + [ sp:varName "terminal"^^xsd:string
936 + ]
1009 ] [ rdf:type sp:Bind ; 937 ] [ rdf:type sp:Bind ;
1010 sp:expression 938 sp:expression
1011 [ rdf:type fn:concat ; 939 [ rdf:type fn:concat ;
1012 - sp:arg1 "company-" ; 940 + sp:arg1 "terminal-" ;
1013 - sp:arg2 [ sp:varName "companyId"^^xsd:string 941 + sp:arg2 [ sp:varName "normalizedFacilityName"^^xsd:string
1014 ] 942 ]
1015 ] ; 943 ] ;
1016 sp:variable 944 sp:variable
1017 - [ sp:varName "companyLabel"^^xsd:string 945 + [ sp:varName "facilityLabel"^^xsd:string
1018 ] 946 ]
1019 ]) 947 ])
1020 ] ; 948 ] ;
1021 spin:rule 949 spin:rule
1022 [ rdf:type sp:Construct ; 950 [ rdf:type sp:Construct ;
1023 - rdfs:comment """STEP 00010 Record the Facility that has the flows - kind is \"licence\" 951 + rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility
1024 Nothing is done with the namingSystem!"""^^xsd:string ; 952 Nothing is done with the namingSystem!"""^^xsd:string ;
1025 sp:templates ([ sp:object spin:_this ; 953 sp:templates ([ sp:object spin:_this ;
1026 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 954 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
1027 sp:subject 955 sp:subject
1028 - [ sp:varName "licence"^^xsd:string 956 + [ sp:varName "terminal"^^xsd:string
1029 ] 957 ]
1030 ] [ sp:object 958 ] [ sp:object
1031 - [ sp:varName "licenceLabel"^^xsd:string 959 + [ sp:varName "terminalLabel"^^xsd:string
1032 ] ; 960 ] ;
1033 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 961 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
1034 sp:subject spin:_this 962 sp:subject spin:_this
1035 ]) ; 963 ]) ;
1036 - sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ; 964 + sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
1037 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 965 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
1038 sp:subject spin:_this 966 sp:subject spin:_this
1039 ] [ sp:object 967 ] [ sp:object
1040 - [ sp:varName "licenceName"^^xsd:string 968 + [ sp:varName "terminalName"^^xsd:string
1041 ] ; 969 ] ;
1042 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 970 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
1043 sp:subject spin:_this 971 sp:subject spin:_this
1044 ] [ rdf:type sp:NamedGraph ; 972 ] [ rdf:type sp:NamedGraph ;
1045 - sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ; 973 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
1046 sp:predicate rdf:type ; 974 sp:predicate rdf:type ;
1047 sp:subject 975 sp:subject
1048 - [ sp:varName "licence"^^xsd:string 976 + [ sp:varName "terminal"^^xsd:string
1049 ] 977 ]
1050 ] [ sp:object 978 ] [ sp:object
1051 - [ sp:varName "licenceName"^^xsd:string 979 + [ sp:varName "terminalName"^^xsd:string
1052 ] ; 980 ] ;
1053 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 981 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
1054 sp:subject 982 sp:subject
1055 - [ sp:varName "licence"^^xsd:string 983 + [ sp:varName "terminal"^^xsd:string
1056 ] 984 ]
1057 ] [ sp:object 985 ] [ sp:object
1058 - [ sp:varName "licenceId"^^xsd:string 986 + [ sp:varName "terminalId"^^xsd:string
1059 ] ; 987 ] ;
1060 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 988 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
1061 sp:subject 989 sp:subject
1062 - [ sp:varName "livence"^^xsd:string 990 + [ sp:varName "terminal"^^xsd:string
1063 ] 991 ]
1064 ]) ; 992 ]) ;
1065 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 993 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
1066 ] [ rdf:type sp:Bind ; 994 ] [ rdf:type sp:Bind ;
1067 sp:expression 995 sp:expression
1068 [ rdf:type fn:concat ; 996 [ rdf:type fn:concat ;
1069 - sp:arg1 "licence-" ; 997 + sp:arg1 "terminal-" ;
1070 - sp:arg2 [ sp:varName "licenceId"^^xsd:string 998 + sp:arg2 [ sp:varName "terminalId"^^xsd:string
1071 ] 999 ]
1072 ] ; 1000 ] ;
1073 sp:variable 1001 sp:variable
1074 - [ sp:varName "licenceLabel"^^xsd:string 1002 + [ sp:varName "terminalLabel"^^xsd:string
1075 ] 1003 ]
1076 ]) 1004 ])
1077 ] ; 1005 ] ;
1078 spin:rule 1006 spin:rule
1079 [ rdf:type sp:Construct ; 1007 [ rdf:type sp:Construct ;
1080 - rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc. 1008 + rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc.
1081 Nothing is done with the namingSystem!"""^^xsd:string ; 1009 Nothing is done with the namingSystem!"""^^xsd:string ;
1082 sp:templates ([ sp:object spin:_this ; 1010 sp:templates ([ sp:object spin:_this ;
1083 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 1011 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
1084 sp:subject 1012 sp:subject
1085 - [ sp:varName "field"^^xsd:string 1013 + [ sp:varName "tuf"^^xsd:string
1086 ] 1014 ]
1087 ] [ sp:object 1015 ] [ sp:object
1088 - [ sp:varName "fieldLabel"^^xsd:string 1016 + [ sp:varName "tufLabel"^^xsd:string
1089 ] ; 1017 ] ;
1090 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; 1018 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
1091 sp:subject spin:_this 1019 sp:subject spin:_this
1092 ]) ; 1020 ]) ;
1093 sp:where ([ rdf:type sp:Union ; 1021 sp:where ([ rdf:type sp:Union ;
1094 - sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; 1022 + sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
1095 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 1023 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
1096 sp:subject spin:_this 1024 sp:subject spin:_this
1097 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ; 1025 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ;
1098 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 1026 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
1099 sp:subject spin:_this 1027 sp:subject spin:_this
1100 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ; 1028 + ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ;
1101 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 1029 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
1102 sp:subject spin:_this 1030 sp:subject spin:_this
1103 - ]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ; 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> ;
1104 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 1047 sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
1105 sp:subject spin:_this 1048 sp:subject spin:_this
1106 ])) 1049 ]))
1107 ] [ sp:object 1050 ] [ sp:object
1108 - [ sp:varName "fieldName"^^xsd:string 1051 + [ sp:varName "tufName"^^xsd:string
1109 ] ; 1052 ] ;
1110 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 1053 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
1111 sp:subject spin:_this 1054 sp:subject spin:_this
1112 ] [ rdf:type sp:NamedGraph ; 1055 ] [ rdf:type sp:NamedGraph ;
1113 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ; 1056 + sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ;
1114 sp:predicate rdf:type ; 1057 sp:predicate rdf:type ;
1115 sp:subject 1058 sp:subject
1116 - [ sp:varName "field"^^xsd:string 1059 + [ sp:varName "tuf"^^xsd:string
1117 ] 1060 ]
1118 ] [ sp:object 1061 ] [ sp:object
1119 - [ sp:varName "fieldName"^^xsd:string 1062 + [ sp:varName "tufName"^^xsd:string
1120 ] ; 1063 ] ;
1121 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 1064 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
1122 sp:subject 1065 sp:subject
1123 - [ sp:varName "field"^^xsd:string 1066 + [ sp:varName "tuf"^^xsd:string
1124 ] 1067 ]
1125 ] [ sp:object 1068 ] [ sp:object
1126 - [ sp:varName "fieldId"^^xsd:string 1069 + [ sp:varName "tufId"^^xsd:string
1127 ] ; 1070 ] ;
1128 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 1071 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
1129 sp:subject 1072 sp:subject
1130 - [ sp:varName "field"^^xsd:string 1073 + [ sp:varName "tuf"^^xsd:string
1131 ] 1074 ]
1132 ]) ; 1075 ]) ;
1133 sp:graphNameNode <http://www.reportinghub.no/np/data/npd> 1076 sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
1134 ] [ rdf:type sp:Bind ; 1077 ] [ rdf:type sp:Bind ;
1135 sp:expression 1078 sp:expression
1136 [ rdf:type fn:concat ; 1079 [ rdf:type fn:concat ;
1137 - sp:arg1 "field-" ; 1080 + sp:arg1 "tuf-" ;
1138 - sp:arg2 [ sp:varName "fieldId"^^xsd:string 1081 + sp:arg2 [ sp:varName "tufId"^^xsd:string
1139 ] 1082 ]
1140 ] ; 1083 ] ;
1141 sp:variable 1084 sp:variable
1142 - [ sp:varName "fieldLabel"^^xsd:string 1085 + [ sp:varName "tufLabel"^^xsd:string
1143 ] 1086 ]
1144 ]) 1087 ])
1145 ] ; 1088 ] ;
...@@ -1147,7 +1090,8 @@ Nothing is done with the namingSystem!"""^^xsd:string ; ...@@ -1147,7 +1090,8 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
1147 [ rdf:type sp:Construct ; 1090 [ rdf:type sp:Construct ;
1148 rdfs:comment """STEP 00013 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file 1091 rdfs:comment """STEP 00013 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
1149 Naming system supplied 1092 Naming system supplied
1150 -now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) ."""^^xsd:string ; 1093 +now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) .
1094 +now context not in name"""^^xsd:string ;
1151 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; 1095 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
1152 sp:predicate rdf:type ; 1096 sp:predicate rdf:type ;
1153 sp:subject _:b2 1097 sp:subject _:b2
...@@ -1157,7 +1101,7 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?faci ...@@ -1157,7 +1101,7 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?faci
1157 sp:predicate rdf:type ; 1101 sp:predicate rdf:type ;
1158 sp:subject _:b2 1102 sp:subject _:b2
1159 ] [ sp:object 1103 ] [ sp:object
1160 - [ sp:varName "facilityNameWithContext"^^xsd:string 1104 + [ sp:varName "facilityName"^^xsd:string
1161 ] ; 1105 ] ;
1162 sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; 1106 sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
1163 sp:subject _:b2 1107 sp:subject _:b2
...@@ -1256,9 +1200,66 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?faci ...@@ -1256,9 +1200,66 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?faci
1256 [ sp:varName "facilityLabel"^^xsd:string 1200 [ sp:varName "facilityLabel"^^xsd:string
1257 ] 1201 ]
1258 ]) 1202 ])
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 + ])
1259 ] . 1260 ] .
1260 1261
1261 <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>
1262 rdf:type owl:Ontology ; 1263 rdf:type owl:Ontology ;
1263 - 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> ; 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:versionInfo "Created with TopBraid Composer"^^xsd:string . 1265 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......