David Leal

Minor fix

...@@ -20,24 +20,16 @@ ...@@ -20,24 +20,16 @@
20 <http://www.epim.no/schemas/mprml/1#A_Global-Objects> 20 <http://www.epim.no/schemas/mprml/1#A_Global-Objects>
21 spin:rule 21 spin:rule
22 [ rdf:type sp:Construct ; 22 [ rdf:type sp:Construct ;
23 - rdfs:comment "STEP 10001m Create the ProductionReport - extract the report name from context/contextFacility"^^xsd:string ; 23 + rdfs:comment "STEP 10010 Add the contextFacility - unless the contextFacility is the production facility"^^xsd:string ;
24 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; 24 + sp:templates ([ sp:object
25 - sp:predicate rdf:type ; 25 + [ sp:varName "contextFacility"^^xsd:string
26 - sp:subject 26 + ] ;
27 - [ sp:varName "productionReport"^^xsd:string 27 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
28 - ]
29 - ] [ sp:object spin:_this ;
30 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
31 sp:subject 28 sp:subject
32 - [ sp:varName "productionReport"^^xsd:string 29 + [ sp:varName "productionFacility"^^xsd:string
33 ] 30 ]
34 ]) ; 31 ]) ;
35 sp:where ([ sp:object 32 sp:where ([ sp:object
36 - [ sp:varName "intervalIdentifier"^^xsd:string
37 - ] ;
38 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
39 - sp:subject spin:_this
40 - ] [ sp:object
41 [ sp:varName "contextRef"^^xsd:string 33 [ sp:varName "contextRef"^^xsd:string
42 ] ; 34 ] ;
43 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; 35 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
...@@ -54,114 +46,79 @@ ...@@ -54,114 +46,79 @@
54 sp:subject 46 sp:subject
55 [ sp:varName "contextRef"^^xsd:string 47 [ sp:varName "contextRef"^^xsd:string
56 ] 48 ]
57 - ] [ rdf:type sp:Bind ; 49 + ] [ sp:object
58 - sp:expression 50 + [ sp:varName "contextFacilityRef"^^xsd:string
59 - [ rdf:type spl:object ;
60 - sp:arg1 [ sp:varName "contextFacilityRef"^^xsd:string
61 - ] ;
62 - sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
63 ] ; 51 ] ;
64 - sp:variable 52 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
65 - [ sp:varName "normalizedContextFacilityName"^^xsd:string 53 + sp:subject
54 + [ sp:varName "contextFacility"^^xsd:string
66 ] 55 ]
67 - ] [ rdf:type sp:Bind ; 56 + ] [ rdf:type sp:NotExists ;
68 - sp:expression 57 + sp:elements ([ sp:object spin:_this ;
69 - [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; 58 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
70 - sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string 59 + sp:subject
71 - ] ; 60 + [ sp:varName "contextFacility"^^xsd:string
72 - sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
73 ] 61 ]
74 - ] ; 62 + ])
75 - sp:variable 63 + ] [ sp:object spin:_this ;
64 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
65 + sp:subject
76 [ sp:varName "productionReport"^^xsd:string 66 [ sp:varName "productionReport"^^xsd:string
77 ] 67 ]
78 - ]) 68 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
79 - ] ;
80 - spin:rule
81 - [ rdf:type sp:Construct ;
82 - rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
83 - sp:templates ([ sp:object
84 - [ sp:varName "intervalIdentifier"^^xsd:string
85 - ] ;
86 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
87 - sp:subject spin:_this
88 - ] [ sp:object
89 - [ sp:varName "date"^^xsd:string
90 - ] ;
91 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
92 - sp:subject spin:_this
93 - ] [ sp:object
94 - [ sp:varName "dateEnd"^^xsd:string
95 - ] ;
96 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
97 - sp:subject spin:_this
98 - ]) ;
99 - sp:where ([ sp:object
100 - [ sp:varName "contextRef"^^xsd:string
101 - ] ;
102 - sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
103 - sp:subject spin:_this
104 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
105 sp:predicate rdf:type ; 69 sp:predicate rdf:type ;
106 sp:subject 70 sp:subject
107 - [ sp:varName "contextRef"^^xsd:string 71 + [ sp:varName "productionReport"^^xsd:string
108 ] 72 ]
109 ] [ sp:object 73 ] [ sp:object
110 - [ sp:varName "date"^^xsd:string 74 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
111 ] ; 75 ] ;
112 - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; 76 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
113 sp:subject 77 sp:subject
114 - [ sp:varName "contextRef"^^xsd:string 78 + [ sp:varName "productionReport"^^xsd:string
115 ] 79 ]
116 - ] [ rdf:type sp:NotExists ; 80 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
117 - sp:elements ([ sp:object 81 + sp:predicate rdf:type ;
118 - [ sp:varName "dateStart"^^xsd:string
119 - ] ;
120 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
121 sp:subject 82 sp:subject
122 - [ sp:varName "contextRef"^^xsd:string 83 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
123 ] 84 ]
124 - ])
125 ] [ sp:object 85 ] [ sp:object
126 - [ sp:varName "dateEnd"^^xsd:string 86 + [ sp:varName "productionFacility"^^xsd:string
127 ] ; 87 ] ;
128 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; 88 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
129 sp:subject 89 sp:subject
130 - [ sp:varName "contextRef"^^xsd:string 90 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
131 - ]
132 - ] [ rdf:type sp:Bind ;
133 - sp:expression
134 - [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
135 - sp:arg1 [ sp:varName "date"^^xsd:string
136 - ] ;
137 - sp:arg2 [ sp:varName "dateEnd"^^xsd:string
138 - ]
139 - ] ;
140 - sp:variable
141 - [ sp:varName "intervalIdentifier"^^xsd:string
142 ] 91 ]
143 ]) 92 ])
144 ] ; 93 ] ;
145 spin:rule 94 spin:rule
146 [ rdf:type sp:Construct ; 95 [ rdf:type sp:Construct ;
147 - rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ; 96 + rdfs:comment "STEP 10020 Add the operator"^^xsd:string ;
148 - sp:templates ([ sp:object 97 + sp:templates ([ sp:object _:b1 ;
149 - [ sp:varName "date"^^xsd:string 98 + sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
150 - ] ; 99 + sp:subject
151 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; 100 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
152 - sp:subject spin:_this 101 + ]
153 - ] [ sp:object 102 + ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
154 - [ sp:varName "date"^^xsd:string 103 + sp:predicate rdf:type ;
155 - ] ; 104 + sp:subject _:b1
156 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
157 - sp:subject spin:_this
158 ] [ sp:object 105 ] [ sp:object
159 - [ sp:varName "date"^^xsd:string 106 + [ sp:varName "operator"^^xsd:string
160 ] ; 107 ] ;
161 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; 108 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
162 - sp:subject spin:_this 109 + sp:subject _:b1
163 ]) ; 110 ]) ;
164 - sp:where ([ sp:object 111 + sp:where ([ sp:object spin:_this ;
112 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
113 + sp:subject
114 + [ sp:varName "productionReport"^^xsd:string
115 + ]
116 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
117 + sp:predicate rdf:type ;
118 + sp:subject
119 + [ sp:varName "productionReport"^^xsd:string
120 + ]
121 + ] [ sp:object
165 [ sp:varName "contextRef"^^xsd:string 122 [ sp:varName "contextRef"^^xsd:string
166 ] ; 123 ] ;
167 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; 124 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
...@@ -172,52 +129,54 @@ ...@@ -172,52 +129,54 @@
172 [ sp:varName "contextRef"^^xsd:string 129 [ sp:varName "contextRef"^^xsd:string
173 ] 130 ]
174 ] [ sp:object 131 ] [ sp:object
175 - [ sp:varName "date"^^xsd:string 132 + [ sp:varName "operatorRef"^^xsd:string
176 ] ; 133 ] ;
177 - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; 134 + sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
178 sp:subject 135 sp:subject
179 [ sp:varName "contextRef"^^xsd:string 136 [ sp:varName "contextRef"^^xsd:string
180 ] 137 ]
181 - ] [ rdf:type sp:NotExists ; 138 + ] [ sp:object
182 - sp:elements ([ sp:object 139 + [ sp:varName "operatorRef"^^xsd:string
183 - [ sp:varName "dateStart"^^xsd:string
184 ] ; 140 ] ;
185 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; 141 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
186 sp:subject 142 sp:subject
187 - [ sp:varName "contextRef"^^xsd:string 143 + [ sp:varName "operator"^^xsd:string
188 ] 144 ]
189 - ]) 145 + ] [ sp:object
190 - ] [ rdf:type sp:NotExists ; 146 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
191 - sp:elements ([ sp:object
192 - [ sp:varName "dateEnd"^^xsd:string
193 ] ; 147 ] ;
194 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; 148 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
195 sp:subject 149 sp:subject
196 - [ sp:varName "contextRef"^^xsd:string 150 + [ sp:varName "productionReport"^^xsd:string
151 + ]
152 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
153 + sp:predicate rdf:type ;
154 + sp:subject
155 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
197 ] 156 ]
198 - ])
199 ]) 157 ])
200 ] ; 158 ] ;
201 spin:rule 159 spin:rule
202 [ rdf:type sp:Construct ; 160 [ rdf:type sp:Construct ;
203 - rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ; 161 + rdfs:comment "STEP 10001p Create the ProductionReport - unable to find an identifier"^^xsd:string ;
204 - sp:templates ([ sp:object 162 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
205 - [ sp:varName "dateEnd"^^xsd:string 163 + sp:predicate rdf:type ;
164 + sp:subject
165 + [ sp:varName "productionReport"^^xsd:string
166 + ]
167 + ] [ sp:object spin:_this ;
168 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
169 + sp:subject
170 + [ sp:varName "productionReport"^^xsd:string
171 + ]
172 + ]) ;
173 + sp:where ([ sp:object
174 + [ sp:varName "intervalIdentifier"^^xsd:string
206 ] ; 175 ] ;
207 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; 176 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
208 sp:subject spin:_this 177 sp:subject spin:_this
209 - ] [ sp:object 178 + ] [ rdf:type sp:NotExists ;
210 - [ sp:varName "dateEnd"^^xsd:string 179 + sp:elements ([ sp:object
211 - ] ;
212 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
213 - sp:subject spin:_this
214 - ] [ sp:object
215 - [ sp:varName "dateEnd"^^xsd:string
216 - ] ;
217 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
218 - sp:subject spin:_this
219 - ]) ;
220 - sp:where ([ sp:object
221 [ sp:varName "contextRef"^^xsd:string 180 [ sp:varName "contextRef"^^xsd:string
222 ] ; 181 ] ;
223 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; 182 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
...@@ -228,30 +187,44 @@ ...@@ -228,30 +187,44 @@
228 [ sp:varName "contextRef"^^xsd:string 187 [ sp:varName "contextRef"^^xsd:string
229 ] 188 ]
230 ] [ sp:object 189 ] [ sp:object
231 - [ sp:varName "dateEnd"^^xsd:string 190 + [ sp:varName "contextFacilityRef"^^xsd:string
232 ] ; 191 ] ;
233 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; 192 + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
234 sp:subject 193 sp:subject
235 [ sp:varName "contextRef"^^xsd:string 194 [ sp:varName "contextRef"^^xsd:string
236 ] 195 ]
237 - ] [ rdf:type sp:NotExists ; 196 + ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
238 - sp:elements ([ sp:object 197 + sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
239 - [ sp:varName "date"^^xsd:string
240 - ] ;
241 - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
242 sp:subject 198 sp:subject
243 - [ sp:varName "contextRef"^^xsd:string 199 + [ sp:varName "contextFacilityRef"^^xsd:string
244 ] 200 ]
245 ]) 201 ])
246 ] [ rdf:type sp:NotExists ; 202 ] [ rdf:type sp:NotExists ;
247 sp:elements ([ sp:object 203 sp:elements ([ sp:object
248 - [ sp:varName "dateStart"^^xsd:string 204 + [ sp:varName "installationRef"^^xsd:string
249 ] ; 205 ] ;
250 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; 206 + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
251 sp:subject 207 sp:subject
252 [ sp:varName "contextRef"^^xsd:string 208 [ sp:varName "contextRef"^^xsd:string
253 ] 209 ]
210 + ] [ sp:object
211 + [ sp:varName "installationRef"^^xsd:string
212 + ] ;
213 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
214 + sp:subject
215 + [ sp:varName "reportingFacility"^^xsd:string
216 + ]
254 ]) 217 ])
218 + ] [ rdf:type sp:Bind ;
219 + sp:expression
220 + [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
221 + sp:arg1 "" ;
222 + sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
223 + ]
224 + ] ;
225 + sp:variable
226 + [ sp:varName "productionReport"^^xsd:string
227 + ]
255 ]) 228 ])
256 ] ; 229 ] ;
257 spin:rule 230 spin:rule
...@@ -321,54 +294,147 @@ ...@@ -321,54 +294,147 @@
321 ] ; 294 ] ;
322 spin:rule 295 spin:rule
323 [ rdf:type sp:Construct ; 296 [ rdf:type sp:Construct ;
324 - rdfs:comment "STEP 10001r Set the submitting installation"^^xsd:string ; 297 + rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
325 - sp:templates ([ sp:object _:b1 ; 298 + sp:templates ([ sp:object "noDate" ;
326 - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; 299 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
300 + sp:subject spin:_this
301 + ]) ;
302 + sp:where ([ sp:object
303 + [ sp:varName "contextRef"^^xsd:string
304 + ] ;
305 + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
306 + sp:subject spin:_this
307 + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
308 + sp:predicate rdf:type ;
309 + sp:subject
310 + [ sp:varName "contextRef"^^xsd:string
311 + ]
312 + ] [ rdf:type sp:NotExists ;
313 + sp:elements ([ sp:object
314 + [ sp:varName "dateEnd"^^xsd:string
315 + ] ;
316 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
317 + sp:subject
318 + [ sp:varName "contextRef"^^xsd:string
319 + ]
320 + ])
321 + ] [ rdf:type sp:NotExists ;
322 + sp:elements ([ sp:object
323 + [ sp:varName "date"^^xsd:string
324 + ] ;
325 + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
326 + sp:subject
327 + [ sp:varName "contextRef"^^xsd:string
328 + ]
329 + ])
330 + ] [ rdf:type sp:NotExists ;
331 + sp:elements ([ sp:object
332 + [ sp:varName "dateStart"^^xsd:string
333 + ] ;
334 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
335 + sp:subject
336 + [ sp:varName "contextRef"^^xsd:string
337 + ]
338 + ])
339 + ])
340 + ] ;
341 + spin:rule
342 + [ rdf:type sp:Construct ;
343 + rdfs:comment "STEP 10001o Set the default production facility from context/contextFacility"^^xsd:string ;
344 + sp:templates ([ sp:object spin:_this ;
345 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
346 + sp:subject
347 + [ sp:varName "productionFacility"^^xsd:string
348 + ]
349 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
350 + sp:predicate rdf:type ;
351 + sp:subject
352 + [ sp:varName "productionFacility"^^xsd:string
353 + ]
354 + ] [ sp:object _:b2 ;
355 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
327 sp:subject 356 sp:subject
328 [ sp:varName "productionReport"^^xsd:string 357 [ sp:varName "productionReport"^^xsd:string
329 ] 358 ]
330 ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; 359 ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
331 sp:predicate rdf:type ; 360 sp:predicate rdf:type ;
332 - sp:subject _:b1 361 + sp:subject _:b2
333 ] [ sp:object 362 ] [ sp:object
334 - [ sp:varName "installation"^^xsd:string 363 + [ sp:varName "productionFacility"^^xsd:string
335 ] ; 364 ] ;
336 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 365 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
337 - sp:subject _:b1 366 + sp:subject _:b2
338 - ]) ; 367 + ] [ sp:object
339 - sp:where ([ sp:object 368 + [ sp:varName "intervalStart"^^xsd:string
340 - [ sp:varName "contextRef"^^xsd:string
341 ] ; 369 ] ;
342 - sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; 370 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
371 + sp:subject _:b2
372 + ] [ sp:object
373 + [ sp:varName "intervalEnd"^^xsd:string
374 + ] ;
375 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
376 + sp:subject _:b2
377 + ] [ sp:object
378 + [ sp:varName "normalizedProductionFacilityName"^^xsd:string
379 + ] ;
380 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
343 sp:subject spin:_this 381 sp:subject spin:_this
344 - ] [ sp:object spin:_this ; 382 + ]) ;
345 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 383 + sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
384 + sp:predicate rdf:type ;
346 sp:subject 385 sp:subject
347 [ sp:varName "productionReport"^^xsd:string 386 [ sp:varName "productionReport"^^xsd:string
348 ] 387 ]
349 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; 388 + ] [ sp:object spin:_this ;
350 - sp:predicate rdf:type ; 389 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
351 sp:subject 390 sp:subject
352 [ sp:varName "productionReport"^^xsd:string 391 [ sp:varName "productionReport"^^xsd:string
353 ] 392 ]
393 + ] [ rdf:type sp:Optional ;
394 + sp:elements ([ sp:object
395 + [ sp:varName "intervalStart"^^xsd:string
396 + ] ;
397 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
398 + sp:subject spin:_this
399 + ] [ sp:object
400 + [ sp:varName "intervalEnd"^^xsd:string
401 + ] ;
402 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
403 + sp:subject spin:_this
404 + ])
405 + ] [ sp:object
406 + [ sp:varName "contextRef"^^xsd:string
407 + ] ;
408 + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
409 + sp:subject spin:_this
354 ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; 410 ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
355 sp:predicate rdf:type ; 411 sp:predicate rdf:type ;
356 sp:subject 412 sp:subject
357 [ sp:varName "contextRef"^^xsd:string 413 [ sp:varName "contextRef"^^xsd:string
358 ] 414 ]
359 ] [ sp:object 415 ] [ sp:object
360 - [ sp:varName "installationRef"^^xsd:string 416 + [ sp:varName "contextFacilityRef"^^xsd:string
361 ] ; 417 ] ;
362 - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; 418 + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
363 sp:subject 419 sp:subject
364 [ sp:varName "contextRef"^^xsd:string 420 [ sp:varName "contextRef"^^xsd:string
365 ] 421 ]
366 ] [ sp:object 422 ] [ sp:object
367 - [ sp:varName "installationRef"^^xsd:string 423 + [ sp:varName "contextFacilityRef"^^xsd:string
368 ] ; 424 ] ;
369 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 425 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
370 sp:subject 426 sp:subject
371 - [ sp:varName "installation"^^xsd:string 427 + [ sp:varName "productionFacility"^^xsd:string
428 + ]
429 + ] [ rdf:type sp:Bind ;
430 + sp:expression
431 + [ rdf:type spl:object ;
432 + sp:arg1 [ sp:varName "contextFacilityRef"^^xsd:string
433 + ] ;
434 + sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
435 + ] ;
436 + sp:variable
437 + [ sp:varName "normalizedProductionFacilityName"^^xsd:string
372 ] 438 ]
373 ]) 439 ])
374 ] ; 440 ] ;
...@@ -428,74 +494,21 @@ ...@@ -428,74 +494,21 @@
428 ] ; 494 ] ;
429 spin:rule 495 spin:rule
430 [ rdf:type sp:Construct ; 496 [ rdf:type sp:Construct ;
431 - rdfs:comment "STEP 10020 Add the operator"^^xsd:string ; 497 + rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ;
432 - sp:templates ([ sp:object _:b2 ; 498 + sp:templates ([ sp:object
433 - sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; 499 + [ sp:varName "date"^^xsd:string
434 - sp:subject
435 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
436 - ]
437 - ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
438 - sp:predicate rdf:type ;
439 - sp:subject _:b2
440 - ] [ sp:object
441 - [ sp:varName "operator"^^xsd:string
442 - ] ;
443 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
444 - sp:subject _:b2
445 - ]) ;
446 - sp:where ([ sp:object
447 - [ sp:varName "contextRef"^^xsd:string
448 ] ; 500 ] ;
449 - sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; 501 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
450 sp:subject spin:_this 502 sp:subject spin:_this
451 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
452 - sp:predicate rdf:type ;
453 - sp:subject
454 - [ sp:varName "contextRef"^^xsd:string
455 - ]
456 ] [ sp:object 503 ] [ sp:object
457 - [ sp:varName "operatorRef"^^xsd:string 504 + [ sp:varName "date"^^xsd:string
458 - ] ;
459 - sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
460 - sp:subject
461 - [ sp:varName "contextRef"^^xsd:string
462 - ]
463 - ] [ sp:object
464 - [ sp:varName "operatorRef"^^xsd:string
465 - ] ;
466 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
467 - sp:subject
468 - [ sp:varName "operator"^^xsd:string
469 - ]
470 - ] [ sp:object spin:_this ;
471 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
472 - sp:subject
473 - [ sp:varName "productionReport"^^xsd:string
474 - ]
475 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
476 - sp:predicate rdf:type ;
477 - sp:subject
478 - [ sp:varName "productionReport"^^xsd:string
479 - ]
480 - ] [ sp:object
481 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
482 ] ; 505 ] ;
483 - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; 506 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
484 - sp:subject 507 + sp:subject spin:_this
485 - [ sp:varName "productionReport"^^xsd:string 508 + ] [ sp:object
486 - ] 509 + [ sp:varName "date"^^xsd:string
487 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
488 - sp:predicate rdf:type ;
489 - sp:subject
490 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
491 - ]
492 - ])
493 ] ; 510 ] ;
494 - spin:rule 511 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
495 - [ rdf:type sp:Construct ;
496 - rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
497 - sp:templates ([ sp:object "noDate" ;
498 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
499 sp:subject spin:_this 512 sp:subject spin:_this
500 ]) ; 513 ]) ;
501 sp:where ([ sp:object 514 sp:where ([ sp:object
...@@ -508,29 +521,27 @@ ...@@ -508,29 +521,27 @@
508 sp:subject 521 sp:subject
509 [ sp:varName "contextRef"^^xsd:string 522 [ sp:varName "contextRef"^^xsd:string
510 ] 523 ]
511 - ] [ rdf:type sp:NotExists ; 524 + ] [ sp:object
512 - sp:elements ([ sp:object 525 + [ sp:varName "date"^^xsd:string
513 - [ sp:varName "dateEnd"^^xsd:string
514 ] ; 526 ] ;
515 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; 527 + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
516 sp:subject 528 sp:subject
517 [ sp:varName "contextRef"^^xsd:string 529 [ sp:varName "contextRef"^^xsd:string
518 ] 530 ]
519 - ])
520 ] [ rdf:type sp:NotExists ; 531 ] [ rdf:type sp:NotExists ;
521 sp:elements ([ sp:object 532 sp:elements ([ sp:object
522 - [ sp:varName "date"^^xsd:string 533 + [ sp:varName "dateStart"^^xsd:string
523 ] ; 534 ] ;
524 - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; 535 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
525 sp:subject 536 sp:subject
526 [ sp:varName "contextRef"^^xsd:string 537 [ sp:varName "contextRef"^^xsd:string
527 ] 538 ]
528 ]) 539 ])
529 ] [ rdf:type sp:NotExists ; 540 ] [ rdf:type sp:NotExists ;
530 sp:elements ([ sp:object 541 sp:elements ([ sp:object
531 - [ sp:varName "dateStart"^^xsd:string 542 + [ sp:varName "dateEnd"^^xsd:string
532 ] ; 543 ] ;
533 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; 544 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
534 sp:subject 545 sp:subject
535 [ sp:varName "contextRef"^^xsd:string 546 [ sp:varName "contextRef"^^xsd:string
536 ] 547 ]
...@@ -539,24 +550,24 @@ ...@@ -539,24 +550,24 @@
539 ] ; 550 ] ;
540 spin:rule 551 spin:rule
541 [ rdf:type sp:Construct ; 552 [ rdf:type sp:Construct ;
542 - rdfs:comment "STEP 10001o Set the default production facility from context/contextFacility"^^xsd:string ; 553 + rdfs:comment "STEP 10001m Create the ProductionReport - extract the report name from context/contextFacility"^^xsd:string ;
543 - sp:templates ([ sp:object spin:_this ; 554 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
544 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 555 + sp:predicate rdf:type ;
545 sp:subject 556 sp:subject
546 - [ sp:varName "productionFacility"^^xsd:string 557 + [ sp:varName "productionReport"^^xsd:string
547 ] 558 ]
548 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ; 559 + ] [ sp:object spin:_this ;
549 - sp:predicate rdf:type ; 560 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
550 sp:subject 561 sp:subject
551 - [ sp:varName "productionFacility"^^xsd:string 562 + [ sp:varName "productionReport"^^xsd:string
552 ] 563 ]
553 - ] [ sp:object
554 - [ sp:varName "normalizedProductionFacilityName"^^xsd:string
555 - ] ;
556 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
557 - sp:subject spin:_this
558 ]) ; 564 ]) ;
559 sp:where ([ sp:object 565 sp:where ([ sp:object
566 + [ sp:varName "intervalIdentifier"^^xsd:string
567 + ] ;
568 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
569 + sp:subject spin:_this
570 + ] [ sp:object
560 [ sp:varName "contextRef"^^xsd:string 571 [ sp:varName "contextRef"^^xsd:string
561 ] ; 572 ] ;
562 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; 573 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
...@@ -573,13 +584,6 @@ ...@@ -573,13 +584,6 @@
573 sp:subject 584 sp:subject
574 [ sp:varName "contextRef"^^xsd:string 585 [ sp:varName "contextRef"^^xsd:string
575 ] 586 ]
576 - ] [ sp:object
577 - [ sp:varName "contextFacilityRef"^^xsd:string
578 - ] ;
579 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
580 - sp:subject
581 - [ sp:varName "productionFacility"^^xsd:string
582 - ]
583 ] [ rdf:type sp:Bind ; 587 ] [ rdf:type sp:Bind ;
584 sp:expression 588 sp:expression
585 [ rdf:type spl:object ; 589 [ rdf:type spl:object ;
...@@ -588,20 +592,39 @@ ...@@ -588,20 +592,39 @@
588 sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> 592 sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
589 ] ; 593 ] ;
590 sp:variable 594 sp:variable
591 - [ sp:varName "normalizedProductionFacilityName"^^xsd:string 595 + [ sp:varName "normalizedContextFacilityName"^^xsd:string
596 + ]
597 + ] [ rdf:type sp:Bind ;
598 + sp:expression
599 + [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
600 + sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string
601 + ] ;
602 + sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
603 + ]
604 + ] ;
605 + sp:variable
606 + [ sp:varName "productionReport"^^xsd:string
592 ] 607 ]
593 ]) 608 ])
594 ] ; 609 ] ;
595 spin:rule 610 spin:rule
596 [ rdf:type sp:Construct ; 611 [ rdf:type sp:Construct ;
597 - rdfs:comment "STEP 10010 Add the contextFacility - unless the contextFacility is the production facility"^^xsd:string ; 612 + rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
598 sp:templates ([ sp:object 613 sp:templates ([ sp:object
599 - [ sp:varName "contextFacility"^^xsd:string 614 + [ sp:varName "dateEnd"^^xsd:string
600 ] ; 615 ] ;
601 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; 616 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
602 - sp:subject 617 + sp:subject spin:_this
603 - [ sp:varName "productionFacility"^^xsd:string 618 + ] [ sp:object
604 - ] 619 + [ sp:varName "dateEnd"^^xsd:string
620 + ] ;
621 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
622 + sp:subject spin:_this
623 + ] [ sp:object
624 + [ sp:varName "dateEnd"^^xsd:string
625 + ] ;
626 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
627 + sp:subject spin:_this
605 ]) ; 628 ]) ;
606 sp:where ([ sp:object 629 sp:where ([ sp:object
607 [ sp:varName "contextRef"^^xsd:string 630 [ sp:varName "contextRef"^^xsd:string
...@@ -614,67 +637,42 @@ ...@@ -614,67 +637,42 @@
614 [ sp:varName "contextRef"^^xsd:string 637 [ sp:varName "contextRef"^^xsd:string
615 ] 638 ]
616 ] [ sp:object 639 ] [ sp:object
617 - [ sp:varName "contextFacilityRef"^^xsd:string 640 + [ sp:varName "dateEnd"^^xsd:string
618 ] ; 641 ] ;
619 - sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; 642 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
620 sp:subject 643 sp:subject
621 [ sp:varName "contextRef"^^xsd:string 644 [ sp:varName "contextRef"^^xsd:string
622 ] 645 ]
623 - ] [ sp:object
624 - [ sp:varName "contextFacilityRef"^^xsd:string
625 - ] ;
626 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
627 - sp:subject
628 - [ sp:varName "contextFacility"^^xsd:string
629 - ]
630 ] [ rdf:type sp:NotExists ; 646 ] [ rdf:type sp:NotExists ;
631 - sp:elements ([ sp:object spin:_this ; 647 + sp:elements ([ sp:object
632 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 648 + [ sp:varName "date"^^xsd:string
633 - sp:subject
634 - [ sp:varName "contextFacility"^^xsd:string
635 - ]
636 - ])
637 - ] [ sp:object spin:_this ;
638 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
639 - sp:subject
640 - [ sp:varName "productionReport"^^xsd:string
641 - ]
642 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
643 - sp:predicate rdf:type ;
644 - sp:subject
645 - [ sp:varName "productionReport"^^xsd:string
646 - ]
647 - ] [ sp:object
648 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
649 ] ; 649 ] ;
650 - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; 650 + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
651 - sp:subject
652 - [ sp:varName "productionReport"^^xsd:string
653 - ]
654 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
655 - sp:predicate rdf:type ;
656 sp:subject 651 sp:subject
657 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 652 + [ sp:varName "contextRef"^^xsd:string
658 ] 653 ]
659 - ] [ sp:object 654 + ])
660 - [ sp:varName "productionFacility"^^xsd:string 655 + ] [ rdf:type sp:NotExists ;
656 + sp:elements ([ sp:object
657 + [ sp:varName "dateStart"^^xsd:string
661 ] ; 658 ] ;
662 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 659 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
663 sp:subject 660 sp:subject
664 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 661 + [ sp:varName "contextRef"^^xsd:string
665 ] 662 ]
666 ]) 663 ])
664 + ])
667 ] ; 665 ] ;
668 spin:rule 666 spin:rule
669 [ rdf:type sp:Construct ; 667 [ rdf:type sp:Construct ;
670 - rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ; 668 + rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
671 sp:templates ([ sp:object 669 sp:templates ([ sp:object
672 [ sp:varName "intervalIdentifier"^^xsd:string 670 [ sp:varName "intervalIdentifier"^^xsd:string
673 ] ; 671 ] ;
674 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; 672 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
675 sp:subject spin:_this 673 sp:subject spin:_this
676 ] [ sp:object 674 ] [ sp:object
677 - [ sp:varName "dateStart"^^xsd:string 675 + [ sp:varName "date"^^xsd:string
678 ] ; 676 ] ;
679 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; 677 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
680 sp:subject spin:_this 678 sp:subject spin:_this
...@@ -695,12 +693,21 @@ ...@@ -695,12 +693,21 @@
695 [ sp:varName "contextRef"^^xsd:string 693 [ sp:varName "contextRef"^^xsd:string
696 ] 694 ]
697 ] [ sp:object 695 ] [ sp:object
696 + [ sp:varName "date"^^xsd:string
697 + ] ;
698 + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
699 + sp:subject
700 + [ sp:varName "contextRef"^^xsd:string
701 + ]
702 + ] [ rdf:type sp:NotExists ;
703 + sp:elements ([ sp:object
698 [ sp:varName "dateStart"^^xsd:string 704 [ sp:varName "dateStart"^^xsd:string
699 ] ; 705 ] ;
700 sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; 706 sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
701 sp:subject 707 sp:subject
702 [ sp:varName "contextRef"^^xsd:string 708 [ sp:varName "contextRef"^^xsd:string
703 ] 709 ]
710 + ])
704 ] [ sp:object 711 ] [ sp:object
705 [ sp:varName "dateEnd"^^xsd:string 712 [ sp:varName "dateEnd"^^xsd:string
706 ] ; 713 ] ;
...@@ -711,7 +718,7 @@ ...@@ -711,7 +718,7 @@
711 ] [ rdf:type sp:Bind ; 718 ] [ rdf:type sp:Bind ;
712 sp:expression 719 sp:expression
713 [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; 720 [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
714 - sp:arg1 [ sp:varName "dateStart"^^xsd:string 721 + sp:arg1 [ sp:varName "date"^^xsd:string
715 ] ; 722 ] ;
716 sp:arg2 [ sp:varName "dateEnd"^^xsd:string 723 sp:arg2 [ sp:varName "dateEnd"^^xsd:string
717 ] 724 ]
...@@ -723,25 +730,54 @@ ...@@ -723,25 +730,54 @@
723 ] ; 730 ] ;
724 spin:rule 731 spin:rule
725 [ rdf:type sp:Construct ; 732 [ rdf:type sp:Construct ;
726 - rdfs:comment "STEP 10001p Create the ProductionReport - unable to find an identifier"^^xsd:string ; 733 + rdfs:comment "STEP 10001r Set the submitting installation"^^xsd:string ;
727 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; 734 + sp:templates ([ sp:object _:b3 ;
728 - sp:predicate rdf:type ; 735 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
729 sp:subject 736 sp:subject
730 [ sp:varName "productionReport"^^xsd:string 737 [ sp:varName "productionReport"^^xsd:string
731 ] 738 ]
732 - ] [ sp:object spin:_this ; 739 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
740 + sp:predicate rdf:type ;
741 + sp:subject _:b3
742 + ] [ sp:object
743 + [ sp:varName "installation"^^xsd:string
744 + ] ;
745 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
746 + sp:subject _:b3
747 + ] [ sp:object
748 + [ sp:varName "intervalStart"^^xsd:string
749 + ] ;
750 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
751 + sp:subject _:b3
752 + ] [ sp:object
753 + [ sp:varName "intervalEnd"^^xsd:string
754 + ] ;
755 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
756 + sp:subject _:b3
757 + ]) ;
758 + sp:where ([ sp:object spin:_this ;
733 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 759 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
734 sp:subject 760 sp:subject
735 [ sp:varName "productionReport"^^xsd:string 761 [ sp:varName "productionReport"^^xsd:string
736 ] 762 ]
737 - ]) ; 763 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
738 - sp:where ([ sp:object 764 + sp:predicate rdf:type ;
739 - [ sp:varName "intervalIdentifier"^^xsd:string 765 + sp:subject
766 + [ sp:varName "productionReport"^^xsd:string
767 + ]
768 + ] [ rdf:type sp:Optional ;
769 + sp:elements ([ sp:object
770 + [ sp:varName "intervalStart"^^xsd:string
740 ] ; 771 ] ;
741 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; 772 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
742 sp:subject spin:_this 773 sp:subject spin:_this
743 - ] [ rdf:type sp:NotExists ; 774 + ] [ sp:object
744 - sp:elements ([ sp:object 775 + [ sp:varName "intervalEnd"^^xsd:string
776 + ] ;
777 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
778 + sp:subject spin:_this
779 + ])
780 + ] [ sp:object
745 [ sp:varName "contextRef"^^xsd:string 781 [ sp:varName "contextRef"^^xsd:string
746 ] ; 782 ] ;
747 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; 783 sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
...@@ -752,48 +788,79 @@ ...@@ -752,48 +788,79 @@
752 [ sp:varName "contextRef"^^xsd:string 788 [ sp:varName "contextRef"^^xsd:string
753 ] 789 ]
754 ] [ sp:object 790 ] [ sp:object
755 - [ sp:varName "contextFacilityRef"^^xsd:string 791 + [ sp:varName "installationRef"^^xsd:string
756 ] ; 792 ] ;
757 - sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; 793 + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
758 sp:subject 794 sp:subject
759 [ sp:varName "contextRef"^^xsd:string 795 [ sp:varName "contextRef"^^xsd:string
760 ] 796 ]
761 - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; 797 + ] [ sp:object
762 - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; 798 + [ sp:varName "installationRef"^^xsd:string
799 + ] ;
800 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
763 sp:subject 801 sp:subject
764 - [ sp:varName "contextFacilityRef"^^xsd:string 802 + [ sp:varName "installation"^^xsd:string
765 ] 803 ]
766 ]) 804 ])
767 - ] [ rdf:type sp:NotExists ;
768 - sp:elements ([ sp:object
769 - [ sp:varName "installationRef"^^xsd:string
770 ] ; 805 ] ;
771 - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; 806 + spin:rule
807 + [ rdf:type sp:Construct ;
808 + rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ;
809 + sp:templates ([ sp:object
810 + [ sp:varName "intervalIdentifier"^^xsd:string
811 + ] ;
812 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
813 + sp:subject spin:_this
814 + ] [ sp:object
815 + [ sp:varName "dateStart"^^xsd:string
816 + ] ;
817 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
818 + sp:subject spin:_this
819 + ] [ sp:object
820 + [ sp:varName "dateEnd"^^xsd:string
821 + ] ;
822 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
823 + sp:subject spin:_this
824 + ]) ;
825 + sp:where ([ sp:object
826 + [ sp:varName "contextRef"^^xsd:string
827 + ] ;
828 + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
829 + sp:subject spin:_this
830 + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
831 + sp:predicate rdf:type ;
772 sp:subject 832 sp:subject
773 [ sp:varName "contextRef"^^xsd:string 833 [ sp:varName "contextRef"^^xsd:string
774 ] 834 ]
775 ] [ sp:object 835 ] [ sp:object
776 - [ sp:varName "installationRef"^^xsd:string 836 + [ sp:varName "dateStart"^^xsd:string
777 ] ; 837 ] ;
778 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 838 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
779 sp:subject 839 sp:subject
780 - [ sp:varName "reportingFacility"^^xsd:string 840 + [ sp:varName "contextRef"^^xsd:string
841 + ]
842 + ] [ sp:object
843 + [ sp:varName "dateEnd"^^xsd:string
844 + ] ;
845 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
846 + sp:subject
847 + [ sp:varName "contextRef"^^xsd:string
781 ] 848 ]
782 - ])
783 ] [ rdf:type sp:Bind ; 849 ] [ rdf:type sp:Bind ;
784 sp:expression 850 sp:expression
785 - [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; 851 + [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
786 - sp:arg1 "" ; 852 + sp:arg1 [ sp:varName "dateStart"^^xsd:string
787 - sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string 853 + ] ;
854 + sp:arg2 [ sp:varName "dateEnd"^^xsd:string
788 ] 855 ]
789 ] ; 856 ] ;
790 sp:variable 857 sp:variable
791 - [ sp:varName "productionReport"^^xsd:string 858 + [ sp:varName "intervalIdentifier"^^xsd:string
792 ] 859 ]
793 ]) 860 ])
794 ] . 861 ] .
795 862
796 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> 863 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0>
797 rdf:type owl:Ontology ; 864 rdf:type owl:Ontology ;
798 - 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> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ; 865 + owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <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> ;
799 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 866 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......