David Leal

A fix to the duplicate ProductionInventory bug, but not nice.

...@@ -21,358 +21,51 @@ ...@@ -21,358 +21,51 @@
21 <http://www.epim.no/schemas/mprml/1#A_Global-Objects> 21 <http://www.epim.no/schemas/mprml/1#A_Global-Objects>
22 spin:rule 22 spin:rule
23 [ rdf:type sp:Construct ; 23 [ rdf:type sp:Construct ;
24 - rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ; 24 + rdfs:comment "STEP 20012 Create the period ProductionInventory and the ProductionInventoryToDate - if necessary ."^^xsd:string ;
25 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ; 25 + sp:templates ([ sp:object _:b1 ;
26 - sp:predicate rdf:type ;
27 - sp:subject _:b1
28 - ] [ sp:object
29 - [ sp:varName "productionReport"^^xsd:string
30 - ] ;
31 - sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
32 - sp:subject _:b1
33 - ] [ sp:object
34 - [ sp:varName "name"^^xsd:string
35 - ] ;
36 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
37 - sp:subject _:b1
38 - ] [ sp:object
39 - [ sp:varName "reportPeriodType"^^xsd:string
40 - ] ;
41 - sp:predicate rdf:type ;
42 - sp:subject _:b1
43 - ] [ sp:object
44 - [ sp:varName "productVolumeRef"^^xsd:string
45 - ] ;
46 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
47 - sp:subject _:b1
48 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
49 - sp:predicate rdf:type ;
50 - sp:subject _:b2
51 - ] [ sp:object
52 - [ sp:varName "productVolumeRef"^^xsd:string
53 - ] ;
54 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
55 - sp:subject _:b2
56 - ] [ sp:object _:b3 ;
57 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
58 - sp:subject _:b2
59 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
60 - sp:predicate rdf:type ;
61 - sp:subject _:b3
62 - ] [ sp:object
63 - [] ;
64 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
65 - sp:subject _:b2
66 - ] [ sp:object
67 - [] ;
68 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
69 - sp:subject _:b3
70 - ] [ sp:object
71 - [ sp:varName "title"^^xsd:string
72 - ] ;
73 - sp:predicate <http://purl.org/dc/elements/1.1/title> ;
74 - sp:subject _:b1
75 - ]) ;
76 - sp:where ([ sp:object spin:_this ;
77 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
78 - sp:subject
79 - [ sp:varName "productionReport"^^xsd:string
80 - ]
81 - ] [ sp:object
82 - [ sp:varName "productVolumeRef"^^xsd:string
83 - ] ;
84 - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
85 - sp:subject spin:_this
86 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
87 - sp:predicate rdf:type ;
88 - sp:subject
89 - [ sp:varName "productVolumeRef"^^xsd:string
90 - ]
91 - ] [ sp:object
92 - [ sp:varName "nameRef"^^xsd:string
93 - ] ;
94 - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
95 - sp:subject
96 - [ sp:varName "productVolumeRef"^^xsd:string
97 - ]
98 - ] [ sp:object
99 - [ sp:varName "name"^^xsd:string
100 - ] ;
101 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
102 - sp:subject
103 - [ sp:varName "nameRef"^^xsd:string
104 - ]
105 - ] [ rdf:type sp:Optional ;
106 - sp:elements ([ sp:object
107 - [ sp:varName "periodKindRef"^^xsd:string
108 - ] ;
109 - sp:predicate <http://www.epim.no/schemas/mprml/1#periodKindRef> ;
110 - sp:subject
111 - [ sp:varName "productVolumeRef"^^xsd:string
112 - ]
113 - ])
114 - ] [ rdf:type sp:Optional ;
115 - sp:elements ([ sp:object
116 - [ sp:varName "titleRef"^^xsd:string
117 - ] ;
118 - sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
119 - sp:subject
120 - [ sp:varName "productVolumeRef"^^xsd:string
121 - ]
122 - ] [ sp:object
123 - [ sp:varName "title"^^xsd:string
124 - ] ;
125 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
126 - sp:subject
127 - [ sp:varName "titleRef"^^xsd:string
128 - ]
129 - ])
130 - ] [ rdf:type sp:Bind ;
131 - sp:expression
132 - [ rdf:type ep-mpr-spin-lib:selectReportPeriodType ;
133 - sp:arg1 [ sp:varName "periodKindRef"^^xsd:string
134 - ]
135 - ] ;
136 - sp:variable
137 - [ sp:varName "reportPeriodType"^^xsd:string
138 - ]
139 - ])
140 - ] ;
141 - spin:rule
142 - [ rdf:type sp:Construct ;
143 - rdfs:comment "STEP 20011 Create the period ProductionFlow and the ProductionFlowToDate - if necessary ."^^xsd:string ;
144 - sp:templates ([ sp:object _:b4 ;
145 sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; 26 sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
146 sp:subject 27 sp:subject
147 [ sp:varName "productVolumeReport"^^xsd:string 28 [ sp:varName "productVolumeReport"^^xsd:string
148 ] 29 ]
149 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; 30 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
150 sp:predicate rdf:type ; 31 sp:predicate rdf:type ;
151 - sp:subject _:b4 32 + sp:subject _:b1
152 ] [ sp:object 33 ] [ sp:object
153 [ sp:varName "productVolumeRef"^^xsd:string 34 [ sp:varName "productVolumeRef"^^xsd:string
154 ] ; 35 ] ;
155 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 36 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
156 - sp:subject _:b4 37 + sp:subject _:b1
157 - ] [ sp:object _:b5 ; 38 + ] [ sp:object _:b2 ;
158 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 39 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
159 - sp:subject _:b4 40 + sp:subject _:b1
160 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ; 41 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
161 - sp:predicate rdf:type ;
162 - sp:subject _:b5
163 - ] [ sp:object _:b4 ;
164 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
165 - sp:subject
166 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
167 - ]
168 - ] [ sp:object _:b5 ;
169 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
170 - sp:subject
171 - [ sp:varName "productionFacilityToDate"^^xsd:string
172 - ]
173 - ]) ;
174 - sp:where ([ sp:object spin:_this ;
175 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
176 - sp:subject
177 - [ sp:varName "productionReport"^^xsd:string
178 - ]
179 - ] [ sp:object
180 - [ sp:varName "productVolumeRef"^^xsd:string
181 - ] ;
182 - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
183 - sp:subject spin:_this
184 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
185 - sp:predicate rdf:type ;
186 - sp:subject
187 - [ sp:varName "productVolumeRef"^^xsd:string
188 - ]
189 - ] [ sp:object
190 - [ sp:varName "productVolumeRef"^^xsd:string
191 - ] ;
192 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
193 - sp:subject
194 - [ sp:varName "productVolumeReport"^^xsd:string
195 - ]
196 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
197 - sp:predicate rdf:type ;
198 - sp:subject
199 - [ sp:varName "productVolumeReport"^^xsd:string
200 - ]
201 - ] [ sp:object
202 - [ sp:varName "productVolumeRef"^^xsd:string
203 - ] ;
204 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
205 - sp:subject
206 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
207 - ]
208 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
209 sp:predicate rdf:type ; 42 sp:predicate rdf:type ;
43 + sp:subject _:b2
44 + ] [ sp:object _:b1 ;
45 + sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
210 sp:subject 46 sp:subject
211 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 47 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
212 ] 48 ]
213 - ] [ sp:object 49 + ] [ sp:object _:b2 ;
214 - [ sp:varName "productionFacilityToDate"^^xsd:string 50 + sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
215 - ] ;
216 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
217 - sp:subject
218 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
219 - ]
220 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
221 - sp:predicate rdf:type ;
222 sp:subject 51 sp:subject
223 [ sp:varName "productionFacilityToDate"^^xsd:string 52 [ sp:varName "productionFacilityToDate"^^xsd:string
224 ] 53 ]
225 ] [ sp:object 54 ] [ sp:object
226 [ sp:varName "facilityRef"^^xsd:string 55 [ sp:varName "facilityRef"^^xsd:string
227 ] ; 56 ] ;
228 - sp:predicate <http://www.epim.no/schemas/mprml/1#facilityRef> ;
229 - sp:subject
230 - [ sp:varName "productVolumeRef"^^xsd:string
231 - ]
232 - ] [ sp:object
233 - [ sp:varName "flowRef"^^xsd:string
234 - ] ;
235 - sp:predicate <http://www.epim.no/schemas/mprml/1#flowRef> ;
236 - sp:subject
237 - [ sp:varName "facilityRef"^^xsd:string
238 - ]
239 - ] [ rdf:type sp:NotExists ;
240 - sp:elements ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_inventory> ;
241 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
242 - sp:subject
243 - [ sp:varName "flowRef"^^xsd:string
244 - ]
245 - ])
246 - ] [ rdf:type sp:NotExists ;
247 - sp:elements ([ sp:object
248 - [ sp:varName "productVolumeRef"^^xsd:string
249 - ] ;
250 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 57 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
251 - sp:subject 58 + sp:subject _:b1
252 - [ sp:varName "productionFlow"^^xsd:string
253 - ]
254 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
255 - sp:predicate rdf:type ;
256 - sp:subject
257 - [ sp:varName "productionFlow"^^xsd:string
258 - ]
259 - ])
260 - ])
261 - ] ;
262 - spin:rule
263 - [ rdf:type sp:Construct ;
264 - rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ;
265 - sp:templates ([ sp:object
266 - [ sp:varName "reportKind"^^xsd:string
267 - ] ;
268 - sp:predicate rdf:type ;
269 - sp:subject
270 - [ sp:varName "productVolumeReport"^^xsd:string
271 - ]
272 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReportKind> ;
273 - sp:predicate rdf:type ;
274 - sp:subject
275 - [ sp:varName "reportKind"^^xsd:string
276 - ]
277 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
278 - sp:predicate rdfs:subClassOf ;
279 - sp:subject
280 - [ sp:varName "reportKind"^^xsd:string
281 - ]
282 - ] [ sp:object
283 - [ sp:varName "kind"^^xsd:string
284 - ] ;
285 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
286 - sp:subject
287 - [ sp:varName "reportKind"^^xsd:string
288 - ]
289 - ]) ;
290 - sp:where ([ sp:object
291 - [ sp:varName "productVolumeRef"^^xsd:string
292 - ] ;
293 - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
294 - sp:subject spin:_this
295 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
296 - sp:predicate rdf:type ;
297 - sp:subject
298 - [ sp:varName "productVolumeRef"^^xsd:string
299 - ]
300 ] [ sp:object 59 ] [ sp:object
301 - [ sp:varName "productVolumeRef"^^xsd:string 60 + [ sp:varName "flowRef"^^xsd:string
302 ] ; 61 ] ;
303 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 62 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
304 - sp:subject 63 + sp:subject _:b1
305 - [ sp:varName "productVolumeReport"^^xsd:string
306 - ]
307 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
308 - sp:predicate rdf:type ;
309 - sp:subject
310 - [ sp:varName "productVolumeReport"^^xsd:string
311 - ]
312 - ] [ sp:object
313 - [ sp:varName "nameRef"^^xsd:string
314 - ] ;
315 - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
316 - sp:subject
317 - [ sp:varName "productVolumeRef"^^xsd:string
318 - ]
319 - ] [ sp:object
320 - [ sp:varName "name"^^xsd:string
321 - ] ;
322 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
323 - sp:subject
324 - [ sp:varName "nameRef"^^xsd:string
325 - ]
326 - ] [ sp:object
327 - [ sp:varName "kind"^^xsd:string
328 - ] ;
329 - sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
330 - sp:subject
331 - [ sp:varName "productVolumeRef"^^xsd:string
332 - ]
333 - ] [ rdf:type sp:Bind ;
334 - sp:expression
335 - [ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
336 - sp:arg1 [ sp:varName "kind"^^xsd:string
337 - ]
338 - ] ;
339 - sp:variable
340 - [ sp:varName "reportKind"^^xsd:string
341 - ]
342 - ])
343 - ] ;
344 - spin:rule
345 - [ rdf:type sp:Construct ;
346 - rdfs:comment "STEP 20012 Create the period ProductionInventory and the ProductionInventoryToDate - if necessary ."^^xsd:string ;
347 - sp:templates ([ sp:object _:b6 ;
348 - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
349 - sp:subject
350 - [ sp:varName "productVolumeReport"^^xsd:string
351 - ]
352 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
353 - sp:predicate rdf:type ;
354 - sp:subject _:b6
355 ] [ sp:object 64 ] [ sp:object
356 - [ sp:varName "productVolumeRef"^^xsd:string 65 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
357 ] ; 66 ] ;
358 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 67 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
359 - sp:subject _:b6 68 + sp:subject _:b1
360 - ] [ sp:object _:b7 ;
361 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
362 - sp:subject _:b6
363 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
364 - sp:predicate rdf:type ;
365 - sp:subject _:b7
366 - ] [ sp:object _:b6 ;
367 - sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
368 - sp:subject
369 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
370 - ]
371 - ] [ sp:object _:b7 ;
372 - sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
373 - sp:subject
374 - [ sp:varName "productionFacilityToDate"^^xsd:string
375 - ]
376 ]) ; 69 ]) ;
377 sp:where ([ sp:object spin:_this ; 70 sp:where ([ sp:object spin:_this ;
378 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 71 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
...@@ -409,118 +102,85 @@ ...@@ -409,118 +102,85 @@
409 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 102 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
410 ] 103 ]
411 ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; 104 ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
412 - sp:predicate rdf:type ; 105 + sp:predicate rdf:type ;
413 - sp:subject
414 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
415 - ]
416 - ] [ sp:object
417 - [ sp:varName "productionFacilityToDate"^^xsd:string
418 - ] ;
419 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
420 - sp:subject
421 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
422 - ]
423 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
424 - sp:predicate rdf:type ;
425 - sp:subject
426 - [ sp:varName "productionFacilityToDate"^^xsd:string
427 - ]
428 - ] [ sp:object
429 - [ sp:varName "facilityRef"^^xsd:string
430 - ] ;
431 - sp:predicate <http://www.epim.no/schemas/mprml/1#facilityRef> ;
432 - sp:subject
433 - [ sp:varName "productVolumeRef"^^xsd:string
434 - ]
435 - ] [ sp:object
436 - [ sp:varName "flowRef"^^xsd:string
437 - ] ;
438 - sp:predicate <http://www.epim.no/schemas/mprml/1#flowRef> ;
439 - sp:subject
440 - [ sp:varName "facilityRef"^^xsd:string
441 - ]
442 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_inventory> ;
443 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
444 sp:subject 106 sp:subject
445 - [ sp:varName "flowRef"^^xsd:string 107 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
446 ] 108 ]
447 - ] [ rdf:type sp:NotExists ; 109 + ] [ sp:object
448 - sp:elements ([ sp:object 110 + [ sp:varName "productionFacilityToDate"^^xsd:string
449 - [ sp:varName "productVolumeRef"^^xsd:string
450 ] ; 111 ] ;
451 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 112 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
452 sp:subject 113 sp:subject
453 - [ sp:varName "productionInventory"^^xsd:string 114 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
454 ] 115 ]
455 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ; 116 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
456 sp:predicate rdf:type ; 117 sp:predicate rdf:type ;
457 sp:subject 118 sp:subject
458 - [ sp:varName "productionInventory"^^xsd:string 119 + [ sp:varName "productionFacilityToDate"^^xsd:string
459 ] 120 ]
460 ]) 121 ])
461 - ])
462 ] ; 122 ] ;
463 spin:rule 123 spin:rule
464 [ rdf:type sp:Construct ; 124 [ rdf:type sp:Construct ;
465 - rdfs:comment "STEP 20031 Record the start and end dates"^^xsd:string ; 125 + rdfs:comment "STEP 20030 Record the start and end date-times"^^xsd:string ;
466 sp:templates ([ sp:object 126 sp:templates ([ sp:object
467 - [ sp:varName "dateStart"^^xsd:string 127 + [ sp:varName "dTimStart"^^xsd:string
468 ] ; 128 ] ;
469 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 129 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
470 sp:subject 130 sp:subject
471 [ sp:varName "productionFlow"^^xsd:string 131 [ sp:varName "productionFlow"^^xsd:string
472 ] 132 ]
473 ] [ sp:object 133 ] [ sp:object
474 - [ sp:varName "dateEnd"^^xsd:string 134 + [ sp:varName "dTimEnd"^^xsd:string
475 ] ; 135 ] ;
476 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 136 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
477 sp:subject 137 sp:subject
478 [ sp:varName "productionFlow"^^xsd:string 138 [ sp:varName "productionFlow"^^xsd:string
479 ] 139 ]
480 ] [ sp:object 140 ] [ sp:object
481 - [ sp:varName "dateEnd"^^xsd:string 141 + [ sp:varName "dTimEnd"^^xsd:string
482 ] ; 142 ] ;
483 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 143 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
484 sp:subject 144 sp:subject
485 [ sp:varName "productionFlowToDate"^^xsd:string 145 [ sp:varName "productionFlowToDate"^^xsd:string
486 ] 146 ]
487 ] [ sp:object 147 ] [ sp:object
488 - [ sp:varName "dateStart"^^xsd:string 148 + [ sp:varName "dTimStart"^^xsd:string
489 ] ; 149 ] ;
490 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 150 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
491 sp:subject 151 sp:subject
492 [ sp:varName "productionInventory"^^xsd:string 152 [ sp:varName "productionInventory"^^xsd:string
493 ] 153 ]
494 ] [ sp:object 154 ] [ sp:object
495 - [ sp:varName "dateEnd"^^xsd:string 155 + [ sp:varName "dTimEnd"^^xsd:string
496 ] ; 156 ] ;
497 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 157 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
498 sp:subject 158 sp:subject
499 [ sp:varName "productionInventory"^^xsd:string 159 [ sp:varName "productionInventory"^^xsd:string
500 ] 160 ]
501 ] [ sp:object 161 ] [ sp:object
502 - [ sp:varName "dateEnd"^^xsd:string 162 + [ sp:varName "dTimEnd"^^xsd:string
503 ] ; 163 ] ;
504 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 164 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
505 sp:subject 165 sp:subject
506 [ sp:varName "productionInventoryToDate"^^xsd:string 166 [ sp:varName "productionInventoryToDate"^^xsd:string
507 ] 167 ]
508 ] [ sp:object 168 ] [ sp:object
509 - [ sp:varName "dateStart"^^xsd:string 169 + [ sp:varName "dTimStart"^^xsd:string
510 ] ; 170 ] ;
511 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 171 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
512 sp:subject 172 sp:subject
513 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 173 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
514 ] 174 ]
515 ] [ sp:object 175 ] [ sp:object
516 - [ sp:varName "dateEnd"^^xsd:string 176 + [ sp:varName "dTimEnd"^^xsd:string
517 ] ; 177 ] ;
518 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 178 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
519 sp:subject 179 sp:subject
520 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 180 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
521 ] 181 ]
522 ] [ sp:object 182 ] [ sp:object
523 - [ sp:varName "dateEnd"^^xsd:string 183 + [ sp:varName "dTimEnd"^^xsd:string
524 ] ; 184 ] ;
525 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 185 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
526 sp:subject 186 sp:subject
...@@ -538,16 +198,16 @@ ...@@ -538,16 +198,16 @@
538 [ sp:varName "productVolumeRef"^^xsd:string 198 [ sp:varName "productVolumeRef"^^xsd:string
539 ] 199 ]
540 ] [ sp:object 200 ] [ sp:object
541 - [ sp:varName "dateStart"^^xsd:string 201 + [ sp:varName "dTimStart"^^xsd:string
542 ] ; 202 ] ;
543 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; 203 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
544 sp:subject 204 sp:subject
545 [ sp:varName "productVolumeRef"^^xsd:string 205 [ sp:varName "productVolumeRef"^^xsd:string
546 ] 206 ]
547 ] [ sp:object 207 ] [ sp:object
548 - [ sp:varName "dateEnd"^^xsd:string 208 + [ sp:varName "dTimEnd"^^xsd:string
549 ] ; 209 ] ;
550 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; 210 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
551 sp:subject 211 sp:subject
552 [ sp:varName "productVolumeRef"^^xsd:string 212 [ sp:varName "productVolumeRef"^^xsd:string
553 ] 213 ]
...@@ -627,21 +287,89 @@ ...@@ -627,21 +287,89 @@
627 ] ; 287 ] ;
628 spin:rule 288 spin:rule
629 [ rdf:type sp:Construct ; 289 [ rdf:type sp:Construct ;
290 + rdfs:comment "STEP 20040 Set the installation"^^xsd:string ;
291 + sp:templates ([ sp:object
292 + [ sp:varName "productionFacility"^^xsd:string
293 + ] ;
294 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
295 + sp:subject
296 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
297 + ]
298 + ] [ sp:object
299 + [ sp:varName "productionFacility"^^xsd:string
300 + ] ;
301 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
302 + sp:subject
303 + [ sp:varName "productionFacilityToDate"^^xsd:string
304 + ]
305 + ]) ;
306 + sp:where ([ sp:object
307 + [ sp:varName "productVolumeRef"^^xsd:string
308 + ] ;
309 + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
310 + sp:subject spin:_this
311 + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
312 + sp:predicate rdf:type ;
313 + sp:subject
314 + [ sp:varName "productVolumeRef"^^xsd:string
315 + ]
316 + ] [ sp:object
317 + [ sp:varName "installationRef"^^xsd:string
318 + ] ;
319 + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
320 + sp:subject
321 + [ sp:varName "productVolumeRef"^^xsd:string
322 + ]
323 + ] [ sp:object
324 + [ sp:varName "installationRef"^^xsd:string
325 + ] ;
326 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
327 + sp:subject
328 + [ sp:varName "productionFacility"^^xsd:string
329 + ]
330 + ] [ sp:object
331 + [ sp:varName "productVolumeRef"^^xsd:string
332 + ] ;
333 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
334 + sp:subject
335 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
336 + ]
337 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
338 + sp:predicate rdf:type ;
339 + sp:subject
340 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
341 + ]
342 + ] [ sp:object
343 + [ sp:varName "productionFacilityToDate"^^xsd:string
344 + ] ;
345 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
346 + sp:subject
347 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
348 + ]
349 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
350 + sp:predicate rdf:type ;
351 + sp:subject
352 + [ sp:varName "productionFacilityToDate"^^xsd:string
353 + ]
354 + ])
355 + ] ;
356 + spin:rule
357 + [ rdf:type sp:Construct ;
630 rdfs:comment """STEP 20060 Set the facility operator 358 rdfs:comment """STEP 20060 Set the facility operator
631 role is ignored, because it is implicitly \"operator\""""^^xsd:string ; 359 role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
632 - sp:templates ([ sp:object _:b8 ; 360 + sp:templates ([ sp:object _:b3 ;
633 sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; 361 sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
634 sp:subject 362 sp:subject
635 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 363 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
636 ] 364 ]
637 ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; 365 ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
638 sp:predicate rdf:type ; 366 sp:predicate rdf:type ;
639 - sp:subject _:b8 367 + sp:subject _:b3
640 ] [ sp:object 368 ] [ sp:object
641 [ sp:varName "operator"^^xsd:string 369 [ sp:varName "operator"^^xsd:string
642 ] ; 370 ] ;
643 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 371 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
644 - sp:subject _:b8 372 + sp:subject _:b3
645 ]) ; 373 ]) ;
646 sp:where ([ sp:object 374 sp:where ([ sp:object
647 [ sp:varName "productVolumeRef"^^xsd:string 375 [ sp:varName "productVolumeRef"^^xsd:string
...@@ -683,18 +411,67 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; ...@@ -683,18 +411,67 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
683 ] ; 411 ] ;
684 spin:rule 412 spin:rule
685 [ rdf:type sp:Construct ; 413 [ rdf:type sp:Construct ;
686 - rdfs:comment "STEP 20040 Set the installation"^^xsd:string ; 414 + rdfs:comment "STEP 20031 Record the start and end dates"^^xsd:string ;
687 sp:templates ([ sp:object 415 sp:templates ([ sp:object
688 - [ sp:varName "productionFacility"^^xsd:string 416 + [ sp:varName "dateStart"^^xsd:string
689 ] ; 417 ] ;
690 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 418 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
419 + sp:subject
420 + [ sp:varName "productionFlow"^^xsd:string
421 + ]
422 + ] [ sp:object
423 + [ sp:varName "dateEnd"^^xsd:string
424 + ] ;
425 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
426 + sp:subject
427 + [ sp:varName "productionFlow"^^xsd:string
428 + ]
429 + ] [ sp:object
430 + [ sp:varName "dateEnd"^^xsd:string
431 + ] ;
432 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
433 + sp:subject
434 + [ sp:varName "productionFlowToDate"^^xsd:string
435 + ]
436 + ] [ sp:object
437 + [ sp:varName "dateStart"^^xsd:string
438 + ] ;
439 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
440 + sp:subject
441 + [ sp:varName "productionInventory"^^xsd:string
442 + ]
443 + ] [ sp:object
444 + [ sp:varName "dateEnd"^^xsd:string
445 + ] ;
446 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
447 + sp:subject
448 + [ sp:varName "productionInventory"^^xsd:string
449 + ]
450 + ] [ sp:object
451 + [ sp:varName "dateEnd"^^xsd:string
452 + ] ;
453 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
454 + sp:subject
455 + [ sp:varName "productionInventoryToDate"^^xsd:string
456 + ]
457 + ] [ sp:object
458 + [ sp:varName "dateStart"^^xsd:string
459 + ] ;
460 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
691 sp:subject 461 sp:subject
692 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 462 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
693 ] 463 ]
694 ] [ sp:object 464 ] [ sp:object
695 - [ sp:varName "productionFacility"^^xsd:string 465 + [ sp:varName "dateEnd"^^xsd:string
696 ] ; 466 ] ;
697 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 467 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
468 + sp:subject
469 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
470 + ]
471 + ] [ sp:object
472 + [ sp:varName "dateEnd"^^xsd:string
473 + ] ;
474 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
698 sp:subject 475 sp:subject
699 [ sp:varName "productionFacilityToDate"^^xsd:string 476 [ sp:varName "productionFacilityToDate"^^xsd:string
700 ] 477 ]
...@@ -710,18 +487,66 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; ...@@ -710,18 +487,66 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
710 [ sp:varName "productVolumeRef"^^xsd:string 487 [ sp:varName "productVolumeRef"^^xsd:string
711 ] 488 ]
712 ] [ sp:object 489 ] [ sp:object
713 - [ sp:varName "installationRef"^^xsd:string 490 + [ sp:varName "dateStart"^^xsd:string
714 ] ; 491 ] ;
715 - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; 492 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
716 sp:subject 493 sp:subject
717 [ sp:varName "productVolumeRef"^^xsd:string 494 [ sp:varName "productVolumeRef"^^xsd:string
718 ] 495 ]
719 ] [ sp:object 496 ] [ sp:object
720 - [ sp:varName "installationRef"^^xsd:string 497 + [ sp:varName "dateEnd"^^xsd:string
498 + ] ;
499 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
500 + sp:subject
501 + [ sp:varName "productVolumeRef"^^xsd:string
502 + ]
503 + ] [ sp:object
504 + [ sp:varName "productVolumeRef"^^xsd:string
721 ] ; 505 ] ;
722 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 506 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
723 sp:subject 507 sp:subject
724 - [ sp:varName "productionFacility"^^xsd:string 508 + [ sp:varName "productionFlow"^^xsd:string
509 + ]
510 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
511 + sp:predicate rdf:type ;
512 + sp:subject
513 + [ sp:varName "productionFlow"^^xsd:string
514 + ]
515 + ] [ sp:object
516 + [ sp:varName "productionFlowToDate"^^xsd:string
517 + ] ;
518 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
519 + sp:subject
520 + [ sp:varName "productionFlow"^^xsd:string
521 + ]
522 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
523 + sp:predicate rdf:type ;
524 + sp:subject
525 + [ sp:varName "productionFlowToDate"^^xsd:string
526 + ]
527 + ] [ sp:object
528 + [ sp:varName "productVolumeRef"^^xsd:string
529 + ] ;
530 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
531 + sp:subject
532 + [ sp:varName "productionInventory"^^xsd:string
533 + ]
534 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
535 + sp:predicate rdf:type ;
536 + sp:subject
537 + [ sp:varName "productionInventory"^^xsd:string
538 + ]
539 + ] [ sp:object
540 + [ sp:varName "productionInventoryToDate"^^xsd:string
541 + ] ;
542 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
543 + sp:subject
544 + [ sp:varName "productionInventory"^^xsd:string
545 + ]
546 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
547 + sp:predicate rdf:type ;
548 + sp:subject
549 + [ sp:varName "productionInventoryToDate"^^xsd:string
725 ] 550 ]
726 ] [ sp:object 551 ] [ sp:object
727 [ sp:varName "productVolumeRef"^^xsd:string 552 [ sp:varName "productVolumeRef"^^xsd:string
...@@ -751,69 +576,81 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; ...@@ -751,69 +576,81 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
751 ] ; 576 ] ;
752 spin:rule 577 spin:rule
753 [ rdf:type sp:Construct ; 578 [ rdf:type sp:Construct ;
754 - rdfs:comment "STEP 20030 Record the start and end date-times"^^xsd:string ; 579 + rdfs:comment "STEP 20050 Set the context facility - installation is always specified"^^xsd:string ;
755 sp:templates ([ sp:object 580 sp:templates ([ sp:object
756 - [ sp:varName "dTimStart"^^xsd:string 581 + [ sp:varName "contextFacility"^^xsd:string
757 ] ; 582 ] ;
758 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 583 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
759 sp:subject 584 sp:subject
760 - [ sp:varName "productionFlow"^^xsd:string 585 + [ sp:varName "productionFacility"^^xsd:string
761 ] 586 ]
762 - ] [ sp:object 587 + ]) ;
763 - [ sp:varName "dTimEnd"^^xsd:string 588 + sp:where ([ sp:object
589 + [ sp:varName "productVolumeRef"^^xsd:string
764 ] ; 590 ] ;
765 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 591 + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
592 + sp:subject spin:_this
593 + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
594 + sp:predicate rdf:type ;
766 sp:subject 595 sp:subject
767 - [ sp:varName "productionFlow"^^xsd:string 596 + [ sp:varName "productVolumeRef"^^xsd:string
768 ] 597 ]
769 ] [ sp:object 598 ] [ sp:object
770 - [ sp:varName "dTimEnd"^^xsd:string 599 + [ sp:varName "installationRef"^^xsd:string
771 ] ; 600 ] ;
772 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 601 + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
773 sp:subject 602 sp:subject
774 - [ sp:varName "productionFlowToDate"^^xsd:string 603 + [ sp:varName "productVolumeRef"^^xsd:string
775 ] 604 ]
776 ] [ sp:object 605 ] [ sp:object
777 - [ sp:varName "dTimStart"^^xsd:string 606 + [ sp:varName "installationRef"^^xsd:string
778 ] ; 607 ] ;
779 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 608 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
780 sp:subject 609 sp:subject
781 - [ sp:varName "productionInventory"^^xsd:string 610 + [ sp:varName "productionFacility"^^xsd:string
782 ] 611 ]
783 ] [ sp:object 612 ] [ sp:object
784 - [ sp:varName "dTimEnd"^^xsd:string 613 + [ sp:varName "contextFacilityRef"^^xsd:string
785 ] ; 614 ] ;
786 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 615 + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
787 sp:subject 616 sp:subject
788 - [ sp:varName "productionInventory"^^xsd:string 617 + [ sp:varName "productVolumeRef"^^xsd:string
789 ] 618 ]
790 ] [ sp:object 619 ] [ sp:object
791 - [ sp:varName "dTimEnd"^^xsd:string 620 + [ sp:varName "contextFacilityRef"^^xsd:string
792 ] ; 621 ] ;
793 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 622 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
794 sp:subject 623 sp:subject
795 - [ sp:varName "productionInventoryToDate"^^xsd:string 624 + [ sp:varName "contextFacility"^^xsd:string
796 ] 625 ]
797 - ] [ sp:object 626 + ])
798 - [ sp:varName "dTimStart"^^xsd:string
799 ] ; 627 ] ;
800 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 628 + spin:rule
629 + [ rdf:type sp:Construct ;
630 + rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ;
631 + sp:templates ([ sp:object
632 + [ sp:varName "reportKind"^^xsd:string
633 + ] ;
634 + sp:predicate rdf:type ;
801 sp:subject 635 sp:subject
802 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 636 + [ sp:varName "productVolumeReport"^^xsd:string
803 ] 637 ]
804 - ] [ sp:object 638 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReportKind> ;
805 - [ sp:varName "dTimEnd"^^xsd:string 639 + sp:predicate rdf:type ;
806 - ] ;
807 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
808 sp:subject 640 sp:subject
809 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 641 + [ sp:varName "reportKind"^^xsd:string
642 + ]
643 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
644 + sp:predicate rdfs:subClassOf ;
645 + sp:subject
646 + [ sp:varName "reportKind"^^xsd:string
810 ] 647 ]
811 ] [ sp:object 648 ] [ sp:object
812 - [ sp:varName "dTimEnd"^^xsd:string 649 + [ sp:varName "kind"^^xsd:string
813 ] ; 650 ] ;
814 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 651 + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
815 sp:subject 652 sp:subject
816 - [ sp:varName "productionFacilityToDate"^^xsd:string 653 + [ sp:varName "reportKind"^^xsd:string
817 ] 654 ]
818 ]) ; 655 ]) ;
819 sp:where ([ sp:object 656 sp:where ([ sp:object
...@@ -827,66 +664,108 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; ...@@ -827,66 +664,108 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
827 [ sp:varName "productVolumeRef"^^xsd:string 664 [ sp:varName "productVolumeRef"^^xsd:string
828 ] 665 ]
829 ] [ sp:object 666 ] [ sp:object
830 - [ sp:varName "dTimStart"^^xsd:string 667 + [ sp:varName "productVolumeRef"^^xsd:string
831 ] ; 668 ] ;
832 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ; 669 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
833 sp:subject 670 sp:subject
834 - [ sp:varName "productVolumeRef"^^xsd:string 671 + [ sp:varName "productVolumeReport"^^xsd:string
672 + ]
673 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
674 + sp:predicate rdf:type ;
675 + sp:subject
676 + [ sp:varName "productVolumeReport"^^xsd:string
835 ] 677 ]
836 ] [ sp:object 678 ] [ sp:object
837 - [ sp:varName "dTimEnd"^^xsd:string 679 + [ sp:varName "nameRef"^^xsd:string
838 ] ; 680 ] ;
839 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ; 681 + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
840 sp:subject 682 sp:subject
841 [ sp:varName "productVolumeRef"^^xsd:string 683 [ sp:varName "productVolumeRef"^^xsd:string
842 ] 684 ]
843 ] [ sp:object 685 ] [ sp:object
686 + [ sp:varName "name"^^xsd:string
687 + ] ;
688 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
689 + sp:subject
690 + [ sp:varName "nameRef"^^xsd:string
691 + ]
692 + ] [ sp:object
693 + [ sp:varName "kind"^^xsd:string
694 + ] ;
695 + sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
696 + sp:subject
844 [ sp:varName "productVolumeRef"^^xsd:string 697 [ sp:varName "productVolumeRef"^^xsd:string
698 + ]
699 + ] [ rdf:type sp:Bind ;
700 + sp:expression
701 + [ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
702 + sp:arg1 [ sp:varName "kind"^^xsd:string
703 + ]
845 ] ; 704 ] ;
846 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 705 + sp:variable
706 + [ sp:varName "reportKind"^^xsd:string
707 + ]
708 + ])
709 + ] ;
710 + spin:rule
711 + [ rdf:type sp:Construct ;
712 + rdfs:comment "STEP 20011 Create the period ProductionFlow and the ProductionFlowToDate - if necessary ."^^xsd:string ;
713 + sp:templates ([ sp:object _:b4 ;
714 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
847 sp:subject 715 sp:subject
848 - [ sp:varName "productionFlow"^^xsd:string 716 + [ sp:varName "productVolumeReport"^^xsd:string
849 ] 717 ]
850 ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; 718 ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
851 sp:predicate rdf:type ; 719 sp:predicate rdf:type ;
852 - sp:subject 720 + sp:subject _:b4
853 - [ sp:varName "productionFlow"^^xsd:string
854 - ]
855 ] [ sp:object 721 ] [ sp:object
856 - [ sp:varName "productionFlowToDate"^^xsd:string 722 + [ sp:varName "productVolumeRef"^^xsd:string
857 ] ; 723 ] ;
724 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
725 + sp:subject _:b4
726 + ] [ sp:object _:b5 ;
858 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 727 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
859 - sp:subject 728 + sp:subject _:b4
860 - [ sp:varName "productionFlow"^^xsd:string
861 - ]
862 ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ; 729 ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
863 sp:predicate rdf:type ; 730 sp:predicate rdf:type ;
731 + sp:subject _:b5
732 + ] [ sp:object _:b4 ;
733 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
864 sp:subject 734 sp:subject
865 - [ sp:varName "productionFlowToDate"^^xsd:string 735 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
866 ] 736 ]
867 - ] [ sp:object 737 + ] [ sp:object _:b5 ;
868 - [ sp:varName "productVolumeRef"^^xsd:string 738 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
869 - ] ; 739 + sp:subject
740 + [ sp:varName "productionFacilityToDate"^^xsd:string
741 + ]
742 + ]) ;
743 + sp:where ([ sp:object spin:_this ;
870 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 744 sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
871 sp:subject 745 sp:subject
872 - [ sp:varName "productionInventory"^^xsd:string 746 + [ sp:varName "productionReport"^^xsd:string
873 ] 747 ]
874 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ; 748 + ] [ sp:object
749 + [ sp:varName "productVolumeRef"^^xsd:string
750 + ] ;
751 + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
752 + sp:subject spin:_this
753 + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
875 sp:predicate rdf:type ; 754 sp:predicate rdf:type ;
876 sp:subject 755 sp:subject
877 - [ sp:varName "productionInventory"^^xsd:string 756 + [ sp:varName "productVolumeRef"^^xsd:string
878 ] 757 ]
879 ] [ sp:object 758 ] [ sp:object
880 - [ sp:varName "productionInventoryToDate"^^xsd:string 759 + [ sp:varName "productVolumeRef"^^xsd:string
881 ] ; 760 ] ;
882 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 761 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
883 sp:subject 762 sp:subject
884 - [ sp:varName "productionInventory"^^xsd:string 763 + [ sp:varName "productVolumeReport"^^xsd:string
885 ] 764 ]
886 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ; 765 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
887 sp:predicate rdf:type ; 766 sp:predicate rdf:type ;
888 sp:subject 767 sp:subject
889 - [ sp:varName "productionInventoryToDate"^^xsd:string 768 + [ sp:varName "productVolumeReport"^^xsd:string
890 ] 769 ]
891 ] [ sp:object 770 ] [ sp:object
892 [ sp:varName "productVolumeRef"^^xsd:string 771 [ sp:varName "productVolumeRef"^^xsd:string
...@@ -912,20 +791,75 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; ...@@ -912,20 +791,75 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
912 sp:subject 791 sp:subject
913 [ sp:varName "productionFacilityToDate"^^xsd:string 792 [ sp:varName "productionFacilityToDate"^^xsd:string
914 ] 793 ]
794 + ] [ rdf:type sp:NotExists ;
795 + sp:elements ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_inventory> ;
796 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
797 + sp:subject
798 + [ sp:varName "flowRef"^^xsd:string
799 + ]
800 + ])
915 ]) 801 ])
916 ] ; 802 ] ;
917 spin:rule 803 spin:rule
918 [ rdf:type sp:Construct ; 804 [ rdf:type sp:Construct ;
919 - rdfs:comment "STEP 20050 Set the context facility - installation is always specified"^^xsd:string ; 805 + rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ;
920 - sp:templates ([ sp:object 806 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
921 - [ sp:varName "contextFacility"^^xsd:string 807 + sp:predicate rdf:type ;
808 + sp:subject _:b6
809 + ] [ sp:object
810 + [ sp:varName "productionReport"^^xsd:string
922 ] ; 811 ] ;
923 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; 812 + sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
813 + sp:subject _:b6
814 + ] [ sp:object
815 + [ sp:varName "name"^^xsd:string
816 + ] ;
817 + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
818 + sp:subject _:b6
819 + ] [ sp:object
820 + [ sp:varName "reportPeriodType"^^xsd:string
821 + ] ;
822 + sp:predicate rdf:type ;
823 + sp:subject _:b6
824 + ] [ sp:object
825 + [ sp:varName "productVolumeRef"^^xsd:string
826 + ] ;
827 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
828 + sp:subject _:b6
829 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
830 + sp:predicate rdf:type ;
831 + sp:subject _:b7
832 + ] [ sp:object
833 + [ sp:varName "productVolumeRef"^^xsd:string
834 + ] ;
835 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
836 + sp:subject _:b7
837 + ] [ sp:object _:b8 ;
838 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
839 + sp:subject _:b7
840 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
841 + sp:predicate rdf:type ;
842 + sp:subject _:b8
843 + ] [ sp:object
844 + [] ;
845 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
846 + sp:subject _:b7
847 + ] [ sp:object
848 + [] ;
849 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
850 + sp:subject _:b8
851 + ] [ sp:object
852 + [ sp:varName "title"^^xsd:string
853 + ] ;
854 + sp:predicate <http://purl.org/dc/elements/1.1/title> ;
855 + sp:subject _:b6
856 + ]) ;
857 + sp:where ([ sp:object spin:_this ;
858 + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ;
924 sp:subject 859 sp:subject
925 - [ sp:varName "productionFacility"^^xsd:string 860 + [ sp:varName "productionReport"^^xsd:string
926 ] 861 ]
927 - ]) ; 862 + ] [ sp:object
928 - sp:where ([ sp:object
929 [ sp:varName "productVolumeRef"^^xsd:string 863 [ sp:varName "productVolumeRef"^^xsd:string
930 ] ; 864 ] ;
931 sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; 865 sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
...@@ -936,37 +870,57 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; ...@@ -936,37 +870,57 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
936 [ sp:varName "productVolumeRef"^^xsd:string 870 [ sp:varName "productVolumeRef"^^xsd:string
937 ] 871 ]
938 ] [ sp:object 872 ] [ sp:object
939 - [ sp:varName "installationRef"^^xsd:string 873 + [ sp:varName "nameRef"^^xsd:string
940 ] ; 874 ] ;
941 - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; 875 + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
942 sp:subject 876 sp:subject
943 [ sp:varName "productVolumeRef"^^xsd:string 877 [ sp:varName "productVolumeRef"^^xsd:string
944 ] 878 ]
945 ] [ sp:object 879 ] [ sp:object
946 - [ sp:varName "installationRef"^^xsd:string 880 + [ sp:varName "name"^^xsd:string
947 ] ; 881 ] ;
948 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 882 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
949 sp:subject 883 sp:subject
950 - [ sp:varName "productionFacility"^^xsd:string 884 + [ sp:varName "nameRef"^^xsd:string
951 ] 885 ]
952 - ] [ sp:object 886 + ] [ rdf:type sp:Optional ;
953 - [ sp:varName "contextFacilityRef"^^xsd:string 887 + sp:elements ([ sp:object
888 + [ sp:varName "periodKindRef"^^xsd:string
954 ] ; 889 ] ;
955 - sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; 890 + sp:predicate <http://www.epim.no/schemas/mprml/1#periodKindRef> ;
891 + sp:subject
892 + [ sp:varName "productVolumeRef"^^xsd:string
893 + ]
894 + ])
895 + ] [ rdf:type sp:Optional ;
896 + sp:elements ([ sp:object
897 + [ sp:varName "titleRef"^^xsd:string
898 + ] ;
899 + sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
956 sp:subject 900 sp:subject
957 [ sp:varName "productVolumeRef"^^xsd:string 901 [ sp:varName "productVolumeRef"^^xsd:string
958 ] 902 ]
959 ] [ sp:object 903 ] [ sp:object
960 - [ sp:varName "contextFacilityRef"^^xsd:string 904 + [ sp:varName "title"^^xsd:string
961 ] ; 905 ] ;
962 - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; 906 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
963 sp:subject 907 sp:subject
964 - [ sp:varName "contextFacility"^^xsd:string 908 + [ sp:varName "titleRef"^^xsd:string
909 + ]
910 + ])
911 + ] [ rdf:type sp:Bind ;
912 + sp:expression
913 + [ rdf:type ep-mpr-spin-lib:selectReportPeriodType ;
914 + sp:arg1 [ sp:varName "periodKindRef"^^xsd:string
915 + ]
916 + ] ;
917 + sp:variable
918 + [ sp:varName "reportPeriodType"^^xsd:string
965 ] 919 ]
966 ]) 920 ])
967 ] . 921 ] .
968 922
969 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> 923 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0>
970 rdf:type owl:Ontology ; 924 rdf:type owl:Ontology ;
971 - owl:imports <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> ; 925 + owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> ;
972 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 926 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......