Showing
3 changed files
with
806 additions
and
772 deletions
This diff could not be displayed because it is too large.
... | @@ -22,13 +22,27 @@ | ... | @@ -22,13 +22,27 @@ |
22 | <http://www.epim.no/schemas/mprml/1#A_Global-Objects> | 22 | <http://www.epim.no/schemas/mprml/1#A_Global-Objects> |
23 | spin:rule | 23 | spin:rule |
24 | [ rdf:type sp:Construct ; | 24 | [ rdf:type sp:Construct ; |
25 | - rdfs:comment "STEP 20050 Set the context facility - installation is always specified"^^xsd:string ; | 25 | + rdfs:comment "STEP 20032 Inherit start dates from the report context if necessary"^^xsd:string ; |
26 | sp:templates ([ sp:object | 26 | sp:templates ([ sp:object |
27 | - [ sp:varName "contextFacility"^^xsd:string | 27 | + [ sp:varName "dateStart"^^xsd:string |
28 | ] ; | 28 | ] ; |
29 | - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; | 29 | + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; |
30 | sp:subject | 30 | sp:subject |
31 | - [ sp:varName "productionFacility"^^xsd:string | 31 | + [ sp:varName "productionFlow"^^xsd:string |
32 | + ] | ||
33 | + ] [ sp:object | ||
34 | + [ sp:varName "dateStart"^^xsd:string | ||
35 | + ] ; | ||
36 | + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
37 | + sp:subject | ||
38 | + [ sp:varName "productionInventory"^^xsd:string | ||
39 | + ] | ||
40 | + ] [ sp:object | ||
41 | + [ sp:varName "dateStart"^^xsd:string | ||
42 | + ] ; | ||
43 | + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
44 | + sp:subject | ||
45 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
32 | ] | 46 | ] |
33 | ]) ; | 47 | ]) ; |
34 | sp:where ([ sp:object | 48 | sp:where ([ sp:object |
... | @@ -36,270 +50,192 @@ | ... | @@ -36,270 +50,192 @@ |
36 | ] ; | 50 | ] ; |
37 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 51 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
38 | sp:subject spin:_this | 52 | sp:subject spin:_this |
53 | + ] [ sp:object | ||
54 | + [ sp:varName "dateStart"^^xsd:string | ||
55 | + ] ; | ||
56 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; | ||
57 | + sp:subject spin:_this | ||
39 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | 58 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; |
40 | sp:predicate rdf:type ; | 59 | sp:predicate rdf:type ; |
41 | sp:subject | 60 | sp:subject |
42 | [ sp:varName "productVolumeRef"^^xsd:string | 61 | [ sp:varName "productVolumeRef"^^xsd:string |
43 | ] | 62 | ] |
44 | - ] [ sp:object | 63 | + ] [ rdf:type sp:NotExists ; |
45 | - [ sp:varName "installationRef"^^xsd:string | 64 | + sp:elements ([ sp:object |
65 | + [ sp:varName "dateStartx"^^xsd:string | ||
46 | ] ; | 66 | ] ; |
47 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 67 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
48 | sp:subject | 68 | sp:subject |
49 | [ sp:varName "productVolumeRef"^^xsd:string | 69 | [ sp:varName "productVolumeRef"^^xsd:string |
50 | ] | 70 | ] |
51 | - ] [ sp:object | 71 | + ]) |
52 | - [ sp:varName "installationRef"^^xsd:string | 72 | + ] [ rdf:type sp:NotExists ; |
53 | - ] ; | 73 | + sp:elements ([ sp:object |
54 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 74 | + [ sp:varName "dTimStartx"^^xsd:string |
55 | - sp:subject | ||
56 | - [ sp:varName "productionFacility"^^xsd:string | ||
57 | - ] | ||
58 | - ] [ sp:object | ||
59 | - [ sp:varName "contextFacilityRef"^^xsd:string | ||
60 | ] ; | 75 | ] ; |
61 | - sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; | 76 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ; |
62 | sp:subject | 77 | sp:subject |
63 | [ sp:varName "productVolumeRef"^^xsd:string | 78 | [ sp:varName "productVolumeRef"^^xsd:string |
64 | ] | 79 | ] |
65 | - ] [ sp:object | ||
66 | - [ sp:varName "contextFacilityRef"^^xsd:string | ||
67 | - ] ; | ||
68 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
69 | - sp:subject | ||
70 | - [ sp:varName "contextFacility"^^xsd:string | ||
71 | - ] | ||
72 | ]) | 80 | ]) |
73 | - ] ; | ||
74 | - spin:rule | ||
75 | - [ rdf:type sp:Construct ; | ||
76 | - rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ; | ||
77 | - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ; | ||
78 | - sp:predicate rdf:type ; | ||
79 | - sp:subject _:b1 | ||
80 | - ] [ sp:object | ||
81 | - [ sp:varName "productionReport"^^xsd:string | ||
82 | - ] ; | ||
83 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ; | ||
84 | - sp:subject _:b1 | ||
85 | - ] [ sp:object | ||
86 | - [ sp:varName "name"^^xsd:string | ||
87 | - ] ; | ||
88 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | ||
89 | - sp:subject _:b1 | ||
90 | - ] [ sp:object | ||
91 | - [ sp:varName "reportPeriodType"^^xsd:string | ||
92 | - ] ; | ||
93 | - sp:predicate rdf:type ; | ||
94 | - sp:subject _:b1 | ||
95 | ] [ sp:object | 81 | ] [ sp:object |
96 | [ sp:varName "productVolumeRef"^^xsd:string | 82 | [ sp:varName "productVolumeRef"^^xsd:string |
97 | ] ; | 83 | ] ; |
98 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 84 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
99 | - sp:subject _:b1 | 85 | + sp:subject |
100 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | 86 | + [ sp:varName "productionFlow"^^xsd:string |
87 | + ] | ||
88 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; | ||
101 | sp:predicate rdf:type ; | 89 | sp:predicate rdf:type ; |
102 | - sp:subject _:b2 | 90 | + sp:subject |
91 | + [ sp:varName "productionFlow"^^xsd:string | ||
92 | + ] | ||
103 | ] [ sp:object | 93 | ] [ sp:object |
104 | - [ sp:varName "productVolumeRef"^^xsd:string | 94 | + [ sp:varName "productionFlowToDate"^^xsd:string |
105 | ] ; | 95 | ] ; |
106 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
107 | - sp:subject _:b2 | ||
108 | - ] [ sp:object _:b3 ; | ||
109 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 96 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
110 | - sp:subject _:b2 | 97 | + sp:subject |
111 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ; | 98 | + [ sp:varName "productionFlow"^^xsd:string |
99 | + ] | ||
100 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ; | ||
112 | sp:predicate rdf:type ; | 101 | sp:predicate rdf:type ; |
113 | - sp:subject _:b3 | ||
114 | - ] [ sp:object | ||
115 | - [] ; | ||
116 | - sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ; | ||
117 | - sp:subject _:b2 | ||
118 | - ] [ sp:object | ||
119 | - [] ; | ||
120 | - sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ; | ||
121 | - sp:subject _:b3 | ||
122 | - ] [ sp:object | ||
123 | - [ sp:varName "title"^^xsd:string | ||
124 | - ] ; | ||
125 | - sp:predicate <http://purl.org/dc/elements/1.1/title> ; | ||
126 | - sp:subject _:b1 | ||
127 | - ]) ; | ||
128 | - sp:where ([ sp:object spin:_this ; | ||
129 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
130 | sp:subject | 102 | sp:subject |
131 | - [ sp:varName "productionReport"^^xsd:string | 103 | + [ sp:varName "productionFlowToDate"^^xsd:string |
132 | ] | 104 | ] |
133 | ] [ sp:object | 105 | ] [ sp:object |
134 | [ sp:varName "productVolumeRef"^^xsd:string | 106 | [ sp:varName "productVolumeRef"^^xsd:string |
135 | ] ; | 107 | ] ; |
136 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 108 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
137 | - sp:subject spin:_this | 109 | + sp:subject |
138 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | 110 | + [ sp:varName "productionInventory"^^xsd:string |
111 | + ] | ||
112 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ; | ||
139 | sp:predicate rdf:type ; | 113 | sp:predicate rdf:type ; |
140 | sp:subject | 114 | sp:subject |
141 | - [ sp:varName "productVolumeRef"^^xsd:string | 115 | + [ sp:varName "productionInventory"^^xsd:string |
142 | ] | 116 | ] |
143 | ] [ sp:object | 117 | ] [ sp:object |
144 | - [ sp:varName "nameRef"^^xsd:string | 118 | + [ sp:varName "productionInventoryToDate"^^xsd:string |
145 | ] ; | 119 | ] ; |
146 | - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ; | 120 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
147 | sp:subject | 121 | sp:subject |
148 | - [ sp:varName "productVolumeRef"^^xsd:string | 122 | + [ sp:varName "productionInventory"^^xsd:string |
149 | ] | 123 | ] |
150 | - ] [ sp:object | 124 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ; |
151 | - [ sp:varName "name"^^xsd:string | 125 | + sp:predicate rdf:type ; |
152 | - ] ; | ||
153 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
154 | sp:subject | 126 | sp:subject |
155 | - [ sp:varName "nameRef"^^xsd:string | 127 | + [ sp:varName "productionInventoryToDate"^^xsd:string |
156 | ] | 128 | ] |
157 | - ] [ rdf:type sp:Optional ; | 129 | + ] [ sp:object |
158 | - sp:elements ([ sp:object | 130 | + [ sp:varName "productVolumeRef"^^xsd:string |
159 | - [ sp:varName "periodKindRef"^^xsd:string | ||
160 | ] ; | 131 | ] ; |
161 | - sp:predicate <http://www.epim.no/schemas/mprml/1#periodKindRef> ; | 132 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
162 | sp:subject | 133 | sp:subject |
163 | - [ sp:varName "productVolumeRef"^^xsd:string | 134 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
164 | ] | 135 | ] |
165 | - ]) | 136 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
166 | - ] [ rdf:type sp:Optional ; | 137 | + sp:predicate rdf:type ; |
167 | - sp:elements ([ sp:object | ||
168 | - [ sp:varName "titleRef"^^xsd:string | ||
169 | - ] ; | ||
170 | - sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ; | ||
171 | sp:subject | 138 | sp:subject |
172 | - [ sp:varName "productVolumeRef"^^xsd:string | 139 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
173 | ] | 140 | ] |
174 | ] [ sp:object | 141 | ] [ sp:object |
175 | - [ sp:varName "title"^^xsd:string | 142 | + [ sp:varName "productionFacilityToDate"^^xsd:string |
176 | ] ; | 143 | ] ; |
177 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 144 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
178 | sp:subject | 145 | sp:subject |
179 | - [ sp:varName "titleRef"^^xsd:string | 146 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
180 | - ] | ||
181 | - ]) | ||
182 | - ] [ rdf:type sp:Bind ; | ||
183 | - sp:expression | ||
184 | - [ rdf:type ep-mpr-spin-lib:selectReportPeriodType ; | ||
185 | - sp:arg1 [ sp:varName "periodKindRef"^^xsd:string | ||
186 | ] | 147 | ] |
187 | - ] ; | 148 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ; |
188 | - sp:variable | 149 | + sp:predicate rdf:type ; |
189 | - [ sp:varName "reportPeriodType"^^xsd:string | 150 | + sp:subject |
151 | + [ sp:varName "productionFacilityToDate"^^xsd:string | ||
190 | ] | 152 | ] |
191 | ]) | 153 | ]) |
192 | ] ; | 154 | ] ; |
193 | spin:rule | 155 | spin:rule |
194 | [ rdf:type sp:Construct ; | 156 | [ rdf:type sp:Construct ; |
195 | - rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ; | 157 | + rdfs:comment """STEP 20060 Set the facility operator |
196 | - sp:templates ([ sp:object | 158 | +role is ignored, because it is implicitly \"operator\""""^^xsd:string ; |
197 | - [ sp:varName "reportKind"^^xsd:string | 159 | + sp:templates ([ sp:object _:b1 ; |
198 | - ] ; | 160 | + sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; |
199 | - sp:predicate rdf:type ; | ||
200 | sp:subject | 161 | sp:subject |
201 | - [ sp:varName "productVolumeReport"^^xsd:string | 162 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
202 | ] | 163 | ] |
203 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReportKind> ; | 164 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; |
204 | sp:predicate rdf:type ; | 165 | sp:predicate rdf:type ; |
205 | - sp:subject | 166 | + sp:subject _:b1 |
206 | - [ sp:varName "reportKind"^^xsd:string | ||
207 | - ] | ||
208 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
209 | - sp:predicate rdfs:subClassOf ; | ||
210 | - sp:subject | ||
211 | - [ sp:varName "reportKind"^^xsd:string | ||
212 | - ] | ||
213 | ] [ sp:object | 167 | ] [ sp:object |
214 | - [ sp:varName "kind"^^xsd:string | 168 | + [ sp:varName "operator"^^xsd:string |
215 | ] ; | 169 | ] ; |
216 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | 170 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
217 | - sp:subject | 171 | + sp:subject _:b1 |
218 | - [ sp:varName "reportKind"^^xsd:string | ||
219 | - ] | ||
220 | ]) ; | 172 | ]) ; |
221 | sp:where ([ sp:object | 173 | sp:where ([ sp:object |
222 | [ sp:varName "productVolumeRef"^^xsd:string | 174 | [ sp:varName "productVolumeRef"^^xsd:string |
223 | ] ; | 175 | ] ; |
224 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 176 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
225 | sp:subject spin:_this | 177 | sp:subject spin:_this |
226 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
227 | - sp:predicate rdf:type ; | ||
228 | - sp:subject | ||
229 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
230 | - ] | ||
231 | ] [ sp:object | 178 | ] [ sp:object |
232 | [ sp:varName "productVolumeRef"^^xsd:string | 179 | [ sp:varName "productVolumeRef"^^xsd:string |
233 | ] ; | 180 | ] ; |
234 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 181 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
235 | sp:subject | 182 | sp:subject |
236 | - [ sp:varName "productVolumeReport"^^xsd:string | 183 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
237 | ] | 184 | ] |
238 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ; | 185 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
239 | sp:predicate rdf:type ; | 186 | sp:predicate rdf:type ; |
240 | sp:subject | 187 | sp:subject |
241 | - [ sp:varName "productVolumeReport"^^xsd:string | 188 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
242 | ] | 189 | ] |
243 | - ] [ sp:object | 190 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; |
244 | - [ sp:varName "nameRef"^^xsd:string | 191 | + sp:predicate rdf:type ; |
245 | - ] ; | ||
246 | - sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ; | ||
247 | sp:subject | 192 | sp:subject |
248 | [ sp:varName "productVolumeRef"^^xsd:string | 193 | [ sp:varName "productVolumeRef"^^xsd:string |
249 | ] | 194 | ] |
250 | ] [ sp:object | 195 | ] [ sp:object |
251 | - [ sp:varName "name"^^xsd:string | 196 | + [ sp:varName "operatorRef"^^xsd:string |
252 | ] ; | 197 | ] ; |
253 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 198 | + sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ; |
254 | sp:subject | 199 | sp:subject |
255 | - [ sp:varName "nameRef"^^xsd:string | 200 | + [ sp:varName "productVolumeRef"^^xsd:string |
256 | ] | 201 | ] |
257 | ] [ sp:object | 202 | ] [ sp:object |
258 | - [ sp:varName "kind"^^xsd:string | 203 | + [ sp:varName "operatorRef"^^xsd:string |
259 | ] ; | 204 | ] ; |
260 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ; | 205 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
261 | sp:subject | 206 | sp:subject |
262 | - [ sp:varName "productVolumeRef"^^xsd:string | 207 | + [ sp:varName "operator"^^xsd:string |
263 | - ] | ||
264 | - ] [ rdf:type sp:Bind ; | ||
265 | - sp:expression | ||
266 | - [ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ; | ||
267 | - sp:arg1 [ sp:varName "kind"^^xsd:string | ||
268 | - ] | ||
269 | - ] ; | ||
270 | - sp:variable | ||
271 | - [ sp:varName "reportKind"^^xsd:string | ||
272 | ] | 208 | ] |
273 | ]) | 209 | ]) |
274 | ] ; | 210 | ] ; |
275 | spin:rule | 211 | spin:rule |
276 | [ rdf:type sp:Construct ; | 212 | [ rdf:type sp:Construct ; |
277 | rdfs:comment "STEP 20011 Create the period ProductionFlow and the ProductionFlowToDate - if necessary ."^^xsd:string ; | 213 | rdfs:comment "STEP 20011 Create the period ProductionFlow and the ProductionFlowToDate - if necessary ."^^xsd:string ; |
278 | - sp:templates ([ sp:object _:b4 ; | 214 | + sp:templates ([ sp:object _:b2 ; |
279 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | 215 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; |
280 | sp:subject | 216 | sp:subject |
281 | [ sp:varName "productVolumeReport"^^xsd:string | 217 | [ sp:varName "productVolumeReport"^^xsd:string |
282 | ] | 218 | ] |
283 | ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; | 219 | ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; |
284 | sp:predicate rdf:type ; | 220 | sp:predicate rdf:type ; |
285 | - sp:subject _:b4 | 221 | + sp:subject _:b2 |
286 | ] [ sp:object | 222 | ] [ sp:object |
287 | [ sp:varName "productVolumeRef"^^xsd:string | 223 | [ sp:varName "productVolumeRef"^^xsd:string |
288 | ] ; | 224 | ] ; |
289 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 225 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
290 | - sp:subject _:b4 | 226 | + sp:subject _:b2 |
291 | - ] [ sp:object _:b5 ; | 227 | + ] [ sp:object _:b3 ; |
292 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 228 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
293 | - sp:subject _:b4 | 229 | + sp:subject _:b2 |
294 | ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ; | 230 | ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ; |
295 | sp:predicate rdf:type ; | 231 | sp:predicate rdf:type ; |
296 | - sp:subject _:b5 | 232 | + sp:subject _:b3 |
297 | - ] [ sp:object _:b4 ; | 233 | + ] [ sp:object _:b2 ; |
298 | sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ; | 234 | sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ; |
299 | sp:subject | 235 | sp:subject |
300 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 236 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
301 | ] | 237 | ] |
302 | - ] [ sp:object _:b5 ; | 238 | + ] [ sp:object _:b3 ; |
303 | sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ; | 239 | sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ; |
304 | sp:subject | 240 | sp:subject |
305 | [ sp:varName "productionFacilityToDate"^^xsd:string | 241 | [ sp:varName "productionFacilityToDate"^^xsd:string |
... | @@ -310,6 +246,11 @@ | ... | @@ -310,6 +246,11 @@ |
310 | sp:subject | 246 | sp:subject |
311 | [ sp:varName "productionReport"^^xsd:string | 247 | [ sp:varName "productionReport"^^xsd:string |
312 | ] | 248 | ] |
249 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
250 | + sp:predicate rdf:type ; | ||
251 | + sp:subject | ||
252 | + [ sp:varName "productionReport"^^xsd:string | ||
253 | + ] | ||
313 | ] [ sp:object | 254 | ] [ sp:object |
314 | [ sp:varName "productVolumeRef"^^xsd:string | 255 | [ sp:varName "productVolumeRef"^^xsd:string |
315 | ] ; | 256 | ] ; |
... | @@ -360,58 +301,16 @@ | ... | @@ -360,58 +301,16 @@ |
360 | ] ; | 301 | ] ; |
361 | spin:rule | 302 | spin:rule |
362 | [ rdf:type sp:Construct ; | 303 | [ rdf:type sp:Construct ; |
363 | - rdfs:comment "STEP 20012 Create the period ProductionInventory and the ProductionInventoryToDate - if necessary ."^^xsd:string ; | 304 | + rdfs:comment "STEP 20050 Set the context facility - installation is always specified"^^xsd:string ; |
364 | - sp:templates ([ sp:object _:b6 ; | 305 | + sp:templates ([ sp:object |
365 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | 306 | + [ sp:varName "contextFacility"^^xsd:string |
366 | - sp:subject | ||
367 | - [ sp:varName "productVolumeReport"^^xsd:string | ||
368 | - ] | ||
369 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ; | ||
370 | - sp:predicate rdf:type ; | ||
371 | - sp:subject _:b6 | ||
372 | - ] [ sp:object | ||
373 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
374 | ] ; | 307 | ] ; |
375 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 308 | + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; |
376 | - sp:subject _:b6 | ||
377 | - ] [ sp:object _:b7 ; | ||
378 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
379 | - sp:subject _:b6 | ||
380 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ; | ||
381 | - sp:predicate rdf:type ; | ||
382 | - sp:subject _:b7 | ||
383 | - ] [ sp:object _:b6 ; | ||
384 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ; | ||
385 | - sp:subject | ||
386 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
387 | - ] | ||
388 | - ] [ sp:object _:b7 ; | ||
389 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ; | ||
390 | sp:subject | 309 | sp:subject |
391 | - [ sp:varName "productionFacilityToDate"^^xsd:string | 310 | + [ sp:varName "productionFacility"^^xsd:string |
392 | ] | 311 | ] |
393 | - ] [ sp:object | ||
394 | - [ sp:varName "facilityRef"^^xsd:string | ||
395 | - ] ; | ||
396 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
397 | - sp:subject _:b6 | ||
398 | - ] [ sp:object | ||
399 | - [ sp:varName "flowRef"^^xsd:string | ||
400 | - ] ; | ||
401 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
402 | - sp:subject _:b6 | ||
403 | - ] [ sp:object | ||
404 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
405 | - ] ; | ||
406 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
407 | - sp:subject _:b6 | ||
408 | ]) ; | 312 | ]) ; |
409 | - sp:where ([ sp:object spin:_this ; | 313 | + sp:where ([ sp:object |
410 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
411 | - sp:subject | ||
412 | - [ sp:varName "productionReport"^^xsd:string | ||
413 | - ] | ||
414 | - ] [ sp:object | ||
415 | [ sp:varName "productVolumeRef"^^xsd:string | 314 | [ sp:varName "productVolumeRef"^^xsd:string |
416 | ] ; | 315 | ] ; |
417 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 316 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
... | @@ -422,104 +321,75 @@ | ... | @@ -422,104 +321,75 @@ |
422 | [ sp:varName "productVolumeRef"^^xsd:string | 321 | [ sp:varName "productVolumeRef"^^xsd:string |
423 | ] | 322 | ] |
424 | ] [ sp:object | 323 | ] [ sp:object |
425 | - [ sp:varName "productVolumeRef"^^xsd:string | 324 | + [ sp:varName "installationRef"^^xsd:string |
426 | ] ; | 325 | ] ; |
427 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 326 | + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
428 | - sp:subject | ||
429 | - [ sp:varName "productVolumeReport"^^xsd:string | ||
430 | - ] | ||
431 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ; | ||
432 | - sp:predicate rdf:type ; | ||
433 | sp:subject | 327 | sp:subject |
434 | - [ sp:varName "productVolumeReport"^^xsd:string | 328 | + [ sp:varName "productVolumeRef"^^xsd:string |
435 | ] | 329 | ] |
436 | ] [ sp:object | 330 | ] [ sp:object |
437 | - [ sp:varName "productVolumeRef"^^xsd:string | 331 | + [ sp:varName "installationRef"^^xsd:string |
438 | ] ; | 332 | ] ; |
439 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 333 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
440 | sp:subject | 334 | sp:subject |
441 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 335 | + [ sp:varName "productionFacility"^^xsd:string |
442 | - ] | ||
443 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
444 | - sp:predicate rdf:type ; | ||
445 | - sp:subject | ||
446 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
447 | ] | 336 | ] |
448 | ] [ sp:object | 337 | ] [ sp:object |
449 | - [ sp:varName "productionFacilityToDate"^^xsd:string | 338 | + [ sp:varName "contextFacilityRef"^^xsd:string |
450 | ] ; | 339 | ] ; |
451 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 340 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; |
452 | sp:subject | 341 | sp:subject |
453 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 342 | + [ sp:varName "productVolumeRef"^^xsd:string |
454 | ] | 343 | ] |
455 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ; | 344 | + ] [ sp:object |
456 | - sp:predicate rdf:type ; | 345 | + [ sp:varName "contextFacilityRef"^^xsd:string |
346 | + ] ; | ||
347 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
457 | sp:subject | 348 | sp:subject |
458 | - [ sp:varName "productionFacilityToDate"^^xsd:string | 349 | + [ sp:varName "contextFacility"^^xsd:string |
459 | ] | 350 | ] |
460 | ]) | 351 | ]) |
461 | ] ; | 352 | ] ; |
462 | spin:rule | 353 | spin:rule |
463 | [ rdf:type sp:Construct ; | 354 | [ rdf:type sp:Construct ; |
464 | - rdfs:comment "STEP 20030 Record the start and end date-times"^^xsd:string ; | 355 | + rdfs:comment "STEP 20033 Inherit end dates from the report context if necessary"^^xsd:string ; |
465 | sp:templates ([ sp:object | 356 | sp:templates ([ sp:object |
466 | - [ sp:varName "dTimStart"^^xsd:string | 357 | + [ sp:varName "dateEnd"^^xsd:string |
467 | - ] ; | ||
468 | - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
469 | - sp:subject | ||
470 | - [ sp:varName "productionFlow"^^xsd:string | ||
471 | - ] | ||
472 | - ] [ sp:object | ||
473 | - [ sp:varName "dTimEnd"^^xsd:string | ||
474 | ] ; | 358 | ] ; |
475 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 359 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
476 | sp:subject | 360 | sp:subject |
477 | [ sp:varName "productionFlow"^^xsd:string | 361 | [ sp:varName "productionFlow"^^xsd:string |
478 | ] | 362 | ] |
479 | ] [ sp:object | 363 | ] [ sp:object |
480 | - [ sp:varName "dTimEnd"^^xsd:string | 364 | + [ sp:varName "dateEnd"^^xsd:string |
481 | ] ; | 365 | ] ; |
482 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 366 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
483 | sp:subject | 367 | sp:subject |
484 | [ sp:varName "productionFlowToDate"^^xsd:string | 368 | [ sp:varName "productionFlowToDate"^^xsd:string |
485 | ] | 369 | ] |
486 | ] [ sp:object | 370 | ] [ sp:object |
487 | - [ sp:varName "dTimStart"^^xsd:string | 371 | + [ sp:varName "dateEnd"^^xsd:string |
488 | - ] ; | ||
489 | - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
490 | - sp:subject | ||
491 | - [ sp:varName "productionInventory"^^xsd:string | ||
492 | - ] | ||
493 | - ] [ sp:object | ||
494 | - [ sp:varName "dTimEnd"^^xsd:string | ||
495 | ] ; | 372 | ] ; |
496 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 373 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
497 | sp:subject | 374 | sp:subject |
498 | [ sp:varName "productionInventory"^^xsd:string | 375 | [ sp:varName "productionInventory"^^xsd:string |
499 | ] | 376 | ] |
500 | ] [ sp:object | 377 | ] [ sp:object |
501 | - [ sp:varName "dTimEnd"^^xsd:string | 378 | + [ sp:varName "dateEnd"^^xsd:string |
502 | ] ; | 379 | ] ; |
503 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 380 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
504 | sp:subject | 381 | sp:subject |
505 | [ sp:varName "productionInventoryToDate"^^xsd:string | 382 | [ sp:varName "productionInventoryToDate"^^xsd:string |
506 | ] | 383 | ] |
507 | ] [ sp:object | 384 | ] [ sp:object |
508 | - [ sp:varName "dTimStart"^^xsd:string | 385 | + [ sp:varName "dateEnd"^^xsd:string |
509 | - ] ; | ||
510 | - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
511 | - sp:subject | ||
512 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
513 | - ] | ||
514 | - ] [ sp:object | ||
515 | - [ sp:varName "dTimEnd"^^xsd:string | ||
516 | ] ; | 386 | ] ; |
517 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 387 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
518 | sp:subject | 388 | sp:subject |
519 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 389 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
520 | ] | 390 | ] |
521 | ] [ sp:object | 391 | ] [ sp:object |
522 | - [ sp:varName "dTimEnd"^^xsd:string | 392 | + [ sp:varName "dateEnd"^^xsd:string |
523 | ] ; | 393 | ] ; |
524 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 394 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
525 | sp:subject | 395 | sp:subject |
... | @@ -531,25 +401,39 @@ | ... | @@ -531,25 +401,39 @@ |
531 | ] ; | 401 | ] ; |
532 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 402 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
533 | sp:subject spin:_this | 403 | sp:subject spin:_this |
404 | + ] [ sp:object | ||
405 | + [ sp:varName "dateEnd"^^xsd:string | ||
406 | + ] ; | ||
407 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; | ||
408 | + sp:subject spin:_this | ||
409 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
410 | + sp:predicate rdf:type ; | ||
411 | + sp:subject | ||
412 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
413 | + ] | ||
534 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | 414 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; |
535 | sp:predicate rdf:type ; | 415 | sp:predicate rdf:type ; |
536 | sp:subject | 416 | sp:subject |
537 | [ sp:varName "productVolumeRef"^^xsd:string | 417 | [ sp:varName "productVolumeRef"^^xsd:string |
538 | ] | 418 | ] |
539 | - ] [ sp:object | 419 | + ] [ rdf:type sp:NotExists ; |
540 | - [ sp:varName "dTimStart"^^xsd:string | 420 | + sp:elements ([ sp:object |
421 | + [ sp:varName "dateEndx"^^xsd:string | ||
541 | ] ; | 422 | ] ; |
542 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ; | 423 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
543 | sp:subject | 424 | sp:subject |
544 | [ sp:varName "productVolumeRef"^^xsd:string | 425 | [ sp:varName "productVolumeRef"^^xsd:string |
545 | ] | 426 | ] |
546 | - ] [ sp:object | 427 | + ]) |
547 | - [ sp:varName "dTimEnd"^^xsd:string | 428 | + ] [ rdf:type sp:NotExists ; |
429 | + sp:elements ([ sp:object | ||
430 | + [ sp:varName "dTimEndx"^^xsd:string | ||
548 | ] ; | 431 | ] ; |
549 | sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ; | 432 | sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ; |
550 | sp:subject | 433 | sp:subject |
551 | [ sp:varName "productVolumeRef"^^xsd:string | 434 | [ sp:varName "productVolumeRef"^^xsd:string |
552 | ] | 435 | ] |
436 | + ]) | ||
553 | ] [ sp:object | 437 | ] [ sp:object |
554 | [ sp:varName "productVolumeRef"^^xsd:string | 438 | [ sp:varName "productVolumeRef"^^xsd:string |
555 | ] ; | 439 | ] ; |
... | @@ -626,27 +510,30 @@ | ... | @@ -626,27 +510,30 @@ |
626 | ] ; | 510 | ] ; |
627 | spin:rule | 511 | spin:rule |
628 | [ rdf:type sp:Construct ; | 512 | [ rdf:type sp:Construct ; |
629 | - rdfs:comment "STEP 20032 Inherit start dates from the report context if necessary"^^xsd:string ; | 513 | + rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ; |
630 | sp:templates ([ sp:object | 514 | sp:templates ([ sp:object |
631 | - [ sp:varName "dateStart"^^xsd:string | 515 | + [ sp:varName "reportKind"^^xsd:string |
632 | ] ; | 516 | ] ; |
633 | - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | 517 | + sp:predicate rdf:type ; |
634 | sp:subject | 518 | sp:subject |
635 | - [ sp:varName "productionFlow"^^xsd:string | 519 | + [ sp:varName "productVolumeReport"^^xsd:string |
636 | ] | 520 | ] |
637 | - ] [ sp:object | 521 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReportKind> ; |
638 | - [ sp:varName "dateStart"^^xsd:string | 522 | + sp:predicate rdf:type ; |
639 | - ] ; | ||
640 | - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
641 | sp:subject | 523 | sp:subject |
642 | - [ sp:varName "productionInventory"^^xsd:string | 524 | + [ sp:varName "reportKind"^^xsd:string |
525 | + ] | ||
526 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
527 | + sp:predicate rdfs:subClassOf ; | ||
528 | + sp:subject | ||
529 | + [ sp:varName "reportKind"^^xsd:string | ||
643 | ] | 530 | ] |
644 | ] [ sp:object | 531 | ] [ sp:object |
645 | - [ sp:varName "dateStart"^^xsd:string | 532 | + [ sp:varName "kind"^^xsd:string |
646 | ] ; | 533 | ] ; |
647 | - sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | 534 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; |
648 | sp:subject | 535 | sp:subject |
649 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 536 | + [ sp:varName "reportKind"^^xsd:string |
650 | ] | 537 | ] |
651 | ]) ; | 538 | ]) ; |
652 | sp:where ([ sp:object | 539 | sp:where ([ sp:object |
... | @@ -654,169 +541,317 @@ | ... | @@ -654,169 +541,317 @@ |
654 | ] ; | 541 | ] ; |
655 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 542 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
656 | sp:subject spin:_this | 543 | sp:subject spin:_this |
657 | - ] [ sp:object | ||
658 | - [ sp:varName "dateStart"^^xsd:string | ||
659 | - ] ; | ||
660 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; | ||
661 | - sp:subject spin:_this | ||
662 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | 544 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; |
663 | sp:predicate rdf:type ; | 545 | sp:predicate rdf:type ; |
664 | sp:subject | 546 | sp:subject |
665 | [ sp:varName "productVolumeRef"^^xsd:string | 547 | [ sp:varName "productVolumeRef"^^xsd:string |
666 | ] | 548 | ] |
667 | - ] [ rdf:type sp:NotExists ; | 549 | + ] [ sp:object |
668 | - sp:elements ([ sp:object | 550 | + [ sp:varName "productVolumeRef"^^xsd:string |
669 | - [ sp:varName "dateStartx"^^xsd:string | ||
670 | ] ; | 551 | ] ; |
671 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 552 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
553 | + sp:subject | ||
554 | + [ sp:varName "productVolumeReport"^^xsd:string | ||
555 | + ] | ||
556 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ; | ||
557 | + sp:predicate rdf:type ; | ||
558 | + sp:subject | ||
559 | + [ sp:varName "productVolumeReport"^^xsd:string | ||
560 | + ] | ||
561 | + ] [ sp:object | ||
562 | + [ sp:varName "nameRef"^^xsd:string | ||
563 | + ] ; | ||
564 | + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ; | ||
672 | sp:subject | 565 | sp:subject |
673 | [ sp:varName "productVolumeRef"^^xsd:string | 566 | [ sp:varName "productVolumeRef"^^xsd:string |
674 | ] | 567 | ] |
675 | - ]) | 568 | + ] [ sp:object |
676 | - ] [ rdf:type sp:NotExists ; | 569 | + [ sp:varName "name"^^xsd:string |
677 | - sp:elements ([ sp:object | ||
678 | - [ sp:varName "dTimStartx"^^xsd:string | ||
679 | ] ; | 570 | ] ; |
680 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ; | 571 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
572 | + sp:subject | ||
573 | + [ sp:varName "nameRef"^^xsd:string | ||
574 | + ] | ||
575 | + ] [ sp:object | ||
576 | + [ sp:varName "kind"^^xsd:string | ||
577 | + ] ; | ||
578 | + sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ; | ||
681 | sp:subject | 579 | sp:subject |
682 | [ sp:varName "productVolumeRef"^^xsd:string | 580 | [ sp:varName "productVolumeRef"^^xsd:string |
683 | ] | 581 | ] |
582 | + ] [ rdf:type sp:Bind ; | ||
583 | + sp:expression | ||
584 | + [ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ; | ||
585 | + sp:arg1 [ sp:varName "kind"^^xsd:string | ||
586 | + ] | ||
587 | + ] ; | ||
588 | + sp:variable | ||
589 | + [ sp:varName "reportKind"^^xsd:string | ||
590 | + ] | ||
684 | ]) | 591 | ]) |
592 | + ] ; | ||
593 | + spin:rule | ||
594 | + [ rdf:type sp:Construct ; | ||
595 | + rdfs:comment "STEP 20040 Set the production facility - supplied"^^xsd:string ; | ||
596 | + sp:templates ([ sp:object | ||
597 | + [ sp:varName "productionFacility"^^xsd:string | ||
598 | + ] ; | ||
599 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
600 | + sp:subject | ||
601 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
602 | + ] | ||
685 | ] [ sp:object | 603 | ] [ sp:object |
686 | - [ sp:varName "productVolumeRef"^^xsd:string | 604 | + [ sp:varName "productionFacility"^^xsd:string |
687 | ] ; | 605 | ] ; |
688 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 606 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
689 | sp:subject | 607 | sp:subject |
690 | - [ sp:varName "productionFlow"^^xsd:string | 608 | + [ sp:varName "productionFacilityToDate"^^xsd:string |
691 | ] | 609 | ] |
692 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; | 610 | + ] [ sp:object |
611 | + [ sp:varName "normalizedProductionFacilityName"^^xsd:string | ||
612 | + ] ; | ||
613 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
614 | + sp:subject | ||
615 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
616 | + ] | ||
617 | + ]) ; | ||
618 | + sp:where ([ sp:object | ||
619 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
620 | + ] ; | ||
621 | + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
622 | + sp:subject spin:_this | ||
623 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
693 | sp:predicate rdf:type ; | 624 | sp:predicate rdf:type ; |
694 | sp:subject | 625 | sp:subject |
695 | - [ sp:varName "productionFlow"^^xsd:string | 626 | + [ sp:varName "productVolumeRef"^^xsd:string |
696 | ] | 627 | ] |
697 | ] [ sp:object | 628 | ] [ sp:object |
698 | - [ sp:varName "productionFlowToDate"^^xsd:string | 629 | + [ sp:varName "installationRef"^^xsd:string |
699 | ] ; | 630 | ] ; |
700 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 631 | + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
701 | sp:subject | 632 | sp:subject |
702 | - [ sp:varName "productionFlow"^^xsd:string | 633 | + [ sp:varName "productVolumeRef"^^xsd:string |
703 | ] | 634 | ] |
704 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ; | 635 | + ] [ sp:object |
705 | - sp:predicate rdf:type ; | 636 | + [ sp:varName "installationRef"^^xsd:string |
637 | + ] ; | ||
638 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
706 | sp:subject | 639 | sp:subject |
707 | - [ sp:varName "productionFlowToDate"^^xsd:string | 640 | + [ sp:varName "productionFacility"^^xsd:string |
708 | ] | 641 | ] |
709 | ] [ sp:object | 642 | ] [ sp:object |
710 | [ sp:varName "productVolumeRef"^^xsd:string | 643 | [ sp:varName "productVolumeRef"^^xsd:string |
711 | ] ; | 644 | ] ; |
712 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 645 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
713 | sp:subject | 646 | sp:subject |
714 | - [ sp:varName "productionInventory"^^xsd:string | 647 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
715 | ] | 648 | ] |
716 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ; | 649 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
717 | sp:predicate rdf:type ; | 650 | sp:predicate rdf:type ; |
718 | sp:subject | 651 | sp:subject |
719 | - [ sp:varName "productionInventory"^^xsd:string | 652 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
720 | ] | 653 | ] |
721 | ] [ sp:object | 654 | ] [ sp:object |
722 | - [ sp:varName "productionInventoryToDate"^^xsd:string | 655 | + [ sp:varName "productionFacilityToDate"^^xsd:string |
723 | ] ; | 656 | ] ; |
724 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 657 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
725 | sp:subject | 658 | sp:subject |
726 | - [ sp:varName "productionInventory"^^xsd:string | 659 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
727 | ] | 660 | ] |
728 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ; | 661 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ; |
729 | sp:predicate rdf:type ; | 662 | sp:predicate rdf:type ; |
730 | sp:subject | 663 | sp:subject |
731 | - [ sp:varName "productionInventoryToDate"^^xsd:string | 664 | + [ sp:varName "productionFacilityToDate"^^xsd:string |
665 | + ] | ||
666 | + ] [ rdf:type sp:Bind ; | ||
667 | + sp:expression | ||
668 | + [ rdf:type spl:object ; | ||
669 | + sp:arg1 [ sp:varName "installationRef"^^xsd:string | ||
670 | + ] ; | ||
671 | + sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> | ||
672 | + ] ; | ||
673 | + sp:variable | ||
674 | + [ sp:varName "normalizedProductionFacilityName"^^xsd:string | ||
732 | ] | 675 | ] |
676 | + ]) | ||
677 | + ] ; | ||
678 | + spin:rule | ||
679 | + [ rdf:type sp:Construct ; | ||
680 | + rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ; | ||
681 | + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ; | ||
682 | + sp:predicate rdf:type ; | ||
683 | + sp:subject _:b4 | ||
684 | + ] [ sp:object | ||
685 | + [ sp:varName "productionReport"^^xsd:string | ||
686 | + ] ; | ||
687 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ; | ||
688 | + sp:subject _:b4 | ||
689 | + ] [ sp:object | ||
690 | + [ sp:varName "name"^^xsd:string | ||
691 | + ] ; | ||
692 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | ||
693 | + sp:subject _:b4 | ||
694 | + ] [ sp:object | ||
695 | + [ sp:varName "reportPeriodType"^^xsd:string | ||
696 | + ] ; | ||
697 | + sp:predicate rdf:type ; | ||
698 | + sp:subject _:b4 | ||
699 | + ] [ sp:object | ||
700 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
701 | + ] ; | ||
702 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
703 | + sp:subject _:b4 | ||
704 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
705 | + sp:predicate rdf:type ; | ||
706 | + sp:subject _:b5 | ||
733 | ] [ sp:object | 707 | ] [ sp:object |
734 | [ sp:varName "productVolumeRef"^^xsd:string | 708 | [ sp:varName "productVolumeRef"^^xsd:string |
735 | ] ; | 709 | ] ; |
736 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 710 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
711 | + sp:subject _:b5 | ||
712 | + ] [ sp:object _:b6 ; | ||
713 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
714 | + sp:subject _:b5 | ||
715 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ; | ||
716 | + sp:predicate rdf:type ; | ||
717 | + sp:subject _:b6 | ||
718 | + ] [ sp:object | ||
719 | + [ sp:varName "title"^^xsd:string | ||
720 | + ] ; | ||
721 | + sp:predicate <http://purl.org/dc/elements/1.1/title> ; | ||
722 | + sp:subject _:b4 | ||
723 | + ]) ; | ||
724 | + sp:where ([ sp:object spin:_this ; | ||
725 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
737 | sp:subject | 726 | sp:subject |
738 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 727 | + [ sp:varName "productionReport"^^xsd:string |
739 | ] | 728 | ] |
740 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | 729 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
741 | sp:predicate rdf:type ; | 730 | sp:predicate rdf:type ; |
742 | sp:subject | 731 | sp:subject |
743 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 732 | + [ sp:varName "productionReport"^^xsd:string |
744 | ] | 733 | ] |
745 | ] [ sp:object | 734 | ] [ sp:object |
746 | - [ sp:varName "productionFacilityToDate"^^xsd:string | 735 | + [ sp:varName "productVolumeRef"^^xsd:string |
747 | ] ; | 736 | ] ; |
748 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 737 | + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
738 | + sp:subject spin:_this | ||
739 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
740 | + sp:predicate rdf:type ; | ||
749 | sp:subject | 741 | sp:subject |
750 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 742 | + [ sp:varName "productVolumeRef"^^xsd:string |
743 | + ] | ||
744 | + ] [ sp:object | ||
745 | + [ sp:varName "nameRef"^^xsd:string | ||
746 | + ] ; | ||
747 | + sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ; | ||
748 | + sp:subject | ||
749 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
750 | + ] | ||
751 | + ] [ sp:object | ||
752 | + [ sp:varName "name"^^xsd:string | ||
753 | + ] ; | ||
754 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
755 | + sp:subject | ||
756 | + [ sp:varName "nameRef"^^xsd:string | ||
757 | + ] | ||
758 | + ] [ rdf:type sp:Optional ; | ||
759 | + sp:elements ([ sp:object | ||
760 | + [ sp:varName "periodKindRef"^^xsd:string | ||
761 | + ] ; | ||
762 | + sp:predicate <http://www.epim.no/schemas/mprml/1#periodKindRef> ; | ||
763 | + sp:subject | ||
764 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
765 | + ] | ||
766 | + ]) | ||
767 | + ] [ rdf:type sp:Optional ; | ||
768 | + sp:elements ([ sp:object | ||
769 | + [ sp:varName "titleRef"^^xsd:string | ||
770 | + ] ; | ||
771 | + sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ; | ||
772 | + sp:subject | ||
773 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
774 | + ] | ||
775 | + ] [ sp:object | ||
776 | + [ sp:varName "title"^^xsd:string | ||
777 | + ] ; | ||
778 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
779 | + sp:subject | ||
780 | + [ sp:varName "titleRef"^^xsd:string | ||
781 | + ] | ||
782 | + ]) | ||
783 | + ] [ rdf:type sp:Bind ; | ||
784 | + sp:expression | ||
785 | + [ rdf:type ep-mpr-spin-lib:selectReportPeriodType ; | ||
786 | + sp:arg1 [ sp:varName "periodKindRef"^^xsd:string | ||
751 | ] | 787 | ] |
752 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ; | 788 | + ] ; |
753 | - sp:predicate rdf:type ; | 789 | + sp:variable |
754 | - sp:subject | 790 | + [ sp:varName "reportPeriodType"^^xsd:string |
755 | - [ sp:varName "productionFacilityToDate"^^xsd:string | ||
756 | ] | 791 | ] |
757 | ]) | 792 | ]) |
758 | ] ; | 793 | ] ; |
759 | spin:rule | 794 | spin:rule |
760 | [ rdf:type sp:Construct ; | 795 | [ rdf:type sp:Construct ; |
761 | - rdfs:comment "STEP 20031 Record the start and end dates"^^xsd:string ; | 796 | + rdfs:comment "STEP 20030 Record the start and end date-times"^^xsd:string ; |
762 | sp:templates ([ sp:object | 797 | sp:templates ([ sp:object |
763 | - [ sp:varName "dateStart"^^xsd:string | 798 | + [ sp:varName "dTimStart"^^xsd:string |
764 | ] ; | 799 | ] ; |
765 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | 800 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; |
766 | sp:subject | 801 | sp:subject |
767 | [ sp:varName "productionFlow"^^xsd:string | 802 | [ sp:varName "productionFlow"^^xsd:string |
768 | ] | 803 | ] |
769 | ] [ sp:object | 804 | ] [ sp:object |
770 | - [ sp:varName "dateEnd"^^xsd:string | 805 | + [ sp:varName "dTimEnd"^^xsd:string |
771 | ] ; | 806 | ] ; |
772 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 807 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
773 | sp:subject | 808 | sp:subject |
774 | [ sp:varName "productionFlow"^^xsd:string | 809 | [ sp:varName "productionFlow"^^xsd:string |
775 | ] | 810 | ] |
776 | ] [ sp:object | 811 | ] [ sp:object |
777 | - [ sp:varName "dateEnd"^^xsd:string | 812 | + [ sp:varName "dTimEnd"^^xsd:string |
778 | ] ; | 813 | ] ; |
779 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 814 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
780 | sp:subject | 815 | sp:subject |
781 | [ sp:varName "productionFlowToDate"^^xsd:string | 816 | [ sp:varName "productionFlowToDate"^^xsd:string |
782 | ] | 817 | ] |
783 | ] [ sp:object | 818 | ] [ sp:object |
784 | - [ sp:varName "dateStart"^^xsd:string | 819 | + [ sp:varName "dTimStart"^^xsd:string |
785 | ] ; | 820 | ] ; |
786 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | 821 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; |
787 | sp:subject | 822 | sp:subject |
788 | [ sp:varName "productionInventory"^^xsd:string | 823 | [ sp:varName "productionInventory"^^xsd:string |
789 | ] | 824 | ] |
790 | ] [ sp:object | 825 | ] [ sp:object |
791 | - [ sp:varName "dateEnd"^^xsd:string | 826 | + [ sp:varName "dTimEnd"^^xsd:string |
792 | ] ; | 827 | ] ; |
793 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 828 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
794 | sp:subject | 829 | sp:subject |
795 | [ sp:varName "productionInventory"^^xsd:string | 830 | [ sp:varName "productionInventory"^^xsd:string |
796 | ] | 831 | ] |
797 | ] [ sp:object | 832 | ] [ sp:object |
798 | - [ sp:varName "dateEnd"^^xsd:string | 833 | + [ sp:varName "dTimEnd"^^xsd:string |
799 | ] ; | 834 | ] ; |
800 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 835 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
801 | sp:subject | 836 | sp:subject |
802 | [ sp:varName "productionInventoryToDate"^^xsd:string | 837 | [ sp:varName "productionInventoryToDate"^^xsd:string |
803 | ] | 838 | ] |
804 | ] [ sp:object | 839 | ] [ sp:object |
805 | - [ sp:varName "dateStart"^^xsd:string | 840 | + [ sp:varName "dTimStart"^^xsd:string |
806 | ] ; | 841 | ] ; |
807 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | 842 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; |
808 | sp:subject | 843 | sp:subject |
809 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 844 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
810 | ] | 845 | ] |
811 | ] [ sp:object | 846 | ] [ sp:object |
812 | - [ sp:varName "dateEnd"^^xsd:string | 847 | + [ sp:varName "dTimEnd"^^xsd:string |
813 | ] ; | 848 | ] ; |
814 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 849 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
815 | sp:subject | 850 | sp:subject |
816 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 851 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
817 | ] | 852 | ] |
818 | ] [ sp:object | 853 | ] [ sp:object |
819 | - [ sp:varName "dateEnd"^^xsd:string | 854 | + [ sp:varName "dTimEnd"^^xsd:string |
820 | ] ; | 855 | ] ; |
821 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 856 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
822 | sp:subject | 857 | sp:subject |
... | @@ -834,16 +869,16 @@ | ... | @@ -834,16 +869,16 @@ |
834 | [ sp:varName "productVolumeRef"^^xsd:string | 869 | [ sp:varName "productVolumeRef"^^xsd:string |
835 | ] | 870 | ] |
836 | ] [ sp:object | 871 | ] [ sp:object |
837 | - [ sp:varName "dateStart"^^xsd:string | 872 | + [ sp:varName "dTimStart"^^xsd:string |
838 | ] ; | 873 | ] ; |
839 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 874 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ; |
840 | sp:subject | 875 | sp:subject |
841 | [ sp:varName "productVolumeRef"^^xsd:string | 876 | [ sp:varName "productVolumeRef"^^xsd:string |
842 | ] | 877 | ] |
843 | ] [ sp:object | 878 | ] [ sp:object |
844 | - [ sp:varName "dateEnd"^^xsd:string | 879 | + [ sp:varName "dTimEnd"^^xsd:string |
845 | ] ; | 880 | ] ; |
846 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 881 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ; |
847 | sp:subject | 882 | sp:subject |
848 | [ sp:varName "productVolumeRef"^^xsd:string | 883 | [ sp:varName "productVolumeRef"^^xsd:string |
849 | ] | 884 | ] |
... | @@ -923,7 +958,7 @@ | ... | @@ -923,7 +958,7 @@ |
923 | ] ; | 958 | ] ; |
924 | spin:rule | 959 | spin:rule |
925 | [ rdf:type sp:Construct ; | 960 | [ rdf:type sp:Construct ; |
926 | - rdfs:comment "STEP 20040 Set the installation"^^xsd:string ; | 961 | + rdfs:comment "STEP 20041 Set the production facility - taken from context"^^xsd:string ; |
927 | sp:templates ([ sp:object | 962 | sp:templates ([ sp:object |
928 | [ sp:varName "productionFacility"^^xsd:string | 963 | [ sp:varName "productionFacility"^^xsd:string |
929 | ] ; | 964 | ] ; |
... | @@ -938,8 +973,30 @@ | ... | @@ -938,8 +973,30 @@ |
938 | sp:subject | 973 | sp:subject |
939 | [ sp:varName "productionFacilityToDate"^^xsd:string | 974 | [ sp:varName "productionFacilityToDate"^^xsd:string |
940 | ] | 975 | ] |
976 | + ] [ sp:object | ||
977 | + [ sp:varName "normalizedProductionFacilityName"^^xsd:string | ||
978 | + ] ; | ||
979 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
980 | + sp:subject | ||
981 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
982 | + ] | ||
941 | ]) ; | 983 | ]) ; |
942 | - sp:where ([ sp:object | 984 | + sp:where ([ sp:object spin:_this ; |
985 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
986 | + sp:subject | ||
987 | + [ sp:varName "productionFacility"^^xsd:string | ||
988 | + ] | ||
989 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ; | ||
990 | + sp:predicate rdf:type ; | ||
991 | + sp:subject | ||
992 | + [ sp:varName "productionFacility"^^xsd:string | ||
993 | + ] | ||
994 | + ] [ sp:object | ||
995 | + [ sp:varName "normalizedProductionFacilityName"^^xsd:string | ||
996 | + ] ; | ||
997 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; | ||
998 | + sp:subject spin:_this | ||
999 | + ] [ sp:object | ||
943 | [ sp:varName "productVolumeRef"^^xsd:string | 1000 | [ sp:varName "productVolumeRef"^^xsd:string |
944 | ] ; | 1001 | ] ; |
945 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 1002 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
... | @@ -949,20 +1006,15 @@ | ... | @@ -949,20 +1006,15 @@ |
949 | sp:subject | 1006 | sp:subject |
950 | [ sp:varName "productVolumeRef"^^xsd:string | 1007 | [ sp:varName "productVolumeRef"^^xsd:string |
951 | ] | 1008 | ] |
952 | - ] [ sp:object | 1009 | + ] [ rdf:type sp:NotExists ; |
953 | - [ sp:varName "installationRef"^^xsd:string | 1010 | + sp:elements ([ sp:object |
1011 | + [ sp:varName "installationRefx"^^xsd:string | ||
954 | ] ; | 1012 | ] ; |
955 | sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 1013 | sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
956 | sp:subject | 1014 | sp:subject |
957 | [ sp:varName "productVolumeRef"^^xsd:string | 1015 | [ sp:varName "productVolumeRef"^^xsd:string |
958 | ] | 1016 | ] |
959 | - ] [ sp:object | 1017 | + ]) |
960 | - [ sp:varName "installationRef"^^xsd:string | ||
961 | - ] ; | ||
962 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
963 | - sp:subject | ||
964 | - [ sp:varName "productionFacility"^^xsd:string | ||
965 | - ] | ||
966 | ] [ sp:object | 1018 | ] [ sp:object |
967 | [ sp:varName "productVolumeRef"^^xsd:string | 1019 | [ sp:varName "productVolumeRef"^^xsd:string |
968 | ] ; | 1020 | ] ; |
... | @@ -991,64 +1043,15 @@ | ... | @@ -991,64 +1043,15 @@ |
991 | ] ; | 1043 | ] ; |
992 | spin:rule | 1044 | spin:rule |
993 | [ rdf:type sp:Construct ; | 1045 | [ rdf:type sp:Construct ; |
994 | - rdfs:comment """STEP 20060 Set the facility operator | 1046 | + rdfs:comment "STEP 20031 Record the start and end dates"^^xsd:string ; |
995 | -role is ignored, because it is implicitly \"operator\""""^^xsd:string ; | 1047 | + sp:templates ([ sp:object |
996 | - sp:templates ([ sp:object _:b8 ; | 1048 | + [ sp:varName "dateStart"^^xsd:string |
997 | - sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; | ||
998 | - sp:subject | ||
999 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1000 | - ] | ||
1001 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; | ||
1002 | - sp:predicate rdf:type ; | ||
1003 | - sp:subject _:b8 | ||
1004 | - ] [ sp:object | ||
1005 | - [ sp:varName "operator"^^xsd:string | ||
1006 | - ] ; | ||
1007 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
1008 | - sp:subject _:b8 | ||
1009 | - ]) ; | ||
1010 | - sp:where ([ sp:object | ||
1011 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
1012 | - ] ; | ||
1013 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
1014 | - sp:subject spin:_this | ||
1015 | - ] [ sp:object | ||
1016 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
1017 | - ] ; | ||
1018 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1019 | - sp:subject | ||
1020 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1021 | - ] | ||
1022 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
1023 | - sp:predicate rdf:type ; | ||
1024 | - sp:subject | ||
1025 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1026 | - ] | ||
1027 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
1028 | - sp:predicate rdf:type ; | ||
1029 | - sp:subject | ||
1030 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
1031 | - ] | ||
1032 | - ] [ sp:object | ||
1033 | - [ sp:varName "operatorRef"^^xsd:string | ||
1034 | ] ; | 1049 | ] ; |
1035 | - sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ; | 1050 | + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; |
1036 | sp:subject | 1051 | sp:subject |
1037 | - [ sp:varName "productVolumeRef"^^xsd:string | 1052 | + [ sp:varName "productionFlow"^^xsd:string |
1038 | ] | 1053 | ] |
1039 | ] [ sp:object | 1054 | ] [ sp:object |
1040 | - [ sp:varName "operatorRef"^^xsd:string | ||
1041 | - ] ; | ||
1042 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1043 | - sp:subject | ||
1044 | - [ sp:varName "operator"^^xsd:string | ||
1045 | - ] | ||
1046 | - ]) | ||
1047 | - ] ; | ||
1048 | - spin:rule | ||
1049 | - [ rdf:type sp:Construct ; | ||
1050 | - rdfs:comment "STEP 20033 Inherit end dates from the report context if necessary"^^xsd:string ; | ||
1051 | - sp:templates ([ sp:object | ||
1052 | [ sp:varName "dateEnd"^^xsd:string | 1055 | [ sp:varName "dateEnd"^^xsd:string |
1053 | ] ; | 1056 | ] ; |
1054 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 1057 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
... | @@ -1063,6 +1066,13 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; | ... | @@ -1063,6 +1066,13 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; |
1063 | [ sp:varName "productionFlowToDate"^^xsd:string | 1066 | [ sp:varName "productionFlowToDate"^^xsd:string |
1064 | ] | 1067 | ] |
1065 | ] [ sp:object | 1068 | ] [ sp:object |
1069 | + [ sp:varName "dateStart"^^xsd:string | ||
1070 | + ] ; | ||
1071 | + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
1072 | + sp:subject | ||
1073 | + [ sp:varName "productionInventory"^^xsd:string | ||
1074 | + ] | ||
1075 | + ] [ sp:object | ||
1066 | [ sp:varName "dateEnd"^^xsd:string | 1076 | [ sp:varName "dateEnd"^^xsd:string |
1067 | ] ; | 1077 | ] ; |
1068 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 1078 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
... | @@ -1077,6 +1087,13 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; | ... | @@ -1077,6 +1087,13 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; |
1077 | [ sp:varName "productionInventoryToDate"^^xsd:string | 1087 | [ sp:varName "productionInventoryToDate"^^xsd:string |
1078 | ] | 1088 | ] |
1079 | ] [ sp:object | 1089 | ] [ sp:object |
1090 | + [ sp:varName "dateStart"^^xsd:string | ||
1091 | + ] ; | ||
1092 | + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; | ||
1093 | + sp:subject | ||
1094 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1095 | + ] | ||
1096 | + ] [ sp:object | ||
1080 | [ sp:varName "dateEnd"^^xsd:string | 1097 | [ sp:varName "dateEnd"^^xsd:string |
1081 | ] ; | 1098 | ] ; |
1082 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; | 1099 | sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; |
... | @@ -1096,39 +1113,25 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; | ... | @@ -1096,39 +1113,25 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; |
1096 | ] ; | 1113 | ] ; |
1097 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 1114 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
1098 | sp:subject spin:_this | 1115 | sp:subject spin:_this |
1099 | - ] [ sp:object | ||
1100 | - [ sp:varName "dateEnd"^^xsd:string | ||
1101 | - ] ; | ||
1102 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; | ||
1103 | - sp:subject spin:_this | ||
1104 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
1105 | - sp:predicate rdf:type ; | ||
1106 | - sp:subject | ||
1107 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
1108 | - ] | ||
1109 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | 1116 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; |
1110 | sp:predicate rdf:type ; | 1117 | sp:predicate rdf:type ; |
1111 | sp:subject | 1118 | sp:subject |
1112 | [ sp:varName "productVolumeRef"^^xsd:string | 1119 | [ sp:varName "productVolumeRef"^^xsd:string |
1113 | ] | 1120 | ] |
1114 | - ] [ rdf:type sp:NotExists ; | 1121 | + ] [ sp:object |
1115 | - sp:elements ([ sp:object | 1122 | + [ sp:varName "dateStart"^^xsd:string |
1116 | - [ sp:varName "dateEndx"^^xsd:string | ||
1117 | ] ; | 1123 | ] ; |
1118 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 1124 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
1119 | sp:subject | 1125 | sp:subject |
1120 | [ sp:varName "productVolumeRef"^^xsd:string | 1126 | [ sp:varName "productVolumeRef"^^xsd:string |
1121 | ] | 1127 | ] |
1122 | - ]) | 1128 | + ] [ sp:object |
1123 | - ] [ rdf:type sp:NotExists ; | 1129 | + [ sp:varName "dateEnd"^^xsd:string |
1124 | - sp:elements ([ sp:object | ||
1125 | - [ sp:varName "dTimEndx"^^xsd:string | ||
1126 | ] ; | 1130 | ] ; |
1127 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ; | 1131 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
1128 | sp:subject | 1132 | sp:subject |
1129 | [ sp:varName "productVolumeRef"^^xsd:string | 1133 | [ sp:varName "productVolumeRef"^^xsd:string |
1130 | ] | 1134 | ] |
1131 | - ]) | ||
1132 | ] [ sp:object | 1135 | ] [ sp:object |
1133 | [ sp:varName "productVolumeRef"^^xsd:string | 1136 | [ sp:varName "productVolumeRef"^^xsd:string |
1134 | ] ; | 1137 | ] ; |
... | @@ -1202,6 +1205,97 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; | ... | @@ -1202,6 +1205,97 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ; |
1202 | [ sp:varName "productionFacilityToDate"^^xsd:string | 1205 | [ sp:varName "productionFacilityToDate"^^xsd:string |
1203 | ] | 1206 | ] |
1204 | ]) | 1207 | ]) |
1208 | + ] ; | ||
1209 | + spin:rule | ||
1210 | + [ rdf:type sp:Construct ; | ||
1211 | + rdfs:comment "STEP 20012 Create the period ProductionInventory and the ProductionInventoryToDate - if necessary ."^^xsd:string ; | ||
1212 | + sp:templates ([ sp:object _:b7 ; | ||
1213 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | ||
1214 | + sp:subject | ||
1215 | + [ sp:varName "productVolumeReport"^^xsd:string | ||
1216 | + ] | ||
1217 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ; | ||
1218 | + sp:predicate rdf:type ; | ||
1219 | + sp:subject _:b7 | ||
1220 | + ] [ sp:object | ||
1221 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
1222 | + ] ; | ||
1223 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1224 | + sp:subject _:b7 | ||
1225 | + ] [ sp:object _:b8 ; | ||
1226 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
1227 | + sp:subject _:b7 | ||
1228 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ; | ||
1229 | + sp:predicate rdf:type ; | ||
1230 | + sp:subject _:b8 | ||
1231 | + ] [ sp:object _:b7 ; | ||
1232 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ; | ||
1233 | + sp:subject | ||
1234 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1235 | + ] | ||
1236 | + ] [ sp:object _:b8 ; | ||
1237 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ; | ||
1238 | + sp:subject | ||
1239 | + [ sp:varName "productionFacilityToDate"^^xsd:string | ||
1240 | + ] | ||
1241 | + ]) ; | ||
1242 | + sp:where ([ sp:object spin:_this ; | ||
1243 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1244 | + sp:subject | ||
1245 | + [ sp:varName "productionReport"^^xsd:string | ||
1246 | + ] | ||
1247 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
1248 | + sp:predicate rdf:type ; | ||
1249 | + sp:subject | ||
1250 | + [ sp:varName "productionReport"^^xsd:string | ||
1251 | + ] | ||
1252 | + ] [ sp:object | ||
1253 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
1254 | + ] ; | ||
1255 | + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
1256 | + sp:subject spin:_this | ||
1257 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
1258 | + sp:predicate rdf:type ; | ||
1259 | + sp:subject | ||
1260 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
1261 | + ] | ||
1262 | + ] [ sp:object | ||
1263 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
1264 | + ] ; | ||
1265 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1266 | + sp:subject | ||
1267 | + [ sp:varName "productVolumeReport"^^xsd:string | ||
1268 | + ] | ||
1269 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ; | ||
1270 | + sp:predicate rdf:type ; | ||
1271 | + sp:subject | ||
1272 | + [ sp:varName "productVolumeReport"^^xsd:string | ||
1273 | + ] | ||
1274 | + ] [ sp:object | ||
1275 | + [ sp:varName "productVolumeRef"^^xsd:string | ||
1276 | + ] ; | ||
1277 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
1278 | + sp:subject | ||
1279 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1280 | + ] | ||
1281 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
1282 | + sp:predicate rdf:type ; | ||
1283 | + sp:subject | ||
1284 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1285 | + ] | ||
1286 | + ] [ sp:object | ||
1287 | + [ sp:varName "productionFacilityToDate"^^xsd:string | ||
1288 | + ] ; | ||
1289 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
1290 | + sp:subject | ||
1291 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
1292 | + ] | ||
1293 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ; | ||
1294 | + sp:predicate rdf:type ; | ||
1295 | + sp:subject | ||
1296 | + [ sp:varName "productionFacilityToDate"^^xsd:string | ||
1297 | + ] | ||
1298 | + ]) | ||
1205 | ] . | 1299 | ] . |
1206 | 1300 | ||
1207 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> | 1301 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> | ... | ... |
... | @@ -20,7 +20,7 @@ | ... | @@ -20,7 +20,7 @@ |
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 name from productVolume/installation where the installation is a field"^^xsd:string ; | 23 | + rdfs:comment "STEP 10001m Create the ProductionReport - extract the report name from context/contextFacility"^^xsd:string ; |
24 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | 24 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
25 | sp:predicate rdf:type ; | 25 | sp:predicate rdf:type ; |
26 | sp:subject | 26 | sp:subject |
... | @@ -38,48 +38,36 @@ | ... | @@ -38,48 +38,36 @@ |
38 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | 38 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; |
39 | sp:subject spin:_this | 39 | sp:subject spin:_this |
40 | ] [ sp:object | 40 | ] [ sp:object |
41 | - [ sp:varName "productVolumeRef"^^xsd:string | 41 | + [ sp:varName "contextRef"^^xsd:string |
42 | ] ; | 42 | ] ; |
43 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 43 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
44 | sp:subject spin:_this | 44 | sp:subject spin:_this |
45 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | 45 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; |
46 | sp:predicate rdf:type ; | 46 | sp:predicate rdf:type ; |
47 | sp:subject | 47 | sp:subject |
48 | - [ sp:varName "productVolumeRef"^^xsd:string | 48 | + [ sp:varName "contextRef"^^xsd:string |
49 | - ] | ||
50 | - ] [ sp:object | ||
51 | - [ sp:varName "installationRef"^^xsd:string | ||
52 | - ] ; | ||
53 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | ||
54 | - sp:subject | ||
55 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
56 | - ] | ||
57 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | ||
58 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
59 | - sp:subject | ||
60 | - [ sp:varName "installationRef"^^xsd:string | ||
61 | ] | 49 | ] |
62 | ] [ sp:object | 50 | ] [ sp:object |
63 | - [ sp:varName "installationRef"^^xsd:string | 51 | + [ sp:varName "contextFacilityRef"^^xsd:string |
64 | ] ; | 52 | ] ; |
65 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 53 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; |
66 | sp:subject | 54 | sp:subject |
67 | - [ sp:varName "installation"^^xsd:string | 55 | + [ sp:varName "contextRef"^^xsd:string |
68 | ] | 56 | ] |
69 | ] [ rdf:type sp:Bind ; | 57 | ] [ rdf:type sp:Bind ; |
70 | sp:expression | 58 | sp:expression |
71 | [ rdf:type spl:object ; | 59 | [ rdf:type spl:object ; |
72 | - sp:arg1 [ sp:varName "installationRef"^^xsd:string | 60 | + sp:arg1 [ sp:varName "contextFacilityRef"^^xsd:string |
73 | ] ; | 61 | ] ; |
74 | sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> | 62 | sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> |
75 | ] ; | 63 | ] ; |
76 | sp:variable | 64 | sp:variable |
77 | - [ sp:varName "normalizedInstallationName"^^xsd:string | 65 | + [ sp:varName "normalizedContextFacilityName"^^xsd:string |
78 | ] | 66 | ] |
79 | ] [ rdf:type sp:Bind ; | 67 | ] [ rdf:type sp:Bind ; |
80 | sp:expression | 68 | sp:expression |
81 | [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; | 69 | [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; |
82 | - sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string | 70 | + sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string |
83 | ] ; | 71 | ] ; |
84 | sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string | 72 | sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string |
85 | ] | 73 | ] |
... | @@ -91,14 +79,14 @@ | ... | @@ -91,14 +79,14 @@ |
91 | ] ; | 79 | ] ; |
92 | spin:rule | 80 | spin:rule |
93 | [ rdf:type sp:Construct ; | 81 | [ rdf:type sp:Construct ; |
94 | - rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ; | 82 | + rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ; |
95 | sp:templates ([ sp:object | 83 | sp:templates ([ sp:object |
96 | [ sp:varName "intervalIdentifier"^^xsd:string | 84 | [ sp:varName "intervalIdentifier"^^xsd:string |
97 | ] ; | 85 | ] ; |
98 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | 86 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; |
99 | sp:subject spin:_this | 87 | sp:subject spin:_this |
100 | ] [ sp:object | 88 | ] [ sp:object |
101 | - [ sp:varName "dateStart"^^xsd:string | 89 | + [ sp:varName "date"^^xsd:string |
102 | ] ; | 90 | ] ; |
103 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; | 91 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; |
104 | sp:subject spin:_this | 92 | sp:subject spin:_this |
... | @@ -119,12 +107,21 @@ | ... | @@ -119,12 +107,21 @@ |
119 | [ sp:varName "contextRef"^^xsd:string | 107 | [ sp:varName "contextRef"^^xsd:string |
120 | ] | 108 | ] |
121 | ] [ sp:object | 109 | ] [ sp:object |
110 | + [ sp:varName "date"^^xsd:string | ||
111 | + ] ; | ||
112 | + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; | ||
113 | + sp:subject | ||
114 | + [ sp:varName "contextRef"^^xsd:string | ||
115 | + ] | ||
116 | + ] [ rdf:type sp:NotExists ; | ||
117 | + sp:elements ([ sp:object | ||
122 | [ sp:varName "dateStart"^^xsd:string | 118 | [ sp:varName "dateStart"^^xsd:string |
123 | ] ; | 119 | ] ; |
124 | sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 120 | sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
125 | sp:subject | 121 | sp:subject |
126 | [ sp:varName "contextRef"^^xsd:string | 122 | [ sp:varName "contextRef"^^xsd:string |
127 | ] | 123 | ] |
124 | + ]) | ||
128 | ] [ sp:object | 125 | ] [ sp:object |
129 | [ sp:varName "dateEnd"^^xsd:string | 126 | [ sp:varName "dateEnd"^^xsd:string |
130 | ] ; | 127 | ] ; |
... | @@ -135,7 +132,7 @@ | ... | @@ -135,7 +132,7 @@ |
135 | ] [ rdf:type sp:Bind ; | 132 | ] [ rdf:type sp:Bind ; |
136 | sp:expression | 133 | sp:expression |
137 | [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; | 134 | [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; |
138 | - sp:arg1 [ sp:varName "dateStart"^^xsd:string | 135 | + sp:arg1 [ sp:varName "date"^^xsd:string |
139 | ] ; | 136 | ] ; |
140 | sp:arg2 [ sp:varName "dateEnd"^^xsd:string | 137 | sp:arg2 [ sp:varName "dateEnd"^^xsd:string |
141 | ] | 138 | ] |
... | @@ -203,14 +200,22 @@ | ... | @@ -203,14 +200,22 @@ |
203 | ] ; | 200 | ] ; |
204 | spin:rule | 201 | spin:rule |
205 | [ rdf:type sp:Construct ; | 202 | [ rdf:type sp:Construct ; |
206 | - rdfs:comment "STEP 10010 Add the contextFacility"^^xsd:string ; | 203 | + rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ; |
207 | sp:templates ([ sp:object | 204 | sp:templates ([ sp:object |
208 | - [ sp:varName "contextFacility"^^xsd:string | 205 | + [ sp:varName "dateEnd"^^xsd:string |
209 | ] ; | 206 | ] ; |
210 | - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; | 207 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; |
211 | - sp:subject | 208 | + sp:subject spin:_this |
212 | - [ sp:varName "productionFacility"^^xsd:string | 209 | + ] [ sp:object |
213 | - ] | 210 | + [ sp:varName "dateEnd"^^xsd:string |
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 | ||
214 | ]) ; | 219 | ]) ; |
215 | sp:where ([ sp:object | 220 | sp:where ([ sp:object |
216 | [ sp:varName "contextRef"^^xsd:string | 221 | [ sp:varName "contextRef"^^xsd:string |
... | @@ -223,61 +228,49 @@ | ... | @@ -223,61 +228,49 @@ |
223 | [ sp:varName "contextRef"^^xsd:string | 228 | [ sp:varName "contextRef"^^xsd:string |
224 | ] | 229 | ] |
225 | ] [ sp:object | 230 | ] [ sp:object |
226 | - [ sp:varName "contectFacilityRef"^^xsd:string | 231 | + [ sp:varName "dateEnd"^^xsd:string |
227 | ] ; | 232 | ] ; |
228 | - sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; | 233 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
229 | sp:subject | 234 | sp:subject |
230 | [ sp:varName "contextRef"^^xsd:string | 235 | [ sp:varName "contextRef"^^xsd:string |
231 | ] | 236 | ] |
232 | - ] [ sp:object | 237 | + ] [ rdf:type sp:NotExists ; |
233 | - [ sp:varName "contextFacilityRef"^^xsd:string | 238 | + sp:elements ([ sp:object |
234 | - ] ; | 239 | + [ sp:varName "date"^^xsd:string |
235 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
236 | - sp:subject | ||
237 | - [ sp:varName "contextFacility"^^xsd:string | ||
238 | - ] | ||
239 | - ] [ sp:object spin:_this ; | ||
240 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
241 | - sp:subject | ||
242 | - [ sp:varName "productionReport"^^xsd:string | ||
243 | - ] | ||
244 | - ] [ sp:object | ||
245 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
246 | ] ; | 240 | ] ; |
247 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; | 241 | + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; |
248 | - sp:subject | ||
249 | - [ sp:varName "productionReport"^^xsd:string | ||
250 | - ] | ||
251 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
252 | - sp:predicate rdf:type ; | ||
253 | sp:subject | 242 | sp:subject |
254 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 243 | + [ sp:varName "contextRef"^^xsd:string |
255 | ] | 244 | ] |
256 | - ] [ sp:object | 245 | + ]) |
257 | - [ sp:varName "productionFacility"^^xsd:string | 246 | + ] [ rdf:type sp:NotExists ; |
247 | + sp:elements ([ sp:object | ||
248 | + [ sp:varName "dateStart"^^xsd:string | ||
258 | ] ; | 249 | ] ; |
259 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 250 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
260 | sp:subject | 251 | sp:subject |
261 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 252 | + [ sp:varName "contextRef"^^xsd:string |
262 | ] | 253 | ] |
263 | ]) | 254 | ]) |
255 | + ]) | ||
264 | ] ; | 256 | ] ; |
265 | spin:rule | 257 | spin:rule |
266 | [ rdf:type sp:Construct ; | 258 | [ rdf:type sp:Construct ; |
267 | - rdfs:comment "STEP 10020 Add the operator"^^xsd:string ; | 259 | + rdfs:comment "STEP 10001z Add the issue date and title"^^xsd:string ; |
268 | - sp:templates ([ sp:object _:b1 ; | 260 | + sp:templates ([ sp:object |
269 | - sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; | 261 | + [ sp:varName "month"^^xsd:string |
262 | + ] ; | ||
263 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ; | ||
270 | sp:subject | 264 | sp:subject |
271 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 265 | + [ sp:varName "productionReport"^^xsd:string |
272 | ] | 266 | ] |
273 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; | ||
274 | - sp:predicate rdf:type ; | ||
275 | - sp:subject _:b1 | ||
276 | ] [ sp:object | 267 | ] [ sp:object |
277 | - [ sp:varName "operator"^^xsd:string | 268 | + [ sp:varName "title"^^xsd:string |
278 | ] ; | 269 | ] ; |
279 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 270 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; |
280 | - sp:subject _:b1 | 271 | + sp:subject |
272 | + [ sp:varName "productionReport"^^xsd:string | ||
273 | + ] | ||
281 | ]) ; | 274 | ]) ; |
282 | sp:where ([ sp:object | 275 | sp:where ([ sp:object |
283 | [ sp:varName "contextRef"^^xsd:string | 276 | [ sp:varName "contextRef"^^xsd:string |
... | @@ -289,55 +282,59 @@ | ... | @@ -289,55 +282,59 @@ |
289 | sp:subject | 282 | sp:subject |
290 | [ sp:varName "contextRef"^^xsd:string | 283 | [ sp:varName "contextRef"^^xsd:string |
291 | ] | 284 | ] |
292 | - ] [ sp:object | 285 | + ] [ rdf:type sp:Optional ; |
293 | - [ sp:varName "operatorRef"^^xsd:string | 286 | + sp:elements ([ sp:object |
287 | + [ sp:varName "month"^^xsd:string | ||
294 | ] ; | 288 | ] ; |
295 | - sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ; | 289 | + sp:predicate <http://www.epim.no/schemas/mprml/1#month> ; |
290 | + sp:subject | ||
291 | + [ sp:varName "contextRef"^^xsd:string | ||
292 | + ] | ||
293 | + ]) | ||
294 | + ] [ rdf:type sp:Optional ; | ||
295 | + sp:elements ([ sp:object | ||
296 | + [ sp:varName "titleRef"^^xsd:string | ||
297 | + ] ; | ||
298 | + sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ; | ||
296 | sp:subject | 299 | sp:subject |
297 | [ sp:varName "contextRef"^^xsd:string | 300 | [ sp:varName "contextRef"^^xsd:string |
298 | ] | 301 | ] |
299 | ] [ sp:object | 302 | ] [ sp:object |
300 | - [ sp:varName "operatorRef"^^xsd:string | 303 | + [ sp:varName "title"^^xsd:string |
301 | ] ; | 304 | ] ; |
302 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 305 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
303 | sp:subject | 306 | sp:subject |
304 | - [ sp:varName "operator"^^xsd:string | 307 | + [ sp:varName "titleRef"^^xsd:string |
305 | ] | 308 | ] |
309 | + ]) | ||
306 | ] [ sp:object spin:_this ; | 310 | ] [ sp:object spin:_this ; |
307 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 311 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
308 | sp:subject | 312 | sp:subject |
309 | [ sp:varName "productionReport"^^xsd:string | 313 | [ sp:varName "productionReport"^^xsd:string |
310 | ] | 314 | ] |
311 | - ] [ sp:object | 315 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
312 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
313 | - ] ; | ||
314 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; | ||
315 | - sp:subject | ||
316 | - [ sp:varName "productionReport"^^xsd:string | ||
317 | - ] | ||
318 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
319 | sp:predicate rdf:type ; | 316 | sp:predicate rdf:type ; |
320 | sp:subject | 317 | sp:subject |
321 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 318 | + [ sp:varName "productionReport"^^xsd:string |
322 | ] | 319 | ] |
323 | ]) | 320 | ]) |
324 | ] ; | 321 | ] ; |
325 | spin:rule | 322 | spin:rule |
326 | [ rdf:type sp:Construct ; | 323 | [ rdf:type sp:Construct ; |
327 | - rdfs:comment "STEP 10001q Set the submitting installation"^^xsd:string ; | 324 | + rdfs:comment "STEP 10001r Set the submitting installation"^^xsd:string ; |
328 | - sp:templates ([ sp:object _:b2 ; | 325 | + sp:templates ([ sp:object _:b1 ; |
329 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; | 326 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; |
330 | sp:subject | 327 | sp:subject |
331 | [ sp:varName "productionReport"^^xsd:string | 328 | [ sp:varName "productionReport"^^xsd:string |
332 | ] | 329 | ] |
333 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | 330 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
334 | sp:predicate rdf:type ; | 331 | sp:predicate rdf:type ; |
335 | - sp:subject _:b2 | 332 | + sp:subject _:b1 |
336 | ] [ sp:object | 333 | ] [ sp:object |
337 | [ sp:varName "installation"^^xsd:string | 334 | [ sp:varName "installation"^^xsd:string |
338 | ] ; | 335 | ] ; |
339 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 336 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
340 | - sp:subject _:b2 | 337 | + sp:subject _:b1 |
341 | ]) ; | 338 | ]) ; |
342 | sp:where ([ sp:object | 339 | sp:where ([ sp:object |
343 | [ sp:varName "contextRef"^^xsd:string | 340 | [ sp:varName "contextRef"^^xsd:string |
... | @@ -349,6 +346,11 @@ | ... | @@ -349,6 +346,11 @@ |
349 | sp:subject | 346 | sp:subject |
350 | [ sp:varName "productionReport"^^xsd:string | 347 | [ sp:varName "productionReport"^^xsd:string |
351 | ] | 348 | ] |
349 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
350 | + sp:predicate rdf:type ; | ||
351 | + sp:subject | ||
352 | + [ sp:varName "productionReport"^^xsd:string | ||
353 | + ] | ||
352 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; | 354 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; |
353 | sp:predicate rdf:type ; | 355 | sp:predicate rdf:type ; |
354 | sp:subject | 356 | sp:subject |
... | @@ -372,78 +374,74 @@ | ... | @@ -372,78 +374,74 @@ |
372 | ] ; | 374 | ] ; |
373 | spin:rule | 375 | spin:rule |
374 | [ rdf:type sp:Construct ; | 376 | [ rdf:type sp:Construct ; |
375 | - rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ; | 377 | + rdfs:comment "STEP 10001n Create the ProductionReport - extract the report name from the reporting from the reporting installation"^^xsd:string ; |
376 | - sp:templates ([ sp:object | 378 | + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
377 | - [ sp:varName "dateEnd"^^xsd:string | 379 | + sp:predicate rdf:type ; |
380 | + sp:subject | ||
381 | + [ sp:varName "productionReport"^^xsd:string | ||
382 | + ] | ||
383 | + ] [ sp:object spin:_this ; | ||
384 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
385 | + sp:subject | ||
386 | + [ sp:varName "productionReport"^^xsd:string | ||
387 | + ] | ||
388 | + ]) ; | ||
389 | + sp:where ([ sp:object | ||
390 | + [ sp:varName "intervalIdentifier"^^xsd:string | ||
378 | ] ; | 391 | ] ; |
379 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | 392 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; |
380 | sp:subject spin:_this | 393 | sp:subject spin:_this |
381 | ] [ sp:object | 394 | ] [ sp:object |
382 | - [ sp:varName "dateEnd"^^xsd:string | ||
383 | - ] ; | ||
384 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; | ||
385 | - sp:subject spin:_this | ||
386 | - ] [ sp:object | ||
387 | - [ sp:varName "dateEnd"^^xsd:string | ||
388 | - ] ; | ||
389 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; | ||
390 | - sp:subject spin:_this | ||
391 | - ]) ; | ||
392 | - sp:where ([ sp:object | ||
393 | [ sp:varName "contextRef"^^xsd:string | 395 | [ sp:varName "contextRef"^^xsd:string |
394 | ] ; | 396 | ] ; |
395 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | 397 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
396 | sp:subject spin:_this | 398 | sp:subject spin:_this |
397 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; | ||
398 | - sp:predicate rdf:type ; | ||
399 | - sp:subject | ||
400 | - [ sp:varName "contextRef"^^xsd:string | ||
401 | - ] | ||
402 | ] [ sp:object | 399 | ] [ sp:object |
403 | - [ sp:varName "dateEnd"^^xsd:string | 400 | + [ sp:varName "installationRef"^^xsd:string |
404 | ] ; | 401 | ] ; |
405 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 402 | + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
406 | sp:subject | 403 | sp:subject |
407 | [ sp:varName "contextRef"^^xsd:string | 404 | [ sp:varName "contextRef"^^xsd:string |
408 | ] | 405 | ] |
409 | - ] [ rdf:type sp:NotExists ; | 406 | + ] [ rdf:type sp:Bind ; |
410 | - sp:elements ([ sp:object | 407 | + sp:expression |
411 | - [ sp:varName "date"^^xsd:string | 408 | + [ rdf:type spl:object ; |
409 | + sp:arg1 [ sp:varName "installationRef"^^xsd:string | ||
412 | ] ; | 410 | ] ; |
413 | - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; | 411 | + sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> |
414 | - sp:subject | 412 | + ] ; |
415 | - [ sp:varName "contextRef"^^xsd:string | 413 | + sp:variable |
414 | + [ sp:varName "normalizedInstallationName"^^xsd:string | ||
416 | ] | 415 | ] |
417 | - ]) | 416 | + ] [ rdf:type sp:Bind ; |
418 | - ] [ rdf:type sp:NotExists ; | 417 | + sp:expression |
419 | - sp:elements ([ sp:object | 418 | + [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; |
420 | - [ sp:varName "dateStart"^^xsd:string | 419 | + sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string |
421 | ] ; | 420 | ] ; |
422 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 421 | + sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string |
423 | - sp:subject | 422 | + ] |
424 | - [ sp:varName "contextRef"^^xsd:string | 423 | + ] ; |
424 | + sp:variable | ||
425 | + [ sp:varName "productionReport"^^xsd:string | ||
425 | ] | 426 | ] |
426 | - ]) | ||
427 | ]) | 427 | ]) |
428 | ] ; | 428 | ] ; |
429 | spin:rule | 429 | spin:rule |
430 | [ rdf:type sp:Construct ; | 430 | [ rdf:type sp:Construct ; |
431 | - rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ; | 431 | + rdfs:comment "STEP 10020 Add the operator"^^xsd:string ; |
432 | - sp:templates ([ sp:object | 432 | + sp:templates ([ sp:object _:b2 ; |
433 | - [ sp:varName "intervalIdentifier"^^xsd:string | 433 | + sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; |
434 | - ] ; | 434 | + sp:subject |
435 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | 435 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
436 | - sp:subject spin:_this | 436 | + ] |
437 | - ] [ sp:object | 437 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; |
438 | - [ sp:varName "date"^^xsd:string | 438 | + sp:predicate rdf:type ; |
439 | - ] ; | 439 | + sp:subject _:b2 |
440 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; | ||
441 | - sp:subject spin:_this | ||
442 | ] [ sp:object | 440 | ] [ sp:object |
443 | - [ sp:varName "dateEnd"^^xsd:string | 441 | + [ sp:varName "operator"^^xsd:string |
444 | ] ; | 442 | ] ; |
445 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; | 443 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
446 | - sp:subject spin:_this | 444 | + sp:subject _:b2 |
447 | ]) ; | 445 | ]) ; |
448 | sp:where ([ sp:object | 446 | sp:where ([ sp:object |
449 | [ sp:varName "contextRef"^^xsd:string | 447 | [ sp:varName "contextRef"^^xsd:string |
... | @@ -456,58 +454,49 @@ | ... | @@ -456,58 +454,49 @@ |
456 | [ sp:varName "contextRef"^^xsd:string | 454 | [ sp:varName "contextRef"^^xsd:string |
457 | ] | 455 | ] |
458 | ] [ sp:object | 456 | ] [ sp:object |
459 | - [ sp:varName "date"^^xsd:string | 457 | + [ sp:varName "operatorRef"^^xsd:string |
460 | - ] ; | ||
461 | - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; | ||
462 | - sp:subject | ||
463 | - [ sp:varName "contextRef"^^xsd:string | ||
464 | - ] | ||
465 | - ] [ rdf:type sp:NotExists ; | ||
466 | - sp:elements ([ sp:object | ||
467 | - [ sp:varName "dateStart"^^xsd:string | ||
468 | ] ; | 458 | ] ; |
469 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 459 | + sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ; |
470 | sp:subject | 460 | sp:subject |
471 | [ sp:varName "contextRef"^^xsd:string | 461 | [ sp:varName "contextRef"^^xsd:string |
472 | ] | 462 | ] |
473 | - ]) | ||
474 | ] [ sp:object | 463 | ] [ sp:object |
475 | - [ sp:varName "dateEnd"^^xsd:string | 464 | + [ sp:varName "operatorRef"^^xsd:string |
476 | ] ; | 465 | ] ; |
477 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 466 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
478 | sp:subject | 467 | sp:subject |
479 | - [ sp:varName "contextRef"^^xsd:string | 468 | + [ sp:varName "operator"^^xsd:string |
480 | - ] | ||
481 | - ] [ rdf:type sp:Bind ; | ||
482 | - sp:expression | ||
483 | - [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; | ||
484 | - sp:arg1 [ sp:varName "date"^^xsd:string | ||
485 | - ] ; | ||
486 | - sp:arg2 [ sp:varName "dateEnd"^^xsd:string | ||
487 | ] | 469 | ] |
488 | - ] ; | 470 | + ] [ sp:object spin:_this ; |
489 | - sp:variable | 471 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
490 | - [ sp:varName "intervalIdentifier"^^xsd:string | 472 | + sp:subject |
473 | + [ sp:varName "productionReport"^^xsd:string | ||
491 | ] | 474 | ] |
492 | - ]) | 475 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
493 | - ] ; | 476 | + sp:predicate rdf:type ; |
494 | - spin:rule | ||
495 | - [ rdf:type sp:Construct ; | ||
496 | - rdfs:comment "STEP 10001z Add the issue date and title"^^xsd:string ; | ||
497 | - sp:templates ([ sp:object | ||
498 | - [ sp:varName "month"^^xsd:string | ||
499 | - ] ; | ||
500 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ; | ||
501 | sp:subject | 477 | sp:subject |
502 | [ sp:varName "productionReport"^^xsd:string | 478 | [ sp:varName "productionReport"^^xsd:string |
503 | ] | 479 | ] |
504 | ] [ sp:object | 480 | ] [ sp:object |
505 | - [ sp:varName "title"^^xsd:string | 481 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
506 | ] ; | 482 | ] ; |
507 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | 483 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; |
508 | sp:subject | 484 | sp:subject |
509 | [ sp:varName "productionReport"^^xsd:string | 485 | [ sp:varName "productionReport"^^xsd:string |
510 | ] | 486 | ] |
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 | + ] ; | ||
494 | + spin:rule | ||
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 | ||
511 | ]) ; | 500 | ]) ; |
512 | sp:where ([ sp:object | 501 | sp:where ([ sp:object |
513 | [ sp:varName "contextRef"^^xsd:string | 502 | [ sp:varName "contextRef"^^xsd:string |
... | @@ -519,123 +508,100 @@ | ... | @@ -519,123 +508,100 @@ |
519 | sp:subject | 508 | sp:subject |
520 | [ sp:varName "contextRef"^^xsd:string | 509 | [ sp:varName "contextRef"^^xsd:string |
521 | ] | 510 | ] |
522 | - ] [ rdf:type sp:Optional ; | 511 | + ] [ rdf:type sp:NotExists ; |
523 | sp:elements ([ sp:object | 512 | sp:elements ([ sp:object |
524 | - [ sp:varName "month"^^xsd:string | 513 | + [ sp:varName "dateEnd"^^xsd:string |
525 | ] ; | 514 | ] ; |
526 | - sp:predicate <http://www.epim.no/schemas/mprml/1#month> ; | 515 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
527 | sp:subject | 516 | sp:subject |
528 | [ sp:varName "contextRef"^^xsd:string | 517 | [ sp:varName "contextRef"^^xsd:string |
529 | ] | 518 | ] |
530 | ]) | 519 | ]) |
531 | - ] [ rdf:type sp:Optional ; | 520 | + ] [ rdf:type sp:NotExists ; |
532 | sp:elements ([ sp:object | 521 | sp:elements ([ sp:object |
533 | - [ sp:varName "titleRef"^^xsd:string | 522 | + [ sp:varName "date"^^xsd:string |
534 | ] ; | 523 | ] ; |
535 | - sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ; | 524 | + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; |
536 | sp:subject | 525 | sp:subject |
537 | [ sp:varName "contextRef"^^xsd:string | 526 | [ sp:varName "contextRef"^^xsd:string |
538 | ] | 527 | ] |
539 | - ] [ sp:object | 528 | + ]) |
540 | - [ sp:varName "title"^^xsd:string | 529 | + ] [ rdf:type sp:NotExists ; |
530 | + sp:elements ([ sp:object | ||
531 | + [ sp:varName "dateStart"^^xsd:string | ||
541 | ] ; | 532 | ] ; |
542 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 533 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
543 | sp:subject | 534 | sp:subject |
544 | - [ sp:varName "titleRef"^^xsd:string | 535 | + [ sp:varName "contextRef"^^xsd:string |
545 | ] | 536 | ] |
546 | ]) | 537 | ]) |
547 | - ] [ sp:object spin:_this ; | ||
548 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
549 | - sp:subject | ||
550 | - [ sp:varName "productionReport"^^xsd:string | ||
551 | - ] | ||
552 | ]) | 538 | ]) |
553 | ] ; | 539 | ] ; |
554 | spin:rule | 540 | spin:rule |
555 | [ rdf:type sp:Construct ; | 541 | [ rdf:type sp:Construct ; |
556 | - rdfs:comment "STEP 10001o Create the ProductionReport - unable to find a name"^^xsd:string ; | 542 | + rdfs:comment "STEP 10001o Set the default production facility from context/contextFacility"^^xsd:string ; |
557 | - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | 543 | + sp:templates ([ sp:object spin:_this ; |
558 | - sp:predicate rdf:type ; | ||
559 | - sp:subject | ||
560 | - [ sp:varName "productionReport"^^xsd:string | ||
561 | - ] | ||
562 | - ] [ sp:object spin:_this ; | ||
563 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 544 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
564 | sp:subject | 545 | sp:subject |
565 | - [ sp:varName "productionReport"^^xsd:string | 546 | + [ sp:varName "productionFacility"^^xsd:string |
566 | ] | 547 | ] |
567 | - ]) ; | 548 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ; |
568 | - sp:where ([ sp:object | ||
569 | - [ sp:varName "intervalIdentifier"^^xsd:string | ||
570 | - ] ; | ||
571 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | ||
572 | - sp:subject spin:_this | ||
573 | - ] [ rdf:type sp:NotExists ; | ||
574 | - sp:elements ([ sp:object | ||
575 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
576 | - ] ; | ||
577 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
578 | - sp:subject spin:_this | ||
579 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
580 | sp:predicate rdf:type ; | 549 | sp:predicate rdf:type ; |
581 | sp:subject | 550 | sp:subject |
582 | - [ sp:varName "productVolumeRef"^^xsd:string | 551 | + [ sp:varName "productionFacility"^^xsd:string |
583 | ] | 552 | ] |
584 | ] [ sp:object | 553 | ] [ sp:object |
585 | - [ sp:varName "installationRef"^^xsd:string | 554 | + [ sp:varName "normalizedProductionFacilityName"^^xsd:string |
586 | ] ; | 555 | ] ; |
587 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 556 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ; |
588 | - sp:subject | 557 | + sp:subject spin:_this |
589 | - [ sp:varName "productVolumeRef"^^xsd:string | 558 | + ]) ; |
590 | - ] | 559 | + sp:where ([ sp:object |
591 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | 560 | + [ sp:varName "contextRef"^^xsd:string |
592 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
593 | - sp:subject | ||
594 | - [ sp:varName "installationRef"^^xsd:string | ||
595 | - ] | ||
596 | - ]) | ||
597 | - ] [ rdf:type sp:NotExists ; | ||
598 | - sp:elements ([ sp:object | ||
599 | - [ sp:varName "productionOperationRef"^^xsd:string | ||
600 | ] ; | 561 | ] ; |
601 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 562 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
602 | sp:subject spin:_this | 563 | sp:subject spin:_this |
603 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ; | 564 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; |
604 | sp:predicate rdf:type ; | 565 | sp:predicate rdf:type ; |
605 | sp:subject | 566 | sp:subject |
606 | - [ sp:varName "productionOperationRef"^^xsd:string | 567 | + [ sp:varName "contextRef"^^xsd:string |
607 | ] | 568 | ] |
608 | ] [ sp:object | 569 | ] [ sp:object |
609 | - [ sp:varName "installationRefx"^^xsd:string | 570 | + [ sp:varName "contextFacilityRef"^^xsd:string |
610 | ] ; | 571 | ] ; |
611 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 572 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; |
612 | sp:subject | 573 | sp:subject |
613 | - [ sp:varName "productionOperationRef"^^xsd:string | 574 | + [ sp:varName "contextRef"^^xsd:string |
614 | ] | 575 | ] |
615 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | 576 | + ] [ sp:object |
616 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 577 | + [ sp:varName "contextFacilityRef"^^xsd:string |
578 | + ] ; | ||
579 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | ||
617 | sp:subject | 580 | sp:subject |
618 | - [ sp:varName "installationRefx"^^xsd:string | 581 | + [ sp:varName "productionFacility"^^xsd:string |
619 | ] | 582 | ] |
620 | - ]) | ||
621 | ] [ rdf:type sp:Bind ; | 583 | ] [ rdf:type sp:Bind ; |
622 | sp:expression | 584 | sp:expression |
623 | - [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; | 585 | + [ rdf:type spl:object ; |
624 | - sp:arg1 "installation-not-specified" ; | 586 | + sp:arg1 [ sp:varName "contextFacilityRef"^^xsd:string |
625 | - sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string | 587 | + ] ; |
626 | - ] | 588 | + sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> |
627 | ] ; | 589 | ] ; |
628 | sp:variable | 590 | sp:variable |
629 | - [ sp:varName "productionReport"^^xsd:string | 591 | + [ sp:varName "normalizedProductionFacilityName"^^xsd:string |
630 | ] | 592 | ] |
631 | ]) | 593 | ]) |
632 | ] ; | 594 | ] ; |
633 | spin:rule | 595 | spin:rule |
634 | [ rdf:type sp:Construct ; | 596 | [ rdf:type sp:Construct ; |
635 | - rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ; | 597 | + rdfs:comment "STEP 10010 Add the contextFacility - unless the contextFacility is the production facility"^^xsd:string ; |
636 | - sp:templates ([ sp:object "noDate" ; | 598 | + sp:templates ([ sp:object |
637 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | 599 | + [ sp:varName "contextFacility"^^xsd:string |
638 | - sp:subject spin:_this | 600 | + ] ; |
601 | + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; | ||
602 | + sp:subject | ||
603 | + [ sp:varName "productionFacility"^^xsd:string | ||
604 | + ] | ||
639 | ]) ; | 605 | ]) ; |
640 | sp:where ([ sp:object | 606 | sp:where ([ sp:object |
641 | [ sp:varName "contextRef"^^xsd:string | 607 | [ sp:varName "contextRef"^^xsd:string |
... | @@ -647,119 +613,117 @@ | ... | @@ -647,119 +613,117 @@ |
647 | sp:subject | 613 | sp:subject |
648 | [ sp:varName "contextRef"^^xsd:string | 614 | [ sp:varName "contextRef"^^xsd:string |
649 | ] | 615 | ] |
650 | - ] [ rdf:type sp:NotExists ; | 616 | + ] [ sp:object |
651 | - sp:elements ([ sp:object | 617 | + [ sp:varName "contextFacilityRef"^^xsd:string |
652 | - [ sp:varName "dateEnd"^^xsd:string | ||
653 | ] ; | 618 | ] ; |
654 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 619 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; |
655 | sp:subject | 620 | sp:subject |
656 | [ sp:varName "contextRef"^^xsd:string | 621 | [ sp:varName "contextRef"^^xsd:string |
657 | ] | 622 | ] |
658 | - ]) | 623 | + ] [ sp:object |
659 | - ] [ rdf:type sp:NotExists ; | 624 | + [ sp:varName "contextFacilityRef"^^xsd:string |
660 | - sp:elements ([ sp:object | ||
661 | - [ sp:varName "date"^^xsd:string | ||
662 | ] ; | 625 | ] ; |
663 | - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; | 626 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
664 | sp:subject | 627 | sp:subject |
665 | - [ sp:varName "contextRef"^^xsd:string | 628 | + [ sp:varName "contextFacility"^^xsd:string |
666 | ] | 629 | ] |
667 | - ]) | ||
668 | ] [ rdf:type sp:NotExists ; | 630 | ] [ rdf:type sp:NotExists ; |
669 | - sp:elements ([ sp:object | 631 | + sp:elements ([ sp:object spin:_this ; |
670 | - [ sp:varName "dateStart"^^xsd:string | 632 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
671 | - ] ; | ||
672 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | ||
673 | sp:subject | 633 | sp:subject |
674 | - [ sp:varName "contextRef"^^xsd:string | 634 | + [ sp:varName "contextFacility"^^xsd:string |
675 | ] | 635 | ] |
676 | ]) | 636 | ]) |
677 | - ]) | 637 | + ] [ sp:object spin:_this ; |
678 | - ] ; | 638 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
679 | - spin:rule | ||
680 | - [ rdf:type sp:Construct ; | ||
681 | - rdfs:comment "STEP 10001p Create the ProductionReport - check that different installations are not specified"^^xsd:string ; | ||
682 | - sp:templates ([ sp:object "Error - different installations specified for different parts of the same report" ; | ||
683 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | ||
684 | sp:subject | 639 | sp:subject |
685 | [ sp:varName "productionReport"^^xsd:string | 640 | [ sp:varName "productionReport"^^xsd:string |
686 | ] | 641 | ] |
687 | - ]) ; | 642 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
688 | - sp:where ([ sp:object | ||
689 | - [ sp:varName "intervalIdentifier"^^xsd:string | ||
690 | - ] ; | ||
691 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | ||
692 | - sp:subject spin:_this | ||
693 | - ] [ sp:object | ||
694 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
695 | - ] ; | ||
696 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
697 | - sp:subject spin:_this | ||
698 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
699 | sp:predicate rdf:type ; | 643 | sp:predicate rdf:type ; |
700 | sp:subject | 644 | sp:subject |
701 | - [ sp:varName "productVolumeRef"^^xsd:string | 645 | + [ sp:varName "productionReport"^^xsd:string |
702 | ] | 646 | ] |
703 | ] [ sp:object | 647 | ] [ sp:object |
704 | - [ sp:varName "installationRef"^^xsd:string | 648 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
705 | ] ; | 649 | ] ; |
706 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 650 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ; |
707 | sp:subject | 651 | sp:subject |
708 | - [ sp:varName "productVolumeRef"^^xsd:string | 652 | + [ sp:varName "productionReport"^^xsd:string |
709 | ] | 653 | ] |
710 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | 654 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
711 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 655 | + sp:predicate rdf:type ; |
712 | sp:subject | 656 | sp:subject |
713 | - [ sp:varName "installationRef"^^xsd:string | 657 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
714 | ] | 658 | ] |
715 | ] [ sp:object | 659 | ] [ sp:object |
716 | - [ sp:varName "productionOperationRef"^^xsd:string | 660 | + [ sp:varName "productionFacility"^^xsd:string |
717 | ] ; | 661 | ] ; |
718 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 662 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
719 | - sp:subject spin:_this | ||
720 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ; | ||
721 | - sp:predicate rdf:type ; | ||
722 | sp:subject | 663 | sp:subject |
723 | - [ sp:varName "productionOperationRef"^^xsd:string | 664 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
724 | ] | 665 | ] |
666 | + ]) | ||
667 | + ] ; | ||
668 | + spin:rule | ||
669 | + [ rdf:type sp:Construct ; | ||
670 | + rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ; | ||
671 | + sp:templates ([ sp:object | ||
672 | + [ sp:varName "intervalIdentifier"^^xsd:string | ||
673 | + ] ; | ||
674 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | ||
675 | + sp:subject spin:_this | ||
725 | ] [ sp:object | 676 | ] [ sp:object |
726 | - [ sp:varName "installationRefx"^^xsd:string | 677 | + [ sp:varName "dateStart"^^xsd:string |
727 | ] ; | 678 | ] ; |
728 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 679 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ; |
729 | - sp:subject | 680 | + sp:subject spin:_this |
730 | - [ sp:varName "productionOperationRef"^^xsd:string | 681 | + ] [ sp:object |
731 | - ] | 682 | + [ sp:varName "dateEnd"^^xsd:string |
732 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | 683 | + ] ; |
733 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 684 | + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ; |
685 | + sp:subject spin:_this | ||
686 | + ]) ; | ||
687 | + sp:where ([ sp:object | ||
688 | + [ sp:varName "contextRef"^^xsd:string | ||
689 | + ] ; | ||
690 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | ||
691 | + sp:subject spin:_this | ||
692 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; | ||
693 | + sp:predicate rdf:type ; | ||
734 | sp:subject | 694 | sp:subject |
735 | - [ sp:varName "installationRefx"^^xsd:string | 695 | + [ sp:varName "contextRef"^^xsd:string |
736 | ] | 696 | ] |
737 | - ] [ rdf:type sp:NotExists ; | 697 | + ] [ sp:object |
738 | - sp:elements ([ sp:object | 698 | + [ sp:varName "dateStart"^^xsd:string |
739 | - [ sp:varName "installationRef"^^xsd:string | ||
740 | ] ; | 699 | ] ; |
741 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 700 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
742 | sp:subject | 701 | sp:subject |
743 | - [ sp:varName "installation"^^xsd:string | 702 | + [ sp:varName "contextRef"^^xsd:string |
744 | ] | 703 | ] |
745 | ] [ sp:object | 704 | ] [ sp:object |
746 | - [ sp:varName "installationRefx"^^xsd:string | 705 | + [ sp:varName "dateEnd"^^xsd:string |
747 | ] ; | 706 | ] ; |
748 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 707 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
749 | sp:subject | 708 | sp:subject |
750 | - [ sp:varName "installation"^^xsd:string | 709 | + [ sp:varName "contextRef"^^xsd:string |
751 | ] | 710 | ] |
752 | - ]) | 711 | + ] [ rdf:type sp:Bind ; |
753 | - ] [ sp:object spin:_this ; | 712 | + sp:expression |
754 | - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 713 | + [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; |
755 | - sp:subject | 714 | + sp:arg1 [ sp:varName "dateStart"^^xsd:string |
756 | - [ sp:varName "productionReport"^^xsd:string | 715 | + ] ; |
716 | + sp:arg2 [ sp:varName "dateEnd"^^xsd:string | ||
717 | + ] | ||
718 | + ] ; | ||
719 | + sp:variable | ||
720 | + [ sp:varName "intervalIdentifier"^^xsd:string | ||
757 | ] | 721 | ] |
758 | ]) | 722 | ]) |
759 | ] ; | 723 | ] ; |
760 | spin:rule | 724 | spin:rule |
761 | [ rdf:type sp:Construct ; | 725 | [ rdf:type sp:Construct ; |
762 | - rdfs:comment "STEP 10001n Create the ProductionReport - extract the name from productionOperation/installation where the installation is a field"^^xsd:string ; | 726 | + rdfs:comment "STEP 10001p Create the ProductionReport - unable to find an identifier"^^xsd:string ; |
763 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | 727 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
764 | sp:predicate rdf:type ; | 728 | sp:predicate rdf:type ; |
765 | sp:subject | 729 | sp:subject |
... | @@ -776,74 +740,50 @@ | ... | @@ -776,74 +740,50 @@ |
776 | ] ; | 740 | ] ; |
777 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; | 741 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ; |
778 | sp:subject spin:_this | 742 | sp:subject spin:_this |
779 | - ] [ sp:object | 743 | + ] [ rdf:type sp:NotExists ; |
780 | - [ sp:varName "productionOperationRef"^^xsd:string | 744 | + sp:elements ([ sp:object |
745 | + [ sp:varName "contextRef"^^xsd:string | ||
781 | ] ; | 746 | ] ; |
782 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 747 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
783 | sp:subject spin:_this | 748 | sp:subject spin:_this |
784 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ; | 749 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; |
785 | sp:predicate rdf:type ; | 750 | sp:predicate rdf:type ; |
786 | sp:subject | 751 | sp:subject |
787 | - [ sp:varName "productionOperationRef"^^xsd:string | 752 | + [ sp:varName "contextRef"^^xsd:string |
788 | ] | 753 | ] |
789 | ] [ sp:object | 754 | ] [ sp:object |
790 | - [ sp:varName "installationRef"^^xsd:string | 755 | + [ sp:varName "contextFacilityRef"^^xsd:string |
791 | ] ; | 756 | ] ; |
792 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 757 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; |
793 | sp:subject | 758 | sp:subject |
794 | - [ sp:varName "productionOperationRef"^^xsd:string | 759 | + [ sp:varName "contextRef"^^xsd:string |
795 | ] | 760 | ] |
796 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | 761 | ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; |
797 | sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | 762 | sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; |
798 | sp:subject | 763 | sp:subject |
799 | - [ sp:varName "installationRef"^^xsd:string | 764 | + [ sp:varName "contextFacilityRef"^^xsd:string |
800 | ] | 765 | ] |
766 | + ]) | ||
801 | ] [ rdf:type sp:NotExists ; | 767 | ] [ rdf:type sp:NotExists ; |
802 | sp:elements ([ sp:object | 768 | sp:elements ([ sp:object |
803 | - [ sp:varName "productVolumeRef"^^xsd:string | 769 | + [ sp:varName "installationRef"^^xsd:string |
804 | - ] ; | ||
805 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
806 | - sp:subject spin:_this | ||
807 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
808 | - sp:predicate rdf:type ; | ||
809 | - sp:subject | ||
810 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
811 | - ] | ||
812 | - ] [ sp:object | ||
813 | - [ sp:varName "installationRefx"^^xsd:string | ||
814 | ] ; | 770 | ] ; |
815 | sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 771 | sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
816 | sp:subject | 772 | sp:subject |
817 | - [ sp:varName "productVolumeRef"^^xsd:string | 773 | + [ sp:varName "contextRef"^^xsd:string |
818 | - ] | ||
819 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ; | ||
820 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ; | ||
821 | - sp:subject | ||
822 | - [ sp:varName "installationRefx"^^xsd:string | ||
823 | ] | 774 | ] |
824 | - ]) | ||
825 | ] [ sp:object | 775 | ] [ sp:object |
826 | [ sp:varName "installationRef"^^xsd:string | 776 | [ sp:varName "installationRef"^^xsd:string |
827 | ] ; | 777 | ] ; |
828 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; | 778 | sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; |
829 | sp:subject | 779 | sp:subject |
830 | - [ sp:varName "installation"^^xsd:string | 780 | + [ sp:varName "reportingFacility"^^xsd:string |
831 | - ] | ||
832 | - ] [ rdf:type sp:Bind ; | ||
833 | - sp:expression | ||
834 | - [ rdf:type spl:object ; | ||
835 | - sp:arg1 [ sp:varName "installationRef"^^xsd:string | ||
836 | - ] ; | ||
837 | - sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> | ||
838 | - ] ; | ||
839 | - sp:variable | ||
840 | - [ sp:varName "normalizedInstallationName"^^xsd:string | ||
841 | ] | 781 | ] |
782 | + ]) | ||
842 | ] [ rdf:type sp:Bind ; | 783 | ] [ rdf:type sp:Bind ; |
843 | sp:expression | 784 | sp:expression |
844 | [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; | 785 | [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; |
845 | - sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string | 786 | + sp:arg1 "" ; |
846 | - ] ; | ||
847 | sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string | 787 | sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string |
848 | ] | 788 | ] |
849 | ] ; | 789 | ] ; |
... | @@ -855,5 +795,5 @@ | ... | @@ -855,5 +795,5 @@ |
855 | 795 | ||
856 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> | 796 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> |
857 | rdf:type owl:Ontology ; | 797 | rdf:type owl:Ontology ; |
858 | - 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> ; | 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> ; |
859 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | 799 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | ... | ... |
-
Please register or login to post a comment