Removed report Kind was always Copex and improved report header with month and title.
Showing
2 changed files
with
330 additions
and
370 deletions
| ... | @@ -19,42 +19,16 @@ | ... | @@ -19,42 +19,16 @@ |
| 19 | <http://www.epim.no/schemas/mprml/1#A_Global-Objects> | 19 | <http://www.epim.no/schemas/mprml/1#A_Global-Objects> |
| 20 | spin:rule | 20 | spin:rule |
| 21 | [ rdf:type sp:Construct ; | 21 | [ rdf:type sp:Construct ; |
| 22 | - rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ; | 22 | + rdfs:comment "STEP 10010 Add the contextFacility"^^xsd:string ; |
| 23 | - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | 23 | + sp:templates ([ sp:object |
| 24 | - sp:predicate rdf:type ; | 24 | + [ sp:varName "contextFacility"^^xsd:string |
| 25 | - sp:subject | ||
| 26 | - [ sp:varName "productionReport"^^xsd:string | ||
| 27 | - ] | ||
| 28 | - ] [ sp:object _:b1 ; | ||
| 29 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | ||
| 30 | - sp:subject | ||
| 31 | - [ sp:varName "productionReport"^^xsd:string | ||
| 32 | - ] | ||
| 33 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
| 34 | - sp:predicate rdf:type ; | ||
| 35 | - sp:subject _:b1 | ||
| 36 | - ] [ sp:object | ||
| 37 | - [ sp:varName "installation"^^xsd:string | ||
| 38 | ] ; | 25 | ] ; |
| 39 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 26 | + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; |
| 40 | - sp:subject _:b1 | ||
| 41 | - ] [ sp:object spin:_this ; | ||
| 42 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 43 | sp:subject | 27 | sp:subject |
| 44 | - [ sp:varName "productionReport"^^xsd:string | 28 | + [ sp:varName "productionFacility"^^xsd:string |
| 45 | ] | 29 | ] |
| 46 | - ] [ sp:object | ||
| 47 | - [ sp:varName "contextRef"^^xsd:string | ||
| 48 | - ] ; | ||
| 49 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 50 | - sp:subject _:b1 | ||
| 51 | ]) ; | 30 | ]) ; |
| 52 | sp:where ([ sp:object | 31 | sp:where ([ sp:object |
| 53 | - [ sp:varName "intervalIdentifier"^^xsd:string | ||
| 54 | - ] ; | ||
| 55 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | ||
| 56 | - sp:subject spin:_this | ||
| 57 | - ] [ sp:object | ||
| 58 | [ sp:varName "contextRef"^^xsd:string | 32 | [ sp:varName "contextRef"^^xsd:string |
| 59 | ] ; | 33 | ] ; |
| 60 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | 34 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
| ... | @@ -65,58 +39,53 @@ | ... | @@ -65,58 +39,53 @@ |
| 65 | [ sp:varName "contextRef"^^xsd:string | 39 | [ sp:varName "contextRef"^^xsd:string |
| 66 | ] | 40 | ] |
| 67 | ] [ sp:object | 41 | ] [ sp:object |
| 68 | - [ sp:varName "installationRef"^^xsd:string | 42 | + [ sp:varName "contectFacilityRef"^^xsd:string |
| 69 | ] ; | 43 | ] ; |
| 70 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 44 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; |
| 71 | sp:subject | 45 | sp:subject |
| 72 | [ sp:varName "contextRef"^^xsd:string | 46 | [ sp:varName "contextRef"^^xsd:string |
| 73 | ] | 47 | ] |
| 74 | ] [ sp:object | 48 | ] [ sp:object |
| 75 | - [ sp:varName "installationRef"^^xsd:string | 49 | + [ sp:varName "contextFacilityRef"^^xsd:string |
| 76 | ] ; | 50 | ] ; |
| 77 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | 51 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 78 | sp:subject | 52 | sp:subject |
| 79 | - [ sp:varName "installation"^^xsd:string | 53 | + [ sp:varName "contextFacility"^^xsd:string |
| 80 | - ] | ||
| 81 | - ] [ rdf:type sp:Bind ; | ||
| 82 | - sp:expression | ||
| 83 | - [ rdf:type spl:object ; | ||
| 84 | - sp:arg1 [ sp:varName "installationRef"^^xsd:string | ||
| 85 | - ] ; | ||
| 86 | - sp:arg2 rdfs:label | ||
| 87 | - ] ; | ||
| 88 | - sp:variable | ||
| 89 | - [ sp:varName "normalizedInstallationName"^^xsd:string | ||
| 90 | ] | 54 | ] |
| 91 | - ] [ rdf:type sp:Bind ; | 55 | + ] [ sp:object spin:_this ; |
| 92 | - sp:expression | 56 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 93 | - [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; | 57 | + sp:subject |
| 94 | - sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string | 58 | + [ sp:varName "productionReport"^^xsd:string |
| 95 | - ] ; | ||
| 96 | - sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string | ||
| 97 | ] | 59 | ] |
| 60 | + ] [ sp:object | ||
| 61 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
| 98 | ] ; | 62 | ] ; |
| 99 | - sp:variable | 63 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; |
| 64 | + sp:subject | ||
| 100 | [ sp:varName "productionReport"^^xsd:string | 65 | [ sp:varName "productionReport"^^xsd:string |
| 101 | ] | 66 | ] |
| 102 | - ]) | 67 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
| 103 | - ] ; | 68 | + sp:predicate rdf:type ; |
| 104 | - spin:rule | ||
| 105 | - [ rdf:type sp:Construct ; | ||
| 106 | - rdfs:comment "STEP 10020 Add the operator"^^xsd:string ; | ||
| 107 | - sp:templates ([ sp:object _:b2 ; | ||
| 108 | - sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; | ||
| 109 | sp:subject | 69 | sp:subject |
| 110 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 70 | [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
| 111 | ] | 71 | ] |
| 112 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; | ||
| 113 | - sp:predicate rdf:type ; | ||
| 114 | - sp:subject _:b2 | ||
| 115 | ] [ sp:object | 72 | ] [ sp:object |
| 116 | - [ sp:varName "operator"^^xsd:string | 73 | + [ sp:varName "productionFacility"^^xsd:string |
| 117 | ] ; | 74 | ] ; |
| 118 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 75 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
| 119 | - sp:subject _:b2 | 76 | + sp:subject |
| 77 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
| 78 | + ] | ||
| 79 | + ]) | ||
| 80 | + ] ; | ||
| 81 | + spin:rule | ||
| 82 | + [ rdf:type sp:Construct ; | ||
| 83 | + rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ; | ||
| 84 | + sp:templates ([ sp:object | ||
| 85 | + [ sp:varName "dateEnd"^^xsd:string | ||
| 86 | + ] ; | ||
| 87 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | ||
| 88 | + sp:subject spin:_this | ||
| 120 | ]) ; | 89 | ]) ; |
| 121 | sp:where ([ sp:object | 90 | sp:where ([ sp:object |
| 122 | [ sp:varName "contextRef"^^xsd:string | 91 | [ sp:varName "contextRef"^^xsd:string |
| ... | @@ -129,94 +98,114 @@ | ... | @@ -129,94 +98,114 @@ |
| 129 | [ sp:varName "contextRef"^^xsd:string | 98 | [ sp:varName "contextRef"^^xsd:string |
| 130 | ] | 99 | ] |
| 131 | ] [ sp:object | 100 | ] [ sp:object |
| 132 | - [ sp:varName "operatorRef"^^xsd:string | 101 | + [ sp:varName "dateEnd"^^xsd:string |
| 133 | ] ; | 102 | ] ; |
| 134 | - sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ; | 103 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
| 135 | sp:subject | 104 | sp:subject |
| 136 | [ sp:varName "contextRef"^^xsd:string | 105 | [ sp:varName "contextRef"^^xsd:string |
| 137 | ] | 106 | ] |
| 138 | - ] [ sp:object | 107 | + ] [ rdf:type sp:NotExists ; |
| 139 | - [ sp:varName "operatorRef"^^xsd:string | 108 | + sp:elements ([ sp:object |
| 109 | + [ sp:varName "date"^^xsd:string | ||
| 140 | ] ; | 110 | ] ; |
| 141 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | 111 | + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; |
| 142 | sp:subject | 112 | sp:subject |
| 143 | - [ sp:varName "operator"^^xsd:string | 113 | + [ sp:varName "contextRef"^^xsd:string |
| 144 | ] | 114 | ] |
| 145 | - ] [ sp:object spin:_this ; | 115 | + ]) |
| 146 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | 116 | + ] [ rdf:type sp:NotExists ; |
| 117 | + sp:elements ([ sp:object | ||
| 118 | + [ sp:varName "dateStart"^^xsd:string | ||
| 119 | + ] ; | ||
| 120 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | ||
| 147 | sp:subject | 121 | sp:subject |
| 148 | - [ sp:varName "productionReport"^^xsd:string | 122 | + [ sp:varName "contextRef"^^xsd:string |
| 149 | ] | 123 | ] |
| 150 | - ] [ sp:object | 124 | + ]) |
| 151 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 125 | + ]) |
| 152 | ] ; | 126 | ] ; |
| 127 | + spin:rule | ||
| 128 | + [ rdf:type sp:Construct ; | ||
| 129 | + rdfs:comment "STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ; | ||
| 130 | + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
| 131 | + sp:predicate rdf:type ; | ||
| 132 | + sp:subject | ||
| 133 | + [ sp:varName "productionReport"^^xsd:string | ||
| 134 | + ] | ||
| 135 | + ] [ sp:object _:b1 ; | ||
| 153 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | 136 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; |
| 154 | sp:subject | 137 | sp:subject |
| 155 | [ sp:varName "productionReport"^^xsd:string | 138 | [ sp:varName "productionReport"^^xsd:string |
| 156 | ] | 139 | ] |
| 157 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | 140 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
| 158 | sp:predicate rdf:type ; | 141 | sp:predicate rdf:type ; |
| 142 | + sp:subject _:b1 | ||
| 143 | + ] [ sp:object | ||
| 144 | + [ sp:varName "installation"^^xsd:string | ||
| 145 | + ] ; | ||
| 146 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 147 | + sp:subject _:b1 | ||
| 148 | + ] [ sp:object spin:_this ; | ||
| 149 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 159 | sp:subject | 150 | sp:subject |
| 160 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 151 | + [ sp:varName "productionReport"^^xsd:string |
| 161 | ] | 152 | ] |
| 162 | - ]) | 153 | + ] [ sp:object |
| 154 | + [ sp:varName "contextRef"^^xsd:string | ||
| 163 | ] ; | 155 | ] ; |
| 164 | - spin:rule | 156 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 165 | - [ rdf:type sp:Construct ; | 157 | + sp:subject _:b1 |
| 166 | - rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ; | 158 | + ]) ; |
| 167 | - sp:templates ([ sp:object | 159 | + sp:where ([ sp:object |
| 168 | [ sp:varName "intervalIdentifier"^^xsd:string | 160 | [ sp:varName "intervalIdentifier"^^xsd:string |
| 169 | ] ; | 161 | ] ; |
| 170 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | 162 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; |
| 171 | sp:subject spin:_this | 163 | sp:subject spin:_this |
| 172 | - ]) ; | 164 | + ] [ sp:object |
| 173 | - sp:where ([ sp:object | 165 | + [ sp:varName "productVolumeRef"^^xsd:string |
| 174 | - [ sp:varName "contextRef"^^xsd:string | ||
| 175 | ] ; | 166 | ] ; |
| 176 | - sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | 167 | + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
| 177 | sp:subject spin:_this | 168 | sp:subject spin:_this |
| 178 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; | 169 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; |
| 179 | sp:predicate rdf:type ; | 170 | sp:predicate rdf:type ; |
| 180 | sp:subject | 171 | sp:subject |
| 181 | - [ sp:varName "contextRef"^^xsd:string | 172 | + [ sp:varName "productVolumeRef"^^xsd:string |
| 182 | ] | 173 | ] |
| 183 | ] [ sp:object | 174 | ] [ sp:object |
| 184 | - [ sp:varName "dateStart"^^xsd:string | 175 | + [ sp:varName "installationRef"^^xsd:string |
| 185 | ] ; | 176 | ] ; |
| 186 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 177 | + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
| 187 | sp:subject | 178 | sp:subject |
| 188 | - [ sp:varName "contextRef"^^xsd:string | 179 | + [ sp:varName "productVolumeRef"^^xsd:string |
| 189 | ] | 180 | ] |
| 190 | ] [ sp:object | 181 | ] [ sp:object |
| 191 | - [ sp:varName "dateEnd"^^xsd:string | 182 | + [ sp:varName "installationRef"^^xsd:string |
| 192 | ] ; | 183 | ] ; |
| 193 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 184 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 194 | sp:subject | 185 | sp:subject |
| 195 | - [ sp:varName "contextRef"^^xsd:string | 186 | + [ sp:varName "installation"^^xsd:string |
| 196 | ] | 187 | ] |
| 197 | - ] [ rdf:type sp:Bind ; | 188 | + ] [ rdf:type sp:NotExists ; |
| 198 | - sp:expression | 189 | + sp:elements ([ sp:object |
| 199 | - [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; | 190 | + [ sp:varName "productionOperationRef"^^xsd:string |
| 200 | - sp:arg1 [ sp:varName "dateStart"^^xsd:string | ||
| 201 | ] ; | 191 | ] ; |
| 202 | - sp:arg2 [ sp:varName "dateEnd"^^xsd:string | 192 | + sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
| 193 | + sp:subject spin:_this | ||
| 194 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ; | ||
| 195 | + sp:predicate rdf:type ; | ||
| 196 | + sp:subject | ||
| 197 | + [ sp:varName "productionOperationRef"^^xsd:string | ||
| 203 | ] | 198 | ] |
| 199 | + ] [ sp:object | ||
| 200 | + [ sp:varName "installationRef"^^xsd:string | ||
| 204 | ] ; | 201 | ] ; |
| 205 | - sp:variable | 202 | + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
| 206 | - [ sp:varName "intervalIdentifier"^^xsd:string | 203 | + sp:subject |
| 204 | + [ sp:varName "productionOperationRef"^^xsd:string | ||
| 207 | ] | 205 | ] |
| 208 | ]) | 206 | ]) |
| 209 | - ] ; | 207 | + ] [ rdf:type sp:NotExists ; |
| 210 | - spin:rule | 208 | + sp:elements ([ sp:object |
| 211 | - [ rdf:type sp:Construct ; | ||
| 212 | - rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ; | ||
| 213 | - sp:templates ([ sp:object | ||
| 214 | - [ sp:varName "intervalIdentifier"^^xsd:string | ||
| 215 | - ] ; | ||
| 216 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | ||
| 217 | - sp:subject spin:_this | ||
| 218 | - ]) ; | ||
| 219 | - sp:where ([ sp:object | ||
| 220 | [ sp:varName "contextRef"^^xsd:string | 209 | [ sp:varName "contextRef"^^xsd:string |
| 221 | ] ; | 210 | ] ; |
| 222 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | 211 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
| ... | @@ -227,38 +216,33 @@ | ... | @@ -227,38 +216,33 @@ |
| 227 | [ sp:varName "contextRef"^^xsd:string | 216 | [ sp:varName "contextRef"^^xsd:string |
| 228 | ] | 217 | ] |
| 229 | ] [ sp:object | 218 | ] [ sp:object |
| 230 | - [ sp:varName "date"^^xsd:string | 219 | + [ sp:varName "installationRef"^^xsd:string |
| 231 | - ] ; | ||
| 232 | - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; | ||
| 233 | - sp:subject | ||
| 234 | - [ sp:varName "contextRef"^^xsd:string | ||
| 235 | - ] | ||
| 236 | - ] [ rdf:type sp:NotExists ; | ||
| 237 | - sp:elements ([ sp:object | ||
| 238 | - [ sp:varName "dateStart"^^xsd:string | ||
| 239 | ] ; | 220 | ] ; |
| 240 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 221 | + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
| 241 | sp:subject | 222 | sp:subject |
| 242 | [ sp:varName "contextRef"^^xsd:string | 223 | [ sp:varName "contextRef"^^xsd:string |
| 243 | ] | 224 | ] |
| 244 | ]) | 225 | ]) |
| 245 | - ] [ sp:object | 226 | + ] [ rdf:type sp:Bind ; |
| 246 | - [ sp:varName "dateEnd"^^xsd:string | 227 | + sp:expression |
| 228 | + [ rdf:type spl:object ; | ||
| 229 | + sp:arg1 [ sp:varName "installationRef"^^xsd:string | ||
| 247 | ] ; | 230 | ] ; |
| 248 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 231 | + sp:arg2 rdfs:label |
| 249 | - sp:subject | 232 | + ] ; |
| 250 | - [ sp:varName "contextRef"^^xsd:string | 233 | + sp:variable |
| 234 | + [ sp:varName "normalizedInstallationName"^^xsd:string | ||
| 251 | ] | 235 | ] |
| 252 | ] [ rdf:type sp:Bind ; | 236 | ] [ rdf:type sp:Bind ; |
| 253 | sp:expression | 237 | sp:expression |
| 254 | - [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; | 238 | + [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; |
| 255 | - sp:arg1 [ sp:varName "date"^^xsd:string | 239 | + sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string |
| 256 | ] ; | 240 | ] ; |
| 257 | - sp:arg2 [ sp:varName "dateEnd"^^xsd:string | 241 | + sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string |
| 258 | ] | 242 | ] |
| 259 | ] ; | 243 | ] ; |
| 260 | sp:variable | 244 | sp:variable |
| 261 | - [ sp:varName "intervalIdentifier"^^xsd:string | 245 | + [ sp:varName "productionReport"^^xsd:string |
| 262 | ] | 246 | ] |
| 263 | ]) | 247 | ]) |
| 264 | ] ; | 248 | ] ; |
| ... | @@ -270,19 +254,19 @@ | ... | @@ -270,19 +254,19 @@ |
| 270 | sp:subject | 254 | sp:subject |
| 271 | [ sp:varName "productionReport"^^xsd:string | 255 | [ sp:varName "productionReport"^^xsd:string |
| 272 | ] | 256 | ] |
| 273 | - ] [ sp:object _:b3 ; | 257 | + ] [ sp:object _:b2 ; |
| 274 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | 258 | sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; |
| 275 | sp:subject | 259 | sp:subject |
| 276 | [ sp:varName "productionReport"^^xsd:string | 260 | [ sp:varName "productionReport"^^xsd:string |
| 277 | ] | 261 | ] |
| 278 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | 262 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
| 279 | sp:predicate rdf:type ; | 263 | sp:predicate rdf:type ; |
| 280 | - sp:subject _:b3 | 264 | + sp:subject _:b2 |
| 281 | ] [ sp:object | 265 | ] [ sp:object |
| 282 | [ sp:varName "installation"^^xsd:string | 266 | [ sp:varName "installation"^^xsd:string |
| 283 | ] ; | 267 | ] ; |
| 284 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 268 | sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; |
| 285 | - sp:subject _:b3 | 269 | + sp:subject _:b2 |
| 286 | ] [ sp:object spin:_this ; | 270 | ] [ sp:object spin:_this ; |
| 287 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | 271 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 288 | sp:subject | 272 | sp:subject |
| ... | @@ -292,7 +276,7 @@ | ... | @@ -292,7 +276,7 @@ |
| 292 | [ sp:varName "contextRef"^^xsd:string | 276 | [ sp:varName "contextRef"^^xsd:string |
| 293 | ] ; | 277 | ] ; |
| 294 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | 278 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 295 | - sp:subject _:b3 | 279 | + sp:subject _:b2 |
| 296 | ]) ; | 280 | ]) ; |
| 297 | sp:where ([ sp:object | 281 | sp:where ([ sp:object |
| 298 | [ sp:varName "intervalIdentifier"^^xsd:string | 282 | [ sp:varName "intervalIdentifier"^^xsd:string |
| ... | @@ -367,14 +351,42 @@ | ... | @@ -367,14 +351,42 @@ |
| 367 | ] ; | 351 | ] ; |
| 368 | spin:rule | 352 | spin:rule |
| 369 | [ rdf:type sp:Construct ; | 353 | [ rdf:type sp:Construct ; |
| 370 | - rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ; | 354 | + rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ; |
| 371 | - sp:templates ([ sp:object | 355 | + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
| 372 | - [ sp:varName "date"^^xsd:string | 356 | + sp:predicate rdf:type ; |
| 373 | - ] ; | 357 | + sp:subject |
| 374 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | 358 | + [ sp:varName "productionReport"^^xsd:string |
| 375 | - sp:subject spin:_this | 359 | + ] |
| 360 | + ] [ sp:object _:b3 ; | ||
| 361 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | ||
| 362 | + sp:subject | ||
| 363 | + [ sp:varName "productionReport"^^xsd:string | ||
| 364 | + ] | ||
| 365 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
| 366 | + sp:predicate rdf:type ; | ||
| 367 | + sp:subject _:b3 | ||
| 368 | + ] [ sp:object | ||
| 369 | + [ sp:varName "installation"^^xsd:string | ||
| 370 | + ] ; | ||
| 371 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 372 | + sp:subject _:b3 | ||
| 373 | + ] [ sp:object spin:_this ; | ||
| 374 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 375 | + sp:subject | ||
| 376 | + [ sp:varName "productionReport"^^xsd:string | ||
| 377 | + ] | ||
| 378 | + ] [ sp:object | ||
| 379 | + [ sp:varName "contextRef"^^xsd:string | ||
| 380 | + ] ; | ||
| 381 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 382 | + sp:subject _:b3 | ||
| 376 | ]) ; | 383 | ]) ; |
| 377 | sp:where ([ sp:object | 384 | sp:where ([ sp:object |
| 385 | + [ sp:varName "intervalIdentifier"^^xsd:string | ||
| 386 | + ] ; | ||
| 387 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | ||
| 388 | + sp:subject spin:_this | ||
| 389 | + ] [ sp:object | ||
| 378 | [ sp:varName "contextRef"^^xsd:string | 390 | [ sp:varName "contextRef"^^xsd:string |
| 379 | ] ; | 391 | ] ; |
| 380 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | 392 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
| ... | @@ -385,35 +397,105 @@ | ... | @@ -385,35 +397,105 @@ |
| 385 | [ sp:varName "contextRef"^^xsd:string | 397 | [ sp:varName "contextRef"^^xsd:string |
| 386 | ] | 398 | ] |
| 387 | ] [ sp:object | 399 | ] [ sp:object |
| 388 | - [ sp:varName "date"^^xsd:string | 400 | + [ sp:varName "installationRef"^^xsd:string |
| 389 | ] ; | 401 | ] ; |
| 390 | - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; | 402 | + sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; |
| 391 | sp:subject | 403 | sp:subject |
| 392 | [ sp:varName "contextRef"^^xsd:string | 404 | [ sp:varName "contextRef"^^xsd:string |
| 393 | ] | 405 | ] |
| 394 | - ] [ rdf:type sp:NotExists ; | 406 | + ] [ sp:object |
| 407 | + [ sp:varName "installationRef"^^xsd:string | ||
| 408 | + ] ; | ||
| 409 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 410 | + sp:subject | ||
| 411 | + [ sp:varName "installation"^^xsd:string | ||
| 412 | + ] | ||
| 413 | + ] [ rdf:type sp:Bind ; | ||
| 414 | + sp:expression | ||
| 415 | + [ rdf:type spl:object ; | ||
| 416 | + sp:arg1 [ sp:varName "installationRef"^^xsd:string | ||
| 417 | + ] ; | ||
| 418 | + sp:arg2 rdfs:label | ||
| 419 | + ] ; | ||
| 420 | + sp:variable | ||
| 421 | + [ sp:varName "normalizedInstallationName"^^xsd:string | ||
| 422 | + ] | ||
| 423 | + ] [ rdf:type sp:Bind ; | ||
| 424 | + sp:expression | ||
| 425 | + [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; | ||
| 426 | + sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string | ||
| 427 | + ] ; | ||
| 428 | + sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string | ||
| 429 | + ] | ||
| 430 | + ] ; | ||
| 431 | + sp:variable | ||
| 432 | + [ sp:varName "productionReport"^^xsd:string | ||
| 433 | + ] | ||
| 434 | + ]) | ||
| 435 | + ] ; | ||
| 436 | + spin:rule | ||
| 437 | + [ rdf:type sp:Construct ; | ||
| 438 | + rdfs:comment "STEP 10001z Add the issue date and title"^^xsd:string ; | ||
| 439 | + sp:templates ([ sp:object | ||
| 440 | + [ sp:varName "month"^^xsd:string | ||
| 441 | + ] ; | ||
| 442 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ; | ||
| 443 | + sp:subject | ||
| 444 | + [ sp:varName "productionReport"^^xsd:string | ||
| 445 | + ] | ||
| 446 | + ] [ sp:object | ||
| 447 | + [ sp:varName "title"^^xsd:string | ||
| 448 | + ] ; | ||
| 449 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | ||
| 450 | + sp:subject | ||
| 451 | + [ sp:varName "productionReport"^^xsd:string | ||
| 452 | + ] | ||
| 453 | + ]) ; | ||
| 454 | + sp:where ([ sp:object | ||
| 455 | + [ sp:varName "contextRef"^^xsd:string | ||
| 456 | + ] ; | ||
| 457 | + sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | ||
| 458 | + sp:subject spin:_this | ||
| 459 | + ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ; | ||
| 460 | + sp:predicate rdf:type ; | ||
| 461 | + sp:subject | ||
| 462 | + [ sp:varName "contextRef"^^xsd:string | ||
| 463 | + ] | ||
| 464 | + ] [ rdf:type sp:Optional ; | ||
| 395 | sp:elements ([ sp:object | 465 | sp:elements ([ sp:object |
| 396 | - [ sp:varName "dateStart"^^xsd:string | 466 | + [ sp:varName "month"^^xsd:string |
| 397 | ] ; | 467 | ] ; |
| 398 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | 468 | + sp:predicate <http://www.epim.no/schemas/mprml/1#month> ; |
| 399 | sp:subject | 469 | sp:subject |
| 400 | [ sp:varName "contextRef"^^xsd:string | 470 | [ sp:varName "contextRef"^^xsd:string |
| 401 | ] | 471 | ] |
| 402 | ]) | 472 | ]) |
| 403 | - ] [ rdf:type sp:NotExists ; | 473 | + ] [ rdf:type sp:Optional ; |
| 404 | sp:elements ([ sp:object | 474 | sp:elements ([ sp:object |
| 405 | - [ sp:varName "dateEnd"^^xsd:string | 475 | + [ sp:varName "titleRef"^^xsd:string |
| 406 | ] ; | 476 | ] ; |
| 407 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 477 | + sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ; |
| 408 | sp:subject | 478 | sp:subject |
| 409 | [ sp:varName "contextRef"^^xsd:string | 479 | [ sp:varName "contextRef"^^xsd:string |
| 410 | ] | 480 | ] |
| 481 | + ] [ sp:object | ||
| 482 | + [ sp:varName "title"^^xsd:string | ||
| 483 | + ] ; | ||
| 484 | + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | ||
| 485 | + sp:subject | ||
| 486 | + [ sp:varName "titleRef"^^xsd:string | ||
| 487 | + ] | ||
| 411 | ]) | 488 | ]) |
| 489 | + ] [ sp:object spin:_this ; | ||
| 490 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 491 | + sp:subject | ||
| 492 | + [ sp:varName "productionReport"^^xsd:string | ||
| 493 | + ] | ||
| 412 | ]) | 494 | ]) |
| 413 | ] ; | 495 | ] ; |
| 414 | spin:rule | 496 | spin:rule |
| 415 | [ rdf:type sp:Construct ; | 497 | [ rdf:type sp:Construct ; |
| 416 | - rdfs:comment "STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ; | 498 | + rdfs:comment "STEP 10001p Create the ProductionReport - no installation"^^xsd:string ; |
| 417 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | 499 | sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; |
| 418 | sp:predicate rdf:type ; | 500 | sp:predicate rdf:type ; |
| 419 | sp:subject | 501 | sp:subject |
| ... | @@ -427,11 +509,6 @@ | ... | @@ -427,11 +509,6 @@ |
| 427 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | 509 | ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
| 428 | sp:predicate rdf:type ; | 510 | sp:predicate rdf:type ; |
| 429 | sp:subject _:b4 | 511 | sp:subject _:b4 |
| 430 | - ] [ sp:object | ||
| 431 | - [ sp:varName "installation"^^xsd:string | ||
| 432 | - ] ; | ||
| 433 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 434 | - sp:subject _:b4 | ||
| 435 | ] [ sp:object spin:_this ; | 512 | ] [ sp:object spin:_this ; |
| 436 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | 513 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 437 | sp:subject | 514 | sp:subject |
| ... | @@ -448,7 +525,8 @@ | ... | @@ -448,7 +525,8 @@ |
| 448 | ] ; | 525 | ] ; |
| 449 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | 526 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; |
| 450 | sp:subject spin:_this | 527 | sp:subject spin:_this |
| 451 | - ] [ sp:object | 528 | + ] [ rdf:type sp:NotExists ; |
| 529 | + sp:elements ([ sp:object | ||
| 452 | [ sp:varName "productVolumeRef"^^xsd:string | 530 | [ sp:varName "productVolumeRef"^^xsd:string |
| 453 | ] ; | 531 | ] ; |
| 454 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | 532 | sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; |
| ... | @@ -465,13 +543,7 @@ | ... | @@ -465,13 +543,7 @@ |
| 465 | sp:subject | 543 | sp:subject |
| 466 | [ sp:varName "productVolumeRef"^^xsd:string | 544 | [ sp:varName "productVolumeRef"^^xsd:string |
| 467 | ] | 545 | ] |
| 468 | - ] [ sp:object | 546 | + ]) |
| 469 | - [ sp:varName "installationRef"^^xsd:string | ||
| 470 | - ] ; | ||
| 471 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 472 | - sp:subject | ||
| 473 | - [ sp:varName "installation"^^xsd:string | ||
| 474 | - ] | ||
| 475 | ] [ rdf:type sp:NotExists ; | 547 | ] [ rdf:type sp:NotExists ; |
| 476 | sp:elements ([ sp:object | 548 | sp:elements ([ sp:object |
| 477 | [ sp:varName "productionOperationRef"^^xsd:string | 549 | [ sp:varName "productionOperationRef"^^xsd:string |
| ... | @@ -512,18 +584,16 @@ | ... | @@ -512,18 +584,16 @@ |
| 512 | ]) | 584 | ]) |
| 513 | ] [ rdf:type sp:Bind ; | 585 | ] [ rdf:type sp:Bind ; |
| 514 | sp:expression | 586 | sp:expression |
| 515 | - [ rdf:type spl:object ; | 587 | + [ rdf:type ep-spin-lib:normalizeString ; |
| 516 | - sp:arg1 [ sp:varName "installationRef"^^xsd:string | 588 | + sp:arg1 "noInstallation" |
| 517 | - ] ; | ||
| 518 | - sp:arg2 rdfs:label | ||
| 519 | ] ; | 589 | ] ; |
| 520 | sp:variable | 590 | sp:variable |
| 521 | - [ sp:varName "normalizedInstallationName"^^xsd:string | 591 | + [ sp:varName "normalizedName"^^xsd:string |
| 522 | ] | 592 | ] |
| 523 | ] [ rdf:type sp:Bind ; | 593 | ] [ rdf:type sp:Bind ; |
| 524 | sp:expression | 594 | sp:expression |
| 525 | [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; | 595 | [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; |
| 526 | - sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string | 596 | + sp:arg1 [ sp:varName "normalizedName"^^xsd:string |
| 527 | ] ; | 597 | ] ; |
| 528 | sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string | 598 | sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string |
| 529 | ] | 599 | ] |
| ... | @@ -535,10 +605,8 @@ | ... | @@ -535,10 +605,8 @@ |
| 535 | ] ; | 605 | ] ; |
| 536 | spin:rule | 606 | spin:rule |
| 537 | [ rdf:type sp:Construct ; | 607 | [ rdf:type sp:Construct ; |
| 538 | - rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ; | 608 | + rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ; |
| 539 | - sp:templates ([ sp:object | 609 | + sp:templates ([ sp:object "noDate" ; |
| 540 | - [ sp:varName "dateEnd"^^xsd:string | ||
| 541 | - ] ; | ||
| 542 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | 610 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; |
| 543 | sp:subject spin:_this | 611 | sp:subject spin:_this |
| 544 | ]) ; | 612 | ]) ; |
| ... | @@ -552,13 +620,15 @@ | ... | @@ -552,13 +620,15 @@ |
| 552 | sp:subject | 620 | sp:subject |
| 553 | [ sp:varName "contextRef"^^xsd:string | 621 | [ sp:varName "contextRef"^^xsd:string |
| 554 | ] | 622 | ] |
| 555 | - ] [ sp:object | 623 | + ] [ rdf:type sp:NotExists ; |
| 624 | + sp:elements ([ sp:object | ||
| 556 | [ sp:varName "dateEnd"^^xsd:string | 625 | [ sp:varName "dateEnd"^^xsd:string |
| 557 | ] ; | 626 | ] ; |
| 558 | sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 627 | sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
| 559 | sp:subject | 628 | sp:subject |
| 560 | [ sp:varName "contextRef"^^xsd:string | 629 | [ sp:varName "contextRef"^^xsd:string |
| 561 | ] | 630 | ] |
| 631 | + ]) | ||
| 562 | ] [ rdf:type sp:NotExists ; | 632 | ] [ rdf:type sp:NotExists ; |
| 563 | sp:elements ([ sp:object | 633 | sp:elements ([ sp:object |
| 564 | [ sp:varName "date"^^xsd:string | 634 | [ sp:varName "date"^^xsd:string |
| ... | @@ -581,10 +651,20 @@ | ... | @@ -581,10 +651,20 @@ |
| 581 | ] ; | 651 | ] ; |
| 582 | spin:rule | 652 | spin:rule |
| 583 | [ rdf:type sp:Construct ; | 653 | [ rdf:type sp:Construct ; |
| 584 | - rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ; | 654 | + rdfs:comment "STEP 10020 Add the operator"^^xsd:string ; |
| 585 | - sp:templates ([ sp:object "noDate" ; | 655 | + sp:templates ([ sp:object _:b5 ; |
| 586 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | 656 | + sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ; |
| 587 | - sp:subject spin:_this | 657 | + sp:subject |
| 658 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
| 659 | + ] | ||
| 660 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; | ||
| 661 | + sp:predicate rdf:type ; | ||
| 662 | + sp:subject _:b5 | ||
| 663 | + ] [ sp:object | ||
| 664 | + [ sp:varName "operator"^^xsd:string | ||
| 665 | + ] ; | ||
| 666 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 667 | + sp:subject _:b5 | ||
| 588 | ]) ; | 668 | ]) ; |
| 589 | sp:where ([ sp:object | 669 | sp:where ([ sp:object |
| 590 | [ sp:varName "contextRef"^^xsd:string | 670 | [ sp:varName "contextRef"^^xsd:string |
| ... | @@ -596,76 +676,47 @@ | ... | @@ -596,76 +676,47 @@ |
| 596 | sp:subject | 676 | sp:subject |
| 597 | [ sp:varName "contextRef"^^xsd:string | 677 | [ sp:varName "contextRef"^^xsd:string |
| 598 | ] | 678 | ] |
| 599 | - ] [ rdf:type sp:NotExists ; | 679 | + ] [ sp:object |
| 600 | - sp:elements ([ sp:object | 680 | + [ sp:varName "operatorRef"^^xsd:string |
| 601 | - [ sp:varName "dateEnd"^^xsd:string | ||
| 602 | ] ; | 681 | ] ; |
| 603 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; | 682 | + sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ; |
| 604 | sp:subject | 683 | sp:subject |
| 605 | [ sp:varName "contextRef"^^xsd:string | 684 | [ sp:varName "contextRef"^^xsd:string |
| 606 | ] | 685 | ] |
| 607 | - ]) | 686 | + ] [ sp:object |
| 608 | - ] [ rdf:type sp:NotExists ; | 687 | + [ sp:varName "operatorRef"^^xsd:string |
| 609 | - sp:elements ([ sp:object | ||
| 610 | - [ sp:varName "date"^^xsd:string | ||
| 611 | ] ; | 688 | ] ; |
| 612 | - sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; | 689 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 613 | sp:subject | 690 | sp:subject |
| 614 | - [ sp:varName "contextRef"^^xsd:string | 691 | + [ sp:varName "operator"^^xsd:string |
| 615 | ] | 692 | ] |
| 616 | - ]) | 693 | + ] [ sp:object spin:_this ; |
| 617 | - ] [ rdf:type sp:NotExists ; | 694 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; |
| 618 | - sp:elements ([ sp:object | ||
| 619 | - [ sp:varName "dateStart"^^xsd:string | ||
| 620 | - ] ; | ||
| 621 | - sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; | ||
| 622 | sp:subject | 695 | sp:subject |
| 623 | - [ sp:varName "contextRef"^^xsd:string | 696 | + [ sp:varName "productionReport"^^xsd:string |
| 624 | ] | 697 | ] |
| 625 | - ]) | 698 | + ] [ sp:object |
| 626 | - ]) | 699 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
| 627 | - ] ; | ||
| 628 | - spin:rule | ||
| 629 | - [ rdf:type sp:Construct ; | ||
| 630 | - rdfs:comment "STEP 10001z Add the report kind, issue date and title"^^xsd:string ; | ||
| 631 | - sp:templates ([ sp:object | ||
| 632 | - [ sp:varName "reportKind"^^xsd:string | ||
| 633 | ] ; | 700 | ] ; |
| 634 | - sp:predicate rdf:type ; | 701 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; |
| 635 | sp:subject | 702 | sp:subject |
| 636 | [ sp:varName "productionReport"^^xsd:string | 703 | [ sp:varName "productionReport"^^xsd:string |
| 637 | ] | 704 | ] |
| 638 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReportKind> ; | 705 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; |
| 639 | sp:predicate rdf:type ; | 706 | sp:predicate rdf:type ; |
| 640 | sp:subject | 707 | sp:subject |
| 641 | - [ sp:varName "reportKind"^^xsd:string | 708 | + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string |
| 642 | - ] | ||
| 643 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
| 644 | - sp:predicate rdfs:subClassOf ; | ||
| 645 | - sp:subject | ||
| 646 | - [ sp:varName "reportKind"^^xsd:string | ||
| 647 | - ] | ||
| 648 | - ] [ sp:object | ||
| 649 | - [ sp:varName "kind"^^xsd:string | ||
| 650 | - ] ; | ||
| 651 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; | ||
| 652 | - sp:subject | ||
| 653 | - [ sp:varName "reportKind"^^xsd:string | ||
| 654 | ] | 709 | ] |
| 655 | - ] [ sp:object | 710 | + ]) |
| 656 | - [ sp:varName "issueDate"^^xsd:string | ||
| 657 | ] ; | 711 | ] ; |
| 658 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ; | 712 | + spin:rule |
| 659 | - sp:subject | 713 | + [ rdf:type sp:Construct ; |
| 660 | - [ sp:varName "productionReport"^^xsd:string | 714 | + rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ; |
| 661 | - ] | 715 | + sp:templates ([ sp:object |
| 662 | - ] [ sp:object | 716 | + [ sp:varName "intervalIdentifier"^^xsd:string |
| 663 | - [ sp:varName "title"^^xsd:string | ||
| 664 | ] ; | 717 | ] ; |
| 665 | - sp:predicate <http://purl.org/dc/elements/1.1/title> ; | 718 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; |
| 666 | - sp:subject | 719 | + sp:subject spin:_this |
| 667 | - [ sp:varName "productionReport"^^xsd:string | ||
| 668 | - ] | ||
| 669 | ]) ; | 720 | ]) ; |
| 670 | sp:where ([ sp:object | 721 | sp:where ([ sp:object |
| 671 | [ sp:varName "contextRef"^^xsd:string | 722 | [ sp:varName "contextRef"^^xsd:string |
| ... | @@ -677,128 +728,52 @@ | ... | @@ -677,128 +728,52 @@ |
| 677 | sp:subject | 728 | sp:subject |
| 678 | [ sp:varName "contextRef"^^xsd:string | 729 | [ sp:varName "contextRef"^^xsd:string |
| 679 | ] | 730 | ] |
| 680 | - ] [ rdf:type sp:Optional ; | 731 | + ] [ sp:object |
| 681 | - sp:elements ([ sp:object | 732 | + [ sp:varName "date"^^xsd:string |
| 682 | - [ sp:varName "kind"^^xsd:string | ||
| 683 | ] ; | 733 | ] ; |
| 684 | - sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ; | 734 | + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; |
| 685 | sp:subject | 735 | sp:subject |
| 686 | [ sp:varName "contextRef"^^xsd:string | 736 | [ sp:varName "contextRef"^^xsd:string |
| 687 | ] | 737 | ] |
| 688 | - ]) | 738 | + ] [ rdf:type sp:NotExists ; |
| 689 | - ] [ rdf:type sp:Optional ; | ||
| 690 | sp:elements ([ sp:object | 739 | sp:elements ([ sp:object |
| 691 | - [ sp:varName "issueDate"^^xsd:string | 740 | + [ sp:varName "dateStart"^^xsd:string |
| 692 | ] ; | 741 | ] ; |
| 693 | - sp:predicate <http://www.epim.no/schemas/mprml/1#issueDate> ; | 742 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
| 694 | sp:subject | 743 | sp:subject |
| 695 | [ sp:varName "contextRef"^^xsd:string | 744 | [ sp:varName "contextRef"^^xsd:string |
| 696 | ] | 745 | ] |
| 697 | ]) | 746 | ]) |
| 698 | - ] [ rdf:type sp:Optional ; | ||
| 699 | - sp:elements ([ sp:object | ||
| 700 | - [ sp:varName "titleRef"^^xsd:string | ||
| 701 | - ] ; | ||
| 702 | - sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ; | ||
| 703 | - sp:subject | ||
| 704 | - [ sp:varName "contextRef"^^xsd:string | ||
| 705 | - ] | ||
| 706 | ] [ sp:object | 747 | ] [ sp:object |
| 707 | - [ sp:varName "title"^^xsd:string | 748 | + [ sp:varName "dateEnd"^^xsd:string |
| 708 | ] ; | 749 | ] ; |
| 709 | - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 750 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
| 710 | - sp:subject | ||
| 711 | - [ sp:varName "titleRef"^^xsd:string | ||
| 712 | - ] | ||
| 713 | - ]) | ||
| 714 | - ] [ sp:object spin:_this ; | ||
| 715 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 716 | sp:subject | 751 | sp:subject |
| 717 | - [ sp:varName "productionReport"^^xsd:string | 752 | + [ sp:varName "contextRef"^^xsd:string |
| 718 | ] | 753 | ] |
| 719 | ] [ rdf:type sp:Bind ; | 754 | ] [ rdf:type sp:Bind ; |
| 720 | sp:expression | 755 | sp:expression |
| 721 | - [ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ; | 756 | + [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; |
| 722 | - sp:arg1 [ sp:varName "kind"^^xsd:string | 757 | + sp:arg1 [ sp:varName "date"^^xsd:string |
| 758 | + ] ; | ||
| 759 | + sp:arg2 [ sp:varName "dateEnd"^^xsd:string | ||
| 723 | ] | 760 | ] |
| 724 | ] ; | 761 | ] ; |
| 725 | sp:variable | 762 | sp:variable |
| 726 | - [ sp:varName "reportKind"^^xsd:string | 763 | + [ sp:varName "intervalIdentifier"^^xsd:string |
| 727 | ] | 764 | ] |
| 728 | ]) | 765 | ]) |
| 729 | ] ; | 766 | ] ; |
| 730 | spin:rule | 767 | spin:rule |
| 731 | [ rdf:type sp:Construct ; | 768 | [ rdf:type sp:Construct ; |
| 732 | - rdfs:comment "STEP 10001p Create the ProductionReport - no installation"^^xsd:string ; | 769 | + rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ; |
| 733 | - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | 770 | + sp:templates ([ sp:object |
| 734 | - sp:predicate rdf:type ; | ||
| 735 | - sp:subject | ||
| 736 | - [ sp:varName "productionReport"^^xsd:string | ||
| 737 | - ] | ||
| 738 | - ] [ sp:object _:b5 ; | ||
| 739 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | ||
| 740 | - sp:subject | ||
| 741 | - [ sp:varName "productionReport"^^xsd:string | ||
| 742 | - ] | ||
| 743 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
| 744 | - sp:predicate rdf:type ; | ||
| 745 | - sp:subject _:b5 | ||
| 746 | - ] [ sp:object spin:_this ; | ||
| 747 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 748 | - sp:subject | ||
| 749 | - [ sp:varName "productionReport"^^xsd:string | ||
| 750 | - ] | ||
| 751 | - ] [ sp:object | ||
| 752 | - [ sp:varName "contextRef"^^xsd:string | ||
| 753 | - ] ; | ||
| 754 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 755 | - sp:subject _:b5 | ||
| 756 | - ]) ; | ||
| 757 | - sp:where ([ sp:object | ||
| 758 | [ sp:varName "intervalIdentifier"^^xsd:string | 771 | [ sp:varName "intervalIdentifier"^^xsd:string |
| 759 | ] ; | 772 | ] ; |
| 760 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; | 773 | sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; |
| 761 | sp:subject spin:_this | 774 | sp:subject spin:_this |
| 762 | - ] [ rdf:type sp:NotExists ; | 775 | + ]) ; |
| 763 | - sp:elements ([ sp:object | 776 | + sp:where ([ sp:object |
| 764 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
| 765 | - ] ; | ||
| 766 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
| 767 | - sp:subject spin:_this | ||
| 768 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ; | ||
| 769 | - sp:predicate rdf:type ; | ||
| 770 | - sp:subject | ||
| 771 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
| 772 | - ] | ||
| 773 | - ] [ sp:object | ||
| 774 | - [ sp:varName "installationRef"^^xsd:string | ||
| 775 | - ] ; | ||
| 776 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | ||
| 777 | - sp:subject | ||
| 778 | - [ sp:varName "productVolumeRef"^^xsd:string | ||
| 779 | - ] | ||
| 780 | - ]) | ||
| 781 | - ] [ rdf:type sp:NotExists ; | ||
| 782 | - sp:elements ([ sp:object | ||
| 783 | - [ sp:varName "productionOperationRef"^^xsd:string | ||
| 784 | - ] ; | ||
| 785 | - sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ; | ||
| 786 | - sp:subject spin:_this | ||
| 787 | - ] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ; | ||
| 788 | - sp:predicate rdf:type ; | ||
| 789 | - sp:subject | ||
| 790 | - [ sp:varName "productionOperationRef"^^xsd:string | ||
| 791 | - ] | ||
| 792 | - ] [ sp:object | ||
| 793 | - [ sp:varName "installationRef"^^xsd:string | ||
| 794 | - ] ; | ||
| 795 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | ||
| 796 | - sp:subject | ||
| 797 | - [ sp:varName "productionOperationRef"^^xsd:string | ||
| 798 | - ] | ||
| 799 | - ]) | ||
| 800 | - ] [ rdf:type sp:NotExists ; | ||
| 801 | - sp:elements ([ sp:object | ||
| 802 | [ sp:varName "contextRef"^^xsd:string | 777 | [ sp:varName "contextRef"^^xsd:string |
| 803 | ] ; | 778 | ] ; |
| 804 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; | 779 | sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ; |
| ... | @@ -809,44 +784,40 @@ | ... | @@ -809,44 +784,40 @@ |
| 809 | [ sp:varName "contextRef"^^xsd:string | 784 | [ sp:varName "contextRef"^^xsd:string |
| 810 | ] | 785 | ] |
| 811 | ] [ sp:object | 786 | ] [ sp:object |
| 812 | - [ sp:varName "installationRef"^^xsd:string | 787 | + [ sp:varName "dateStart"^^xsd:string |
| 813 | ] ; | 788 | ] ; |
| 814 | - sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ; | 789 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
| 815 | sp:subject | 790 | sp:subject |
| 816 | [ sp:varName "contextRef"^^xsd:string | 791 | [ sp:varName "contextRef"^^xsd:string |
| 817 | ] | 792 | ] |
| 818 | - ]) | 793 | + ] [ sp:object |
| 819 | - ] [ rdf:type sp:Bind ; | 794 | + [ sp:varName "dateEnd"^^xsd:string |
| 820 | - sp:expression | ||
| 821 | - [ rdf:type ep-spin-lib:normalizeString ; | ||
| 822 | - sp:arg1 "noInstallation" | ||
| 823 | ] ; | 795 | ] ; |
| 824 | - sp:variable | 796 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
| 825 | - [ sp:varName "normalizedName"^^xsd:string | 797 | + sp:subject |
| 798 | + [ sp:varName "contextRef"^^xsd:string | ||
| 826 | ] | 799 | ] |
| 827 | ] [ rdf:type sp:Bind ; | 800 | ] [ rdf:type sp:Bind ; |
| 828 | sp:expression | 801 | sp:expression |
| 829 | - [ rdf:type ep-mpr-spin-lib:buildProductionReportURI ; | 802 | + [ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ; |
| 830 | - sp:arg1 [ sp:varName "normalizedName"^^xsd:string | 803 | + sp:arg1 [ sp:varName "dateStart"^^xsd:string |
| 831 | ] ; | 804 | ] ; |
| 832 | - sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string | 805 | + sp:arg2 [ sp:varName "dateEnd"^^xsd:string |
| 833 | ] | 806 | ] |
| 834 | ] ; | 807 | ] ; |
| 835 | sp:variable | 808 | sp:variable |
| 836 | - [ sp:varName "productionReport"^^xsd:string | 809 | + [ sp:varName "intervalIdentifier"^^xsd:string |
| 837 | ] | 810 | ] |
| 838 | ]) | 811 | ]) |
| 839 | ] ; | 812 | ] ; |
| 840 | spin:rule | 813 | spin:rule |
| 841 | [ rdf:type sp:Construct ; | 814 | [ rdf:type sp:Construct ; |
| 842 | - rdfs:comment "STEP 10010 Add the contextFacility"^^xsd:string ; | 815 | + rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ; |
| 843 | sp:templates ([ sp:object | 816 | sp:templates ([ sp:object |
| 844 | - [ sp:varName "contextFacility"^^xsd:string | 817 | + [ sp:varName "date"^^xsd:string |
| 845 | ] ; | 818 | ] ; |
| 846 | - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; | 819 | + sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ; |
| 847 | - sp:subject | 820 | + sp:subject spin:_this |
| 848 | - [ sp:varName "productionFacility"^^xsd:string | ||
| 849 | - ] | ||
| 850 | ]) ; | 821 | ]) ; |
| 851 | sp:where ([ sp:object | 822 | sp:where ([ sp:object |
| 852 | [ sp:varName "contextRef"^^xsd:string | 823 | [ sp:varName "contextRef"^^xsd:string |
| ... | @@ -859,44 +830,31 @@ | ... | @@ -859,44 +830,31 @@ |
| 859 | [ sp:varName "contextRef"^^xsd:string | 830 | [ sp:varName "contextRef"^^xsd:string |
| 860 | ] | 831 | ] |
| 861 | ] [ sp:object | 832 | ] [ sp:object |
| 862 | - [ sp:varName "contectFacilityRef"^^xsd:string | 833 | + [ sp:varName "date"^^xsd:string |
| 863 | ] ; | 834 | ] ; |
| 864 | - sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ; | 835 | + sp:predicate <http://www.epim.no/schemas/mprml/1#date> ; |
| 865 | sp:subject | 836 | sp:subject |
| 866 | [ sp:varName "contextRef"^^xsd:string | 837 | [ sp:varName "contextRef"^^xsd:string |
| 867 | ] | 838 | ] |
| 868 | - ] [ sp:object | 839 | + ] [ rdf:type sp:NotExists ; |
| 869 | - [ sp:varName "contextFacilityRef"^^xsd:string | 840 | + sp:elements ([ sp:object |
| 870 | - ] ; | 841 | + [ sp:varName "dateStart"^^xsd:string |
| 871 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 872 | - sp:subject | ||
| 873 | - [ sp:varName "contextFacility"^^xsd:string | ||
| 874 | - ] | ||
| 875 | - ] [ sp:object spin:_this ; | ||
| 876 | - sp:predicate <http://www.reportinghub.no/ep/schema/production-core#derivedFrom> ; | ||
| 877 | - sp:subject | ||
| 878 | - [ sp:varName "productionReport"^^xsd:string | ||
| 879 | - ] | ||
| 880 | - ] [ sp:object | ||
| 881 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | ||
| 882 | ] ; | 842 | ] ; |
| 883 | - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | 843 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ; |
| 884 | - sp:subject | ||
| 885 | - [ sp:varName "productionReport"^^xsd:string | ||
| 886 | - ] | ||
| 887 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ; | ||
| 888 | - sp:predicate rdf:type ; | ||
| 889 | sp:subject | 844 | sp:subject |
| 890 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 845 | + [ sp:varName "contextRef"^^xsd:string |
| 891 | ] | 846 | ] |
| 892 | - ] [ sp:object | 847 | + ]) |
| 893 | - [ sp:varName "productionFacility"^^xsd:string | 848 | + ] [ rdf:type sp:NotExists ; |
| 849 | + sp:elements ([ sp:object | ||
| 850 | + [ sp:varName "dateEnd"^^xsd:string | ||
| 894 | ] ; | 851 | ] ; |
| 895 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | 852 | + sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ; |
| 896 | sp:subject | 853 | sp:subject |
| 897 | - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string | 854 | + [ sp:varName "contextRef"^^xsd:string |
| 898 | ] | 855 | ] |
| 899 | ]) | 856 | ]) |
| 857 | + ]) | ||
| 900 | ] . | 858 | ] . |
| 901 | 859 | ||
| 902 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> | 860 | <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> | ... | ... |
| ... | @@ -8,6 +8,7 @@ WHERE { | ... | @@ -8,6 +8,7 @@ WHERE { |
| 8 | ?field npd:name ?fieldName . | 8 | ?field npd:name ?fieldName . |
| 9 | } | 9 | } |
| 10 | }" | 10 | }" |
| 11 | + | ||
| 11 | > | 12 | > |
| 12 | 13 | ||
| 13 | <!-- | 14 | <!-- |
| ... | @@ -19,7 +20,8 @@ let:facilityName="{# SELECT DISTINCT | ... | @@ -19,7 +20,8 @@ let:facilityName="{# SELECT DISTINCT |
| 19 | 20 | ||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | -<h1>{= ?fieldName } Field</h1> | 23 | +<h1>Monthly Government Report : {= ?fieldName } Field</h1> |
| 24 | +<h2>{# SELECT ?title WHERE { ?report a ep-report:ProductionReport . ?report ep-core:name ?title . } } {# SELECT ?month WHERE { ?report a ep-report:ProductionReport . ?report ep-report:issuedAt ?month . } }</h2> | ||
| 23 | 25 | ||
| 24 | <!-- <ui:forEach ui:resultSet="{# | 26 | <!-- <ui:forEach ui:resultSet="{# |
| 25 | SELECT | 27 | SELECT | ... | ... |
-
Please register or login to post a comment