David Leal

some stuff on parameterSet + bug in weather

...@@ -23,29 +23,19 @@ ...@@ -23,29 +23,19 @@
23 <http://www.epim.no/schemas/mprml/1#Cs_productVolumeFacility> 23 <http://www.epim.no/schemas/mprml/1#Cs_productVolumeFacility>
24 spin:rule 24 spin:rule
25 [ rdf:type sp:Construct ; 25 [ rdf:type sp:Construct ;
26 - rdfs:comment "STEP 80003b Create temporal parts of parameterSet facility corresponding to the start and end without duplicates"^^xsd:string ; 26 + rdfs:comment "STEP 80000a Find the classes of spatial part that need to be created for the parameter set properties."^^xsd:string ;
27 - sp:templates ([ sp:object 27 + sp:templates ([ sp:object spin:_this ;
28 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
29 + sp:subject
28 [ sp:varName "classOfSpatialPart"^^xsd:string 30 [ sp:varName "classOfSpatialPart"^^xsd:string
29 - ] ; 31 + ]
30 - sp:predicate rdf:type ;
31 - sp:subject _:b1
32 - ] [ sp:object
33 - [ sp:varName "intervalStart"^^xsd:string
34 - ] ;
35 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
36 - sp:subject _:b1
37 - ] [ sp:object
38 - [ sp:varName "intervalEnd"^^xsd:string
39 - ] ;
40 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
41 - sp:subject _:b1
42 - ] [ sp:object
43 - [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
44 - ] ;
45 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
46 - sp:subject _:b1
47 ]) ; 32 ]) ;
48 - sp:where ([ sp:object spin:_this ; 33 + sp:where ([ sp:object
34 + [ sp:varName "parameterSetRef"^^xsd:string
35 + ] ;
36 + sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
37 + sp:subject spin:_this
38 + ] [ sp:object spin:_this ;
49 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 39 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
50 sp:subject 40 sp:subject
51 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 41 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
...@@ -56,58 +46,28 @@ ...@@ -56,58 +46,28 @@
56 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 46 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
57 ] 47 ]
58 ] [ sp:object 48 ] [ sp:object
59 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 49 + [ sp:varName "nameRef"^^xsd:string
60 - ] ;
61 - sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
62 - sp:subject
63 - [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
64 - ]
65 - ] [ sp:object
66 - [ sp:varName "classOfSpatialPart"^^xsd:string
67 ] ; 50 ] ;
68 - sp:predicate rdf:type ; 51 + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
69 sp:subject 52 sp:subject
70 - [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string 53 + [ sp:varName "parameterSetRef"^^xsd:string
71 ] 54 ]
72 ] [ sp:object 55 ] [ sp:object
73 - [ sp:varName "intervalString"^^xsd:string 56 + [ sp:varName "nameRef"^^xsd:string
74 ] ; 57 ] ;
75 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ; 58 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
76 sp:subject 59 sp:subject
77 - [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string 60 + [ sp:varName "classOfSpatialPart"^^xsd:string
78 - ]
79 - ] [ rdf:type sp:Bind ;
80 - sp:expression
81 - [ rdf:type afn:substr ;
82 - sp:arg1 [ sp:varName "intervalString"^^xsd:string
83 - ] ;
84 - sp:arg2 0 ;
85 - sp:arg3 [ rdf:type smf:indexOf ;
86 - sp:arg1 [ sp:varName "intervalString"^^xsd:string
87 - ] ;
88 - sp:arg2 "$"
89 - ]
90 - ] ;
91 - sp:variable
92 - [ sp:varName "intervalStart"^^xsd:string
93 - ]
94 - ] [ rdf:type sp:Bind ;
95 - sp:expression
96 - [ rdf:type afn:substr ;
97 - sp:arg1 [ rdf:type afn:substr ;
98 - sp:arg1 [ sp:varName "intervalString"^^xsd:string
99 - ] ;
100 - sp:arg2 [ rdf:type smf:indexOf ;
101 - sp:arg1 [ sp:varName "intervalString"^^xsd:string
102 - ] ;
103 - sp:arg2 "$"
104 - ]
105 - ] ;
106 - sp:arg2 1
107 - ] ;
108 - sp:variable
109 - [ sp:varName "intervalEnd"^^xsd:string
110 ] 61 ]
62 + ] [ rdf:type sp:NotExists ;
63 + sp:elements ([ sp:object
64 + [ sp:varName "classOfSpatialPart"^^xsd:string
65 + ] ;
66 + sp:predicate rdf:type ;
67 + sp:subject
68 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
69 + ]
70 + ])
111 ]) 71 ])
112 ] ; 72 ] ;
113 spin:rule 73 spin:rule
...@@ -117,22 +77,22 @@ ...@@ -117,22 +77,22 @@
117 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 77 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
118 ] ; 78 ] ;
119 sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ; 79 sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
120 - sp:subject _:b2 80 + sp:subject _:b1
121 ] [ sp:object 81 ] [ sp:object
122 [ sp:varName "classOfSpatialPart"^^xsd:string 82 [ sp:varName "classOfSpatialPart"^^xsd:string
123 ] ; 83 ] ;
124 sp:predicate rdf:type ; 84 sp:predicate rdf:type ;
125 - sp:subject _:b2 85 + sp:subject _:b1
126 ] [ sp:object 86 ] [ sp:object
127 [ sp:varName "startedAt"^^xsd:string 87 [ sp:varName "startedAt"^^xsd:string
128 ] ; 88 ] ;
129 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 89 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
130 - sp:subject _:b2 90 + sp:subject _:b1
131 ] [ sp:object 91 ] [ sp:object
132 [ sp:varName "finishedAt"^^xsd:string 92 [ sp:varName "finishedAt"^^xsd:string
133 ] ; 93 ] ;
134 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 94 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
135 - sp:subject _:b2 95 + sp:subject _:b1
136 ]) ; 96 ]) ;
137 sp:where ([ sp:object spin:_this ; 97 sp:where ([ sp:object spin:_this ;
138 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 98 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
...@@ -176,19 +136,29 @@ ...@@ -176,19 +136,29 @@
176 ] ; 136 ] ;
177 spin:rule 137 spin:rule
178 [ rdf:type sp:Construct ; 138 [ rdf:type sp:Construct ;
179 - rdfs:comment "STEP 80000a Find the classes of spatial part that need to be created for the parameter set properties."^^xsd:string ; 139 + rdfs:comment "STEP 80003b Create temporal parts of parameterSet facility corresponding to the start and end without duplicates"^^xsd:string ;
180 - sp:templates ([ sp:object spin:_this ; 140 + sp:templates ([ sp:object
181 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
182 - sp:subject
183 [ sp:varName "classOfSpatialPart"^^xsd:string 141 [ sp:varName "classOfSpatialPart"^^xsd:string
184 - ]
185 - ]) ;
186 - sp:where ([ sp:object
187 - [ sp:varName "parameterSetRef"^^xsd:string
188 ] ; 142 ] ;
189 - sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ; 143 + sp:predicate rdf:type ;
190 - sp:subject spin:_this 144 + sp:subject _:b2
191 - ] [ sp:object spin:_this ; 145 + ] [ sp:object
146 + [ sp:varName "intervalStart"^^xsd:string
147 + ] ;
148 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
149 + sp:subject _:b2
150 + ] [ sp:object
151 + [ sp:varName "intervalEnd"^^xsd:string
152 + ] ;
153 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
154 + sp:subject _:b2
155 + ] [ sp:object
156 + [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
157 + ] ;
158 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
159 + sp:subject _:b2
160 + ]) ;
161 + sp:where ([ sp:object spin:_this ;
192 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 162 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
193 sp:subject 163 sp:subject
194 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 164 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
...@@ -199,76 +169,117 @@ ...@@ -199,76 +169,117 @@
199 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 169 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
200 ] 170 ]
201 ] [ sp:object 171 ] [ sp:object
202 - [ sp:varName "nameRef"^^xsd:string 172 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
203 ] ; 173 ] ;
204 - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ; 174 + sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
205 sp:subject 175 sp:subject
206 - [ sp:varName "parameterSetRef"^^xsd:string 176 + [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
207 ] 177 ]
208 ] [ sp:object 178 ] [ sp:object
209 - [ sp:varName "nameRef"^^xsd:string 179 + [ sp:varName "classOfSpatialPart"^^xsd:string
210 ] ; 180 ] ;
211 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ; 181 + sp:predicate rdf:type ;
212 sp:subject 182 sp:subject
213 - [ sp:varName "classOfSpatialPart"^^xsd:string 183 + [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
184 + ]
185 + ] [ sp:object
186 + [ sp:varName "intervalString"^^xsd:string
187 + ] ;
188 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ;
189 + sp:subject
190 + [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
191 + ]
192 + ] [ rdf:type sp:Bind ;
193 + sp:expression
194 + [ rdf:type afn:substr ;
195 + sp:arg1 [ sp:varName "intervalString"^^xsd:string
196 + ] ;
197 + sp:arg2 0 ;
198 + sp:arg3 [ rdf:type smf:indexOf ;
199 + sp:arg1 [ sp:varName "intervalString"^^xsd:string
200 + ] ;
201 + sp:arg2 "$"
202 + ]
203 + ] ;
204 + sp:variable
205 + [ sp:varName "intervalStart"^^xsd:string
206 + ]
207 + ] [ rdf:type sp:Bind ;
208 + sp:expression
209 + [ rdf:type afn:substr ;
210 + sp:arg1 [ rdf:type afn:substr ;
211 + sp:arg1 [ sp:varName "intervalString"^^xsd:string
212 + ] ;
213 + sp:arg2 [ rdf:type smf:indexOf ;
214 + sp:arg1 [ sp:varName "intervalString"^^xsd:string
215 + ] ;
216 + sp:arg2 "$"
217 + ]
218 + ] ;
219 + sp:arg2 1
220 + ] ;
221 + sp:variable
222 + [ sp:varName "intervalEnd"^^xsd:string
214 ] 223 ]
215 - ] [ rdf:type sp:NotExists ;
216 - sp:elements ([ sp:object
217 - [ sp:varName "classOfSpatialPart"^^xsd:string
218 - ] ;
219 - sp:predicate rdf:type ;
220 - sp:subject
221 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
222 - ]
223 - ])
224 ]) 224 ])
225 ] . 225 ] .
226 226
227 <http://www.epim.no/schemas/mprml/1#Cs_productVolumeParameterSet> 227 <http://www.epim.no/schemas/mprml/1#Cs_productVolumeParameterSet>
228 spin:rule 228 spin:rule
229 [ rdf:type sp:Construct ; 229 [ rdf:type sp:Construct ;
230 - rdfs:comment "STEP 80000d The whole production facility has the parameterSet property"^^xsd:string ; 230 + rdfs:comment "STEP 80003d No temporal part of the parameterSetFacility is required"^^xsd:string ;
231 - sp:templates ([ sp:object spin:_this ; 231 + sp:templates ([ sp:object
232 + [ sp:varName "parameterRef"^^xsd:string
233 + ] ;
232 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 234 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
233 sp:subject 235 sp:subject
234 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 236 + [ sp:varName "parameterSetFacility"^^xsd:string
235 ] 237 ]
236 ]) ; 238 ]) ;
237 sp:where ([ sp:object spin:_this ; 239 sp:where ([ sp:object spin:_this ;
238 - sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ; 240 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
239 sp:subject 241 sp:subject
240 - [ sp:varName "facilityRef"^^xsd:string 242 + [ sp:varName "parameterSetFacility"^^xsd:string
241 ] 243 ]
242 ] [ sp:object 244 ] [ sp:object
243 - [ sp:varName "facilityRef"^^xsd:string 245 + [ sp:varName "classOfParameterSetFacility"^^xsd:string
244 ] ; 246 ] ;
245 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
246 - sp:subject
247 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
248 - ]
249 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
250 sp:predicate rdf:type ; 247 sp:predicate rdf:type ;
251 sp:subject 248 sp:subject
252 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 249 + [ sp:varName "parameterSetFacility"^^xsd:string
253 ] 250 ]
254 ] [ sp:object 251 ] [ sp:object
255 - [ sp:varName "nameRef"^^xsd:string 252 + [ sp:varName "parameterRef"^^xsd:string
256 ] ; 253 ] ;
257 - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ; 254 + sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
258 sp:subject spin:_this 255 sp:subject spin:_this
259 ] [ sp:object 256 ] [ sp:object
260 - [ sp:varName "nameRef"^^xsd:string 257 + [ sp:varName "intervalStart"^^xsd:string
261 ] ; 258 ] ;
262 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ; 259 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
263 sp:subject 260 sp:subject
264 - [ sp:varName "classOfProductionFacility"^^xsd:string 261 + [ sp:varName "parameterRef"^^xsd:string
265 ] 262 ]
266 ] [ sp:object 263 ] [ sp:object
267 - [ sp:varName "classOfProductionFacility"^^xsd:string 264 + [ sp:varName "intervalEnd"^^xsd:string
268 ] ; 265 ] ;
269 - sp:predicate rdf:type ; 266 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
270 sp:subject 267 sp:subject
271 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 268 + [ sp:varName "parameterRef"^^xsd:string
269 + ]
270 + ] [ sp:object
271 + [ sp:varName "intervalStart"^^xsd:string
272 + ] ;
273 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
274 + sp:subject
275 + [ sp:varName "parameterSetFacility"^^xsd:string
276 + ]
277 + ] [ sp:object
278 + [ sp:varName "intervalEnd"^^xsd:string
279 + ] ;
280 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
281 + sp:subject
282 + [ sp:varName "parameterSetFacility"^^xsd:string
272 ] 283 ]
273 ]) 284 ])
274 ] ; 285 ] ;
...@@ -346,13 +357,13 @@ ...@@ -346,13 +357,13 @@
346 ] ; 357 ] ;
347 spin:rule 358 spin:rule
348 [ rdf:type sp:Construct ; 359 [ rdf:type sp:Construct ;
349 - rdfs:comment "STEP 80003d No temporal part of the parameterSetFacility is required"^^xsd:string ; 360 + rdfs:comment "STEP 80001b Regularise start and end times - start time inherited from temporal part of production facility"^^xsd:string ;
350 sp:templates ([ sp:object 361 sp:templates ([ sp:object
351 - [ sp:varName "parameterRef"^^xsd:string 362 + [ sp:varName "startString"^^xsd:string
352 ] ; 363 ] ;
353 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 364 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
354 sp:subject 365 sp:subject
355 - [ sp:varName "parameterSetFacility"^^xsd:string 366 + [ sp:varName "parameterRef"^^xsd:string
356 ] 367 ]
357 ]) ; 368 ]) ;
358 sp:where ([ sp:object spin:_this ; 369 sp:where ([ sp:object spin:_this ;
...@@ -361,74 +372,115 @@ ...@@ -361,74 +372,115 @@
361 [ sp:varName "parameterSetFacility"^^xsd:string 372 [ sp:varName "parameterSetFacility"^^xsd:string
362 ] 373 ]
363 ] [ sp:object 374 ] [ sp:object
364 - [ sp:varName "classOfParameterSetFacility"^^xsd:string 375 + [ sp:varName "startedAt"^^xsd:string
365 ] ; 376 ] ;
366 - sp:predicate rdf:type ; 377 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
367 sp:subject 378 sp:subject
368 [ sp:varName "parameterSetFacility"^^xsd:string 379 [ sp:varName "parameterSetFacility"^^xsd:string
369 ] 380 ]
370 - ] [ sp:object 381 + ] [ rdf:type sp:Bind ;
382 + sp:expression
383 + [ rdf:type smf:cast ;
384 + arg:datatype xsd:string ;
385 + sp:arg1 [ sp:varName "startedAt"^^xsd:string
386 + ]
387 + ] ;
388 + sp:variable
389 + [ sp:varName "startString"^^xsd:string
390 + ]
391 + ] [ sp:object
371 [ sp:varName "parameterRef"^^xsd:string 392 [ sp:varName "parameterRef"^^xsd:string
372 ] ; 393 ] ;
373 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ; 394 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
374 sp:subject spin:_this 395 sp:subject spin:_this
375 - ] [ sp:object 396 + ] [ rdf:type sp:NotExists ;
376 - [ sp:varName "intervalStart"^^xsd:string 397 + sp:elements ([ rdf:type sp:Union ;
377 - ] ; 398 + sp:elements (([ sp:object
378 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; 399 + [ sp:varName "dTimStart"^^xsd:string
400 + ] ;
401 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
402 + sp:subject
403 + [ sp:varName "parameterRef"^^xsd:string
404 + ]
405 + ]) ([ sp:object
406 + [ sp:varName "dateStart"^^xsd:string
407 + ] ;
408 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
409 + sp:subject
410 + [ sp:varName "parameterRef"^^xsd:string
411 + ]
412 + ]))
413 + ])
414 + ])
415 + ] ;
416 + spin:rule
417 + [ rdf:type sp:Construct ;
418 + rdfs:comment "STEP 80000d The whole production facility has the parameterSet property"^^xsd:string ;
419 + sp:templates ([ sp:object spin:_this ;
420 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
379 sp:subject 421 sp:subject
380 - [ sp:varName "parameterRef"^^xsd:string 422 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
423 + ]
424 + ]) ;
425 + sp:where ([ sp:object spin:_this ;
426 + sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
427 + sp:subject
428 + [ sp:varName "facilityRef"^^xsd:string
381 ] 429 ]
382 ] [ sp:object 430 ] [ sp:object
383 - [ sp:varName "intervalEnd"^^xsd:string 431 + [ sp:varName "facilityRef"^^xsd:string
384 ] ; 432 ] ;
385 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; 433 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
386 sp:subject 434 sp:subject
387 - [ sp:varName "parameterRef"^^xsd:string 435 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
436 + ]
437 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
438 + sp:predicate rdf:type ;
439 + sp:subject
440 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
388 ] 441 ]
389 ] [ sp:object 442 ] [ sp:object
390 - [ sp:varName "intervalStart"^^xsd:string 443 + [ sp:varName "nameRef"^^xsd:string
391 ] ; 444 ] ;
392 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 445 + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
446 + sp:subject spin:_this
447 + ] [ sp:object
448 + [ sp:varName "nameRef"^^xsd:string
449 + ] ;
450 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
393 sp:subject 451 sp:subject
394 - [ sp:varName "parameterSetFacility"^^xsd:string 452 + [ sp:varName "classOfProductionFacility"^^xsd:string
395 ] 453 ]
396 ] [ sp:object 454 ] [ sp:object
397 - [ sp:varName "intervalEnd"^^xsd:string 455 + [ sp:varName "classOfProductionFacility"^^xsd:string
398 ] ; 456 ] ;
399 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 457 + sp:predicate rdf:type ;
400 sp:subject 458 sp:subject
401 - [ sp:varName "parameterSetFacility"^^xsd:string 459 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
402 ] 460 ]
403 ]) 461 ])
404 ] ; 462 ] ;
405 spin:rule 463 spin:rule
406 [ rdf:type sp:Construct ; 464 [ rdf:type sp:Construct ;
407 - rdfs:comment "STEP 80003b Create temporal parts of parameterSet facility corresponding to the start and end without duplicates - moved to a rule on Cs_productVolumeFacility"^^xsd:string ; 465 + rdfs:comment "STEP 80004a Measurement qualifier specified"^^xsd:string ;
408 - sp:templates () ;
409 - sp:where ()
410 - ] ;
411 - spin:rule
412 - [ rdf:type sp:Construct ;
413 - rdfs:comment "STEP 80004b Measurement qualifier not specified"^^xsd:string ;
414 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ; 466 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ;
415 sp:predicate rdf:type ; 467 sp:predicate rdf:type ;
416 sp:subject 468 sp:subject
417 [ sp:varName "parameterFacility"^^xsd:string 469 [ sp:varName "parameterFacility"^^xsd:string
418 ] 470 ]
419 - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#ValidlyMeasuredState> ; 471 + ] [ sp:object
472 + [ sp:varName "measuredQualityType"^^xsd:string
473 + ] ;
420 sp:predicate rdf:type ; 474 sp:predicate rdf:type ;
421 sp:subject 475 sp:subject
422 [ sp:varName "parameterFacility"^^xsd:string 476 [ sp:varName "parameterFacility"^^xsd:string
423 ] 477 ]
424 ]) ; 478 ]) ;
425 - sp:where ([ rdf:type sp:NotExists ; 479 + sp:where ([ sp:object
426 - sp:elements ([ sp:object 480 + [ sp:varName "qualifierRef"^^xsd:string
427 - [ sp:varName "qualifierRef"^^xsd:string 481 + ] ;
428 - ] ; 482 + sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
429 - sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ; 483 + sp:subject spin:_this
430 - sp:subject spin:_this
431 - ])
432 ] [ sp:object 484 ] [ sp:object
433 [ sp:varName "parameterRef"^^xsd:string 485 [ sp:varName "parameterRef"^^xsd:string
434 ] ; 486 ] ;
...@@ -441,164 +493,95 @@ ...@@ -441,164 +493,95 @@
441 sp:subject 493 sp:subject
442 [ sp:varName "parameterFacility"^^xsd:string 494 [ sp:varName "parameterFacility"^^xsd:string
443 ] 495 ]
496 + ] [ rdf:type sp:Bind ;
497 + sp:expression
498 + [ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
499 + sp:arg1 [ sp:varName "qualifierRef"^^xsd:string
500 + ]
501 + ] ;
502 + sp:variable
503 + [ sp:varName "measuredQualityType"^^xsd:string
504 + ]
444 ]) 505 ])
445 ] ; 506 ] ;
446 spin:rule 507 spin:rule
447 [ rdf:type sp:Construct ; 508 [ rdf:type sp:Construct ;
448 - rdfs:comment "STEP 80001a Regularise start and end times - time specified by parameter element"^^xsd:string ; 509 + rdfs:comment "STEP 80000c Create the spatial parts that have the parameterSet property"^^xsd:string ;
449 - sp:templates ([ sp:object 510 + sp:templates ([ sp:object spin:_this ;
450 - [ sp:varName "dTimStartString"^^xsd:string 511 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
451 - ] ;
452 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
453 sp:subject 512 sp:subject
454 - [ sp:varName "parameterRef"^^xsd:string 513 + [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
514 + ]
515 + ]) ;
516 + sp:where ([ sp:object spin:_this ;
517 + sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
518 + sp:subject
519 + [ sp:varName "facilityRef"^^xsd:string
455 ] 520 ]
456 ] [ sp:object 521 ] [ sp:object
457 - [ sp:varName "dateStartString"^^xsd:string 522 + [ sp:varName "facilityRef"^^xsd:string
458 ] ; 523 ] ;
459 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; 524 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
460 sp:subject 525 sp:subject
461 - [ sp:varName "parameterRef"^^xsd:string 526 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
527 + ]
528 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
529 + sp:predicate rdf:type ;
530 + sp:subject
531 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
462 ] 532 ]
463 ] [ sp:object 533 ] [ sp:object
464 - [ sp:varName "dTimEndString"^^xsd:string 534 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
465 ] ; 535 ] ;
466 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; 536 + sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
467 sp:subject 537 sp:subject
468 - [ sp:varName "parameterRef"^^xsd:string 538 + [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
469 ] 539 ]
470 ] [ sp:object 540 ] [ sp:object
471 - [ sp:varName "dateEndString"^^xsd:string 541 + [ sp:varName "classOfSpatialPart"^^xsd:string
472 ] ; 542 ] ;
473 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; 543 + sp:predicate rdf:type ;
474 sp:subject 544 sp:subject
475 - [ sp:varName "parameterRef"^^xsd:string 545 + [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
476 ] 546 ]
477 - ]) ; 547 + ] [ sp:object
478 - sp:where ([ sp:object 548 + [ sp:varName "nameRef"^^xsd:string
479 - [ sp:varName "parameterRef"^^xsd:string
480 ] ; 549 ] ;
481 - sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ; 550 + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
482 sp:subject spin:_this 551 sp:subject spin:_this
483 - ] [ rdf:type sp:Optional ; 552 + ] [ sp:object
484 - sp:elements ([ sp:object 553 + [ sp:varName "nameRef"^^xsd:string
485 - [ sp:varName "dTimStart"^^xsd:string 554 + ] ;
486 - ] ; 555 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
487 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ; 556 + sp:subject
488 - sp:subject 557 + [ sp:varName "classOfSpatialPart"^^xsd:string
489 - [ sp:varName "parameterRef"^^xsd:string 558 + ]
490 - ] 559 + ] [ rdf:type sp:NotExists ;
491 - ] [ rdf:type sp:Bind ;
492 - sp:expression
493 - [ rdf:type smf:cast ;
494 - arg:datatype xsd:string ;
495 - sp:arg1 [ sp:varName "dTimStart"^^xsd:string
496 - ]
497 - ] ;
498 - sp:variable
499 - [ sp:varName "dTimStartString"^^xsd:string
500 - ]
501 - ])
502 - ] [ rdf:type sp:Optional ;
503 - sp:elements ([ sp:object
504 - [ sp:varName "dTimEnd"^^xsd:string
505 - ] ;
506 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
507 - sp:subject
508 - [ sp:varName "parameterRef"^^xsd:string
509 - ]
510 - ] [ rdf:type sp:Bind ;
511 - sp:expression
512 - [ rdf:type smf:cast ;
513 - arg:datatype xsd:string ;
514 - sp:arg1 [ sp:varName "dTimEnd"^^xsd:string
515 - ]
516 - ] ;
517 - sp:variable
518 - [ sp:varName "dTimEndString"^^xsd:string
519 - ]
520 - ])
521 - ] [ rdf:type sp:Optional ;
522 - sp:elements ([ sp:object
523 - [ sp:varName "dateStart"^^xsd:string
524 - ] ;
525 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
526 - sp:subject
527 - [ sp:varName "parameterRef"^^xsd:string
528 - ]
529 - ] [ rdf:type sp:Bind ;
530 - sp:expression
531 - [ rdf:type smf:cast ;
532 - arg:datatype xsd:string ;
533 - sp:arg1 [ sp:varName "dateStart"^^xsd:string
534 - ]
535 - ] ;
536 - sp:variable
537 - [ sp:varName "dateStartString"^^xsd:string
538 - ]
539 - ])
540 - ] [ rdf:type sp:Optional ;
541 sp:elements ([ sp:object 560 sp:elements ([ sp:object
542 - [ sp:varName "dateEnd"^^xsd:string 561 + [ sp:varName "classOfSpatialPart"^^xsd:string
543 ] ; 562 ] ;
544 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; 563 + sp:predicate rdf:type ;
545 sp:subject 564 sp:subject
546 - [ sp:varName "parameterRef"^^xsd:string 565 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
547 - ]
548 - ] [ rdf:type sp:Bind ;
549 - sp:expression
550 - [ rdf:type smf:cast ;
551 - arg:datatype xsd:string ;
552 - sp:arg1 [ sp:varName "dateEnd"^^xsd:string
553 - ]
554 - ] ;
555 - sp:variable
556 - [ sp:varName "dateEndString"^^xsd:string
557 ] 566 ]
558 ]) 567 ])
559 ]) 568 ])
560 ] ; 569 ] ;
561 spin:rule 570 spin:rule
562 [ rdf:type sp:Construct ; 571 [ rdf:type sp:Construct ;
563 - rdfs:comment "STEP 80005 Assign parameter value"^^xsd:string ; 572 + rdfs:comment "STEP 80002b Find existing temporal part of parameterSet facility corresponding to the nominal time"^^xsd:string ;
564 - sp:templates ([ sp:object _:b3 ; 573 + sp:templates ([ sp:object
565 - sp:predicate 574 + [ sp:varName "parameterRef"^^xsd:string
566 - [ sp:varName "propertyType"^^xsd:string
567 ] ; 575 ] ;
576 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
568 sp:subject 577 sp:subject
569 [ sp:varName "parameterFacility"^^xsd:string 578 [ sp:varName "parameterFacility"^^xsd:string
570 ] 579 ]
571 - ] [ sp:object
572 - [ sp:varName "quantityType"^^xsd:string
573 - ] ;
574 - sp:predicate rdf:type ;
575 - sp:subject _:b3
576 - ] [ sp:object
577 - [ sp:varName "measureValue"^^xsd:string
578 - ] ;
579 - sp:predicate
580 - [ sp:varName "measureScale"^^xsd:string
581 - ] ;
582 - sp:subject _:b3
583 ]) ; 580 ]) ;
584 - sp:where ([ sp:object 581 + sp:where ([ sp:object spin:_this ;
585 - [ sp:varName "nameRef"^^xsd:string 582 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
586 - ] ;
587 - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
588 - sp:subject spin:_this
589 - ] [ sp:object
590 - [ sp:varName "nameRef"^^xsd:string
591 - ] ;
592 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#propertyMapsToMPREnumeration> ;
593 - sp:subject
594 - [ sp:varName "propertyType"^^xsd:string
595 - ]
596 - ] [ sp:object
597 - [ sp:varName "nameRef"^^xsd:string
598 - ] ;
599 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#rangeOfPropertyMapsToMPREnumeration> ;
600 sp:subject 583 sp:subject
601 - [ sp:varName "quantityType"^^xsd:string 584 + [ sp:varName "parameterSetFacility"^^xsd:string
602 ] 585 ]
603 ] [ sp:object 586 ] [ sp:object
604 [ sp:varName "parameterRef"^^xsd:string 587 [ sp:varName "parameterRef"^^xsd:string
...@@ -606,102 +589,26 @@ ...@@ -606,102 +589,26 @@
606 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ; 589 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
607 sp:subject spin:_this 590 sp:subject spin:_this
608 ] [ sp:object 591 ] [ sp:object
609 - [ sp:varName "parameterRef"^^xsd:string 592 + [ sp:varName "dTim"^^xsd:string
610 - ] ;
611 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
612 - sp:subject
613 - [ sp:varName "parameterFacility"^^xsd:string
614 - ]
615 - ] [ sp:object
616 - [ sp:varName "measureValueRef"^^xsd:string
617 ] ; 593 ] ;
618 - sp:predicate <http://www.epim.no/schemas/mprml/1#measureValueRef> ; 594 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
619 sp:subject 595 sp:subject
620 [ sp:varName "parameterRef"^^xsd:string 596 [ sp:varName "parameterRef"^^xsd:string
621 ] 597 ]
622 ] [ sp:object 598 ] [ sp:object
623 - [ sp:varName "measureValue"^^xsd:string 599 + [ sp:varName "dTim"^^xsd:string
624 ] ; 600 ] ;
625 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 601 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
626 sp:subject 602 sp:subject
627 - [ sp:varName "measureValueRef"^^xsd:string 603 + [ sp:varName "parameterFacility"^^xsd:string
628 ] 604 ]
629 ] [ sp:object 605 ] [ sp:object
630 - [ sp:varName "measureUomString"^^xsd:string
631 - ] ;
632 - sp:predicate <http://www.epim.no/schemas/mprml/1#uom> ;
633 - sp:subject
634 - [ sp:varName "measureValueRef"^^xsd:string
635 - ]
636 - ] [ rdf:type sp:Bind ;
637 - sp:expression
638 - [ rdf:type ep-mpr-spin-lib:selectQuantityTypeUomScale ;
639 - sp:arg1 [ sp:varName "quantityType"^^xsd:string
640 - ] ;
641 - sp:arg2 [ sp:varName "measureUomString"^^xsd:string
642 - ]
643 - ] ;
644 - sp:variable
645 - [ sp:varName "measureScale"^^xsd:string
646 - ]
647 - ])
648 - ] ;
649 - spin:rule
650 - [ rdf:type sp:Construct ;
651 - rdfs:comment "STEP 80001c Regularise start and end times - end time inherited from temporal part of production facility"^^xsd:string ;
652 - sp:templates ([ sp:object
653 - [ sp:varName "endString"^^xsd:string
654 - ] ;
655 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
656 - sp:subject
657 - [ sp:varName "parameterRef"^^xsd:string
658 - ]
659 - ]) ;
660 - sp:where ([ sp:object spin:_this ;
661 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
662 - sp:subject
663 [ sp:varName "parameterSetFacility"^^xsd:string 606 [ sp:varName "parameterSetFacility"^^xsd:string
664 - ]
665 - ] [ sp:object
666 - [ sp:varName "finishedAt"^^xsd:string
667 ] ; 607 ] ;
668 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 608 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
669 sp:subject 609 sp:subject
670 - [ sp:varName "parameterSetFacility"^^xsd:string 610 + [ sp:varName "parameterFacility"^^xsd:string
671 - ]
672 - ] [ rdf:type sp:Bind ;
673 - sp:expression
674 - [ rdf:type smf:cast ;
675 - arg:datatype xsd:string ;
676 - sp:arg1 [ sp:varName "finishedAt"^^xsd:string
677 - ]
678 - ] ;
679 - sp:variable
680 - [ sp:varName "endString"^^xsd:string
681 ] 611 ]
682 - ] [ sp:object
683 - [ sp:varName "parameterRef"^^xsd:string
684 - ] ;
685 - sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
686 - sp:subject spin:_this
687 - ] [ rdf:type sp:NotExists ;
688 - sp:elements ([ rdf:type sp:Union ;
689 - sp:elements (([ sp:object
690 - [ sp:varName "dTimEnd"^^xsd:string
691 - ] ;
692 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
693 - sp:subject
694 - [ sp:varName "parameterRef"^^xsd:string
695 - ]
696 - ]) ([ sp:object
697 - [ sp:varName "dateEnd"^^xsd:string
698 - ] ;
699 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
700 - sp:subject
701 - [ sp:varName "parameterRef"^^xsd:string
702 - ]
703 - ]))
704 - ])
705 ]) 612 ])
706 ] ; 613 ] ;
707 spin:rule 614 spin:rule
...@@ -750,11 +657,11 @@ ...@@ -750,11 +657,11 @@
750 ] ; 657 ] ;
751 spin:rule 658 spin:rule
752 [ rdf:type sp:Construct ; 659 [ rdf:type sp:Construct ;
753 - rdfs:comment "STEP 80001b Regularise start and end times - start time inherited from temporal part of production facility"^^xsd:string ; 660 + rdfs:comment "STEP 80001c Regularise start and end times - end time inherited from temporal part of production facility"^^xsd:string ;
754 sp:templates ([ sp:object 661 sp:templates ([ sp:object
755 - [ sp:varName "startString"^^xsd:string 662 + [ sp:varName "endString"^^xsd:string
756 ] ; 663 ] ;
757 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; 664 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
758 sp:subject 665 sp:subject
759 [ sp:varName "parameterRef"^^xsd:string 666 [ sp:varName "parameterRef"^^xsd:string
760 ] 667 ]
...@@ -765,9 +672,9 @@ ...@@ -765,9 +672,9 @@
765 [ sp:varName "parameterSetFacility"^^xsd:string 672 [ sp:varName "parameterSetFacility"^^xsd:string
766 ] 673 ]
767 ] [ sp:object 674 ] [ sp:object
768 - [ sp:varName "startedAt"^^xsd:string 675 + [ sp:varName "finishedAt"^^xsd:string
769 ] ; 676 ] ;
770 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 677 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
771 sp:subject 678 sp:subject
772 [ sp:varName "parameterSetFacility"^^xsd:string 679 [ sp:varName "parameterSetFacility"^^xsd:string
773 ] 680 ]
...@@ -775,11 +682,11 @@ ...@@ -775,11 +682,11 @@
775 sp:expression 682 sp:expression
776 [ rdf:type smf:cast ; 683 [ rdf:type smf:cast ;
777 arg:datatype xsd:string ; 684 arg:datatype xsd:string ;
778 - sp:arg1 [ sp:varName "startedAt"^^xsd:string 685 + sp:arg1 [ sp:varName "finishedAt"^^xsd:string
779 ] 686 ]
780 ] ; 687 ] ;
781 sp:variable 688 sp:variable
782 - [ sp:varName "startString"^^xsd:string 689 + [ sp:varName "endString"^^xsd:string
783 ] 690 ]
784 ] [ sp:object 691 ] [ sp:object
785 [ sp:varName "parameterRef"^^xsd:string 692 [ sp:varName "parameterRef"^^xsd:string
...@@ -789,16 +696,16 @@ ...@@ -789,16 +696,16 @@
789 ] [ rdf:type sp:NotExists ; 696 ] [ rdf:type sp:NotExists ;
790 sp:elements ([ rdf:type sp:Union ; 697 sp:elements ([ rdf:type sp:Union ;
791 sp:elements (([ sp:object 698 sp:elements (([ sp:object
792 - [ sp:varName "dTimStart"^^xsd:string 699 + [ sp:varName "dTimEnd"^^xsd:string
793 ] ; 700 ] ;
794 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ; 701 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
795 sp:subject 702 sp:subject
796 [ sp:varName "parameterRef"^^xsd:string 703 [ sp:varName "parameterRef"^^xsd:string
797 ] 704 ]
798 ]) ([ sp:object 705 ]) ([ sp:object
799 - [ sp:varName "dateStart"^^xsd:string 706 + [ sp:varName "dateEnd"^^xsd:string
800 ] ; 707 ] ;
801 - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; 708 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
802 sp:subject 709 sp:subject
803 [ sp:varName "parameterRef"^^xsd:string 710 [ sp:varName "parameterRef"^^xsd:string
804 ] 711 ]
...@@ -808,148 +715,261 @@ ...@@ -808,148 +715,261 @@
808 ] ; 715 ] ;
809 spin:rule 716 spin:rule
810 [ rdf:type sp:Construct ; 717 [ rdf:type sp:Construct ;
811 - rdfs:comment "STEP 80000c Create the spatial parts that have the parameterSet property"^^xsd:string ; 718 + rdfs:comment "STEP 80002a Create temporal part of parameterSet facility corresponding to the nominal time, if necessary"^^xsd:string ;
812 - sp:templates ([ sp:object spin:_this ; 719 + sp:templates ([ sp:object
720 + [ sp:varName "classOfParameterSetFacility"^^xsd:string
721 + ] ;
722 + sp:predicate rdf:type ;
723 + sp:subject _:b3
724 + ] [ sp:object
725 + [ sp:varName "dTim"^^xsd:string
726 + ] ;
727 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
728 + sp:subject _:b3
729 + ] [ sp:object
730 + [ sp:varName "parameterSetFacility"^^xsd:string
731 + ] ;
732 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
733 + sp:subject _:b3
734 + ] [ sp:object
735 + [ sp:varName "parameterRef"^^xsd:string
736 + ] ;
813 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 737 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
814 - sp:subject 738 + sp:subject _:b3
815 - [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
816 - ]
817 ]) ; 739 ]) ;
818 sp:where ([ sp:object spin:_this ; 740 sp:where ([ sp:object spin:_this ;
819 - sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ; 741 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
820 sp:subject 742 sp:subject
821 - [ sp:varName "facilityRef"^^xsd:string 743 + [ sp:varName "parameterSetFacility"^^xsd:string
822 ] 744 ]
823 ] [ sp:object 745 ] [ sp:object
824 - [ sp:varName "facilityRef"^^xsd:string 746 + [ sp:varName "classOfParameterSetFacility"^^xsd:string
825 ] ; 747 ] ;
826 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
827 - sp:subject
828 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
829 - ]
830 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
831 sp:predicate rdf:type ; 748 sp:predicate rdf:type ;
832 sp:subject 749 sp:subject
833 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 750 + [ sp:varName "parameterSetFacility"^^xsd:string
834 ] 751 ]
835 ] [ sp:object 752 ] [ sp:object
836 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 753 + [ sp:varName "parameterRef"^^xsd:string
837 ] ; 754 ] ;
838 - sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ; 755 + sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
839 - sp:subject 756 + sp:subject spin:_this
840 - [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
841 - ]
842 ] [ sp:object 757 ] [ sp:object
843 - [ sp:varName "classOfSpatialPart"^^xsd:string 758 + [ sp:varName "dTim"^^xsd:string
844 ] ; 759 ] ;
760 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
761 + sp:subject
762 + [ sp:varName "parameterRef"^^xsd:string
763 + ]
764 + ] [ rdf:type sp:NotExists ;
765 + sp:elements ([ sp:object
766 + [ sp:varName "dTim"^^xsd:string
767 + ] ;
768 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
769 + sp:subject
770 + [ sp:varName "parameterFacility"^^xsd:string
771 + ]
772 + ] [ sp:object
773 + [ sp:varName "parameterSetFacility"^^xsd:string
774 + ] ;
775 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
776 + sp:subject
777 + [ sp:varName "parameterFacility"^^xsd:string
778 + ]
779 + ])
780 + ])
781 + ] ;
782 + spin:rule
783 + [ rdf:type sp:Construct ;
784 + rdfs:comment "STEP 80004b Measurement qualifier not specified"^^xsd:string ;
785 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ;
845 sp:predicate rdf:type ; 786 sp:predicate rdf:type ;
846 sp:subject 787 sp:subject
847 - [ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string 788 + [ sp:varName "parameterFacility"^^xsd:string
848 ] 789 ]
790 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#ValidlyMeasuredState> ;
791 + sp:predicate rdf:type ;
792 + sp:subject
793 + [ sp:varName "parameterFacility"^^xsd:string
794 + ]
795 + ]) ;
796 + sp:where ([ rdf:type sp:NotExists ;
797 + sp:elements ([ sp:object
798 + [ sp:varName "qualifierRef"^^xsd:string
799 + ] ;
800 + sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
801 + sp:subject spin:_this
802 + ])
849 ] [ sp:object 803 ] [ sp:object
850 - [ sp:varName "nameRef"^^xsd:string 804 + [ sp:varName "parameterRef"^^xsd:string
851 ] ; 805 ] ;
852 - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ; 806 + sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
853 sp:subject spin:_this 807 sp:subject spin:_this
854 ] [ sp:object 808 ] [ sp:object
855 - [ sp:varName "nameRef"^^xsd:string 809 + [ sp:varName "parameterRef"^^xsd:string
856 ] ; 810 ] ;
857 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ; 811 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
858 sp:subject 812 sp:subject
859 - [ sp:varName "classOfSpatialPart"^^xsd:string 813 + [ sp:varName "parameterFacility"^^xsd:string
860 ] 814 ]
861 - ] [ rdf:type sp:NotExists ;
862 - sp:elements ([ sp:object
863 - [ sp:varName "classOfSpatialPart"^^xsd:string
864 - ] ;
865 - sp:predicate rdf:type ;
866 - sp:subject
867 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
868 - ]
869 - ])
870 ]) 815 ])
871 ] ; 816 ] ;
872 spin:rule 817 spin:rule
873 [ rdf:type sp:Construct ; 818 [ rdf:type sp:Construct ;
874 - rdfs:comment "STEP 80002a Create temporal part of parameterSet facility corresponding to the nominal time, if necessary"^^xsd:string ; 819 + rdfs:comment "STEP 80001a Regularise start and end times - time specified by parameter element"^^xsd:string ;
875 sp:templates ([ sp:object 820 sp:templates ([ sp:object
876 - [ sp:varName "classOfParameterSetFacility"^^xsd:string 821 + [ sp:varName "dTimStartString"^^xsd:string
877 - ] ;
878 - sp:predicate rdf:type ;
879 - sp:subject _:b4
880 - ] [ sp:object
881 - [ sp:varName "dTim"^^xsd:string
882 ] ; 822 ] ;
883 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ; 823 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
884 - sp:subject _:b4 824 + sp:subject
825 + [ sp:varName "parameterRef"^^xsd:string
826 + ]
885 ] [ sp:object 827 ] [ sp:object
886 - [ sp:varName "parameterSetFacility"^^xsd:string 828 + [ sp:varName "dateStartString"^^xsd:string
887 ] ; 829 ] ;
888 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 830 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
889 - sp:subject _:b4 831 + sp:subject
890 - ] [ sp:object
891 [ sp:varName "parameterRef"^^xsd:string 832 [ sp:varName "parameterRef"^^xsd:string
833 + ]
834 + ] [ sp:object
835 + [ sp:varName "dTimEndString"^^xsd:string
892 ] ; 836 ] ;
893 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 837 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
894 - sp:subject _:b4
895 - ]) ;
896 - sp:where ([ sp:object spin:_this ;
897 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
898 sp:subject 838 sp:subject
899 - [ sp:varName "parameterSetFacility"^^xsd:string 839 + [ sp:varName "parameterRef"^^xsd:string
900 ] 840 ]
901 ] [ sp:object 841 ] [ sp:object
902 - [ sp:varName "classOfParameterSetFacility"^^xsd:string 842 + [ sp:varName "dateEndString"^^xsd:string
903 ] ; 843 ] ;
904 - sp:predicate rdf:type ; 844 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
905 sp:subject 845 sp:subject
906 - [ sp:varName "parameterSetFacility"^^xsd:string 846 + [ sp:varName "parameterRef"^^xsd:string
907 ] 847 ]
908 - ] [ sp:object 848 + ]) ;
849 + sp:where ([ sp:object
909 [ sp:varName "parameterRef"^^xsd:string 850 [ sp:varName "parameterRef"^^xsd:string
910 ] ; 851 ] ;
911 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ; 852 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
912 sp:subject spin:_this 853 sp:subject spin:_this
913 - ] [ sp:object 854 + ] [ rdf:type sp:Optional ;
914 - [ sp:varName "dTim"^^xsd:string
915 - ] ;
916 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
917 - sp:subject
918 - [ sp:varName "parameterRef"^^xsd:string
919 - ]
920 - ] [ rdf:type sp:NotExists ;
921 sp:elements ([ sp:object 855 sp:elements ([ sp:object
922 - [ sp:varName "dTim"^^xsd:string 856 + [ sp:varName "dTimStart"^^xsd:string
923 ] ; 857 ] ;
924 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ; 858 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
925 sp:subject 859 sp:subject
926 - [ sp:varName "parameterFacility"^^xsd:string 860 + [ sp:varName "parameterRef"^^xsd:string
927 ] 861 ]
928 - ] [ sp:object 862 + ] [ rdf:type sp:Bind ;
929 - [ sp:varName "parameterSetFacility"^^xsd:string 863 + sp:expression
864 + [ rdf:type smf:cast ;
865 + arg:datatype xsd:string ;
866 + sp:arg1 [ sp:varName "dTimStart"^^xsd:string
867 + ]
930 ] ; 868 ] ;
931 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 869 + sp:variable
870 + [ sp:varName "dTimStartString"^^xsd:string
871 + ]
872 + ])
873 + ] [ rdf:type sp:Optional ;
874 + sp:elements ([ sp:object
875 + [ sp:varName "dTimEnd"^^xsd:string
876 + ] ;
877 + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
932 sp:subject 878 sp:subject
933 - [ sp:varName "parameterFacility"^^xsd:string 879 + [ sp:varName "parameterRef"^^xsd:string
880 + ]
881 + ] [ rdf:type sp:Bind ;
882 + sp:expression
883 + [ rdf:type smf:cast ;
884 + arg:datatype xsd:string ;
885 + sp:arg1 [ sp:varName "dTimEnd"^^xsd:string
886 + ]
887 + ] ;
888 + sp:variable
889 + [ sp:varName "dTimEndString"^^xsd:string
890 + ]
891 + ])
892 + ] [ rdf:type sp:Optional ;
893 + sp:elements ([ sp:object
894 + [ sp:varName "dateStart"^^xsd:string
895 + ] ;
896 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
897 + sp:subject
898 + [ sp:varName "parameterRef"^^xsd:string
899 + ]
900 + ] [ rdf:type sp:Bind ;
901 + sp:expression
902 + [ rdf:type smf:cast ;
903 + arg:datatype xsd:string ;
904 + sp:arg1 [ sp:varName "dateStart"^^xsd:string
905 + ]
906 + ] ;
907 + sp:variable
908 + [ sp:varName "dateStartString"^^xsd:string
909 + ]
910 + ])
911 + ] [ rdf:type sp:Optional ;
912 + sp:elements ([ sp:object
913 + [ sp:varName "dateEnd"^^xsd:string
914 + ] ;
915 + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
916 + sp:subject
917 + [ sp:varName "parameterRef"^^xsd:string
918 + ]
919 + ] [ rdf:type sp:Bind ;
920 + sp:expression
921 + [ rdf:type smf:cast ;
922 + arg:datatype xsd:string ;
923 + sp:arg1 [ sp:varName "dateEnd"^^xsd:string
924 + ]
925 + ] ;
926 + sp:variable
927 + [ sp:varName "dateEndString"^^xsd:string
934 ] 928 ]
935 ]) 929 ])
936 ]) 930 ])
937 ] ; 931 ] ;
938 spin:rule 932 spin:rule
939 [ rdf:type sp:Construct ; 933 [ rdf:type sp:Construct ;
940 - rdfs:comment "STEP 80002b Find existing temporal part of parameterSet facility corresponding to the nominal time"^^xsd:string ; 934 + rdfs:comment "STEP 80005 Assign parameter value"^^xsd:string ;
941 - sp:templates ([ sp:object 935 + sp:templates ([ sp:object _:b4 ;
942 - [ sp:varName "parameterRef"^^xsd:string 936 + sp:predicate
937 + [ sp:varName "propertyType"^^xsd:string
943 ] ; 938 ] ;
944 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
945 sp:subject 939 sp:subject
946 [ sp:varName "parameterFacility"^^xsd:string 940 [ sp:varName "parameterFacility"^^xsd:string
947 ] 941 ]
942 + ] [ sp:object
943 + [ sp:varName "quantityType"^^xsd:string
944 + ] ;
945 + sp:predicate rdf:type ;
946 + sp:subject _:b4
947 + ] [ sp:object
948 + [ sp:varName "measureValue"^^xsd:string
949 + ] ;
950 + sp:predicate
951 + [ sp:varName "measureScale"^^xsd:string
952 + ] ;
953 + sp:subject _:b4
948 ]) ; 954 ]) ;
949 - sp:where ([ sp:object spin:_this ; 955 + sp:where ([ sp:object
950 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 956 + [ sp:varName "nameRef"^^xsd:string
957 + ] ;
958 + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
959 + sp:subject spin:_this
960 + ] [ sp:object
961 + [ sp:varName "nameRef"^^xsd:string
962 + ] ;
963 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#propertyMapsToMPREnumeration> ;
951 sp:subject 964 sp:subject
952 - [ sp:varName "parameterSetFacility"^^xsd:string 965 + [ sp:varName "propertyType"^^xsd:string
966 + ]
967 + ] [ sp:object
968 + [ sp:varName "nameRef"^^xsd:string
969 + ] ;
970 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#rangeOfPropertyMapsToMPREnumeration> ;
971 + sp:subject
972 + [ sp:varName "quantityType"^^xsd:string
953 ] 973 ]
954 ] [ sp:object 974 ] [ sp:object
955 [ sp:varName "parameterRef"^^xsd:string 975 [ sp:varName "parameterRef"^^xsd:string
...@@ -957,25 +977,43 @@ ...@@ -957,25 +977,43 @@
957 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ; 977 sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
958 sp:subject spin:_this 978 sp:subject spin:_this
959 ] [ sp:object 979 ] [ sp:object
960 - [ sp:varName "dTim"^^xsd:string 980 + [ sp:varName "parameterRef"^^xsd:string
961 ] ; 981 ] ;
962 - sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ; 982 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
983 + sp:subject
984 + [ sp:varName "parameterFacility"^^xsd:string
985 + ]
986 + ] [ sp:object
987 + [ sp:varName "measureValueRef"^^xsd:string
988 + ] ;
989 + sp:predicate <http://www.epim.no/schemas/mprml/1#measureValueRef> ;
963 sp:subject 990 sp:subject
964 [ sp:varName "parameterRef"^^xsd:string 991 [ sp:varName "parameterRef"^^xsd:string
965 ] 992 ]
966 ] [ sp:object 993 ] [ sp:object
967 - [ sp:varName "dTim"^^xsd:string 994 + [ sp:varName "measureValue"^^xsd:string
968 ] ; 995 ] ;
969 - sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ; 996 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
970 sp:subject 997 sp:subject
971 - [ sp:varName "parameterFacility"^^xsd:string 998 + [ sp:varName "measureValueRef"^^xsd:string
972 ] 999 ]
973 ] [ sp:object 1000 ] [ sp:object
974 - [ sp:varName "parameterSetFacility"^^xsd:string 1001 + [ sp:varName "measureUom"^^xsd:string
975 ] ; 1002 ] ;
976 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 1003 + sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
977 sp:subject 1004 sp:subject
978 - [ sp:varName "parameterFacility"^^xsd:string 1005 + [ sp:varName "measureValueRef"^^xsd:string
1006 + ]
1007 + ] [ rdf:type sp:Bind ;
1008 + sp:expression
1009 + [ rdf:type ep-mpr-spin-lib:selectAnyUomScale ;
1010 + sp:arg1 [ sp:varName "quantityType"^^xsd:string
1011 + ] ;
1012 + sp:arg2 [ sp:varName "measureUom"^^xsd:string
1013 + ]
1014 + ] ;
1015 + sp:variable
1016 + [ sp:varName "measureScale"^^xsd:string
979 ] 1017 ]
980 ]) 1018 ])
981 ] ; 1019 ] ;
...@@ -1053,50 +1091,12 @@ ...@@ -1053,50 +1091,12 @@
1053 ] ; 1091 ] ;
1054 spin:rule 1092 spin:rule
1055 [ rdf:type sp:Construct ; 1093 [ rdf:type sp:Construct ;
1056 - rdfs:comment "STEP 80004a Measurement qualifier specified"^^xsd:string ; 1094 + rdfs:comment "STEP 80003b Create temporal parts of parameterSet facility corresponding to the start and end without duplicates - moved to a rule on Cs_productVolumeFacility"^^xsd:string ;
1057 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ; 1095 + sp:templates () ;
1058 - sp:predicate rdf:type ; 1096 + sp:where ()
1059 - sp:subject
1060 - [ sp:varName "parameterFacility"^^xsd:string
1061 - ]
1062 - ] [ sp:object
1063 - [ sp:varName "measuredQualityType"^^xsd:string
1064 - ] ;
1065 - sp:predicate rdf:type ;
1066 - sp:subject
1067 - [ sp:varName "parameterFacility"^^xsd:string
1068 - ]
1069 - ]) ;
1070 - sp:where ([ sp:object
1071 - [ sp:varName "qualifierRef"^^xsd:string
1072 - ] ;
1073 - sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
1074 - sp:subject spin:_this
1075 - ] [ sp:object
1076 - [ sp:varName "parameterRef"^^xsd:string
1077 - ] ;
1078 - sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
1079 - sp:subject spin:_this
1080 - ] [ sp:object
1081 - [ sp:varName "parameterRef"^^xsd:string
1082 - ] ;
1083 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
1084 - sp:subject
1085 - [ sp:varName "parameterFacility"^^xsd:string
1086 - ]
1087 - ] [ rdf:type sp:Bind ;
1088 - sp:expression
1089 - [ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
1090 - sp:arg1 [ sp:varName "qualifierRef"^^xsd:string
1091 - ]
1092 - ] ;
1093 - sp:variable
1094 - [ sp:varName "measuredQualityType"^^xsd:string
1095 - ]
1096 - ])
1097 ] . 1097 ] .
1098 1098
1099 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeParameterSet-v1.1.1> 1099 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeParameterSet-v1.1.1>
1100 rdf:type owl:Ontology ; 1100 rdf:type owl:Ontology ;
1101 - owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/schema/1.0/unnamed> ; 1101 + owl:imports <http://www.reportinghub.no/ep/schema/1.0/unnamed> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> ;
1102 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 1102 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
This diff could not be displayed because it is too large.