Got productFlowMass, productFlowDensity and productFlowVolume magic properties working
Showing
2 changed files
with
189 additions
and
89 deletions
| ... | @@ -2551,111 +2551,31 @@ mpr-tables:ProductionSales | ... | @@ -2551,111 +2551,31 @@ mpr-tables:ProductionSales |
| 2551 | sp:subject | 2551 | sp:subject |
| 2552 | [ sp:varName "productionFlowMixedPart"^^xsd:string | 2552 | [ sp:varName "productionFlowMixedPart"^^xsd:string |
| 2553 | ] | 2553 | ] |
| 2554 | - ] [ sp:object | ||
| 2555 | - [ sp:varName "productFlowInMonthMaterial"^^xsd:string | ||
| 2556 | - ] ; | ||
| 2557 | - sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ; | ||
| 2558 | - sp:subject | ||
| 2559 | - [ sp:varName "productionFlowMixedPart"^^xsd:string | ||
| 2560 | - ] | ||
| 2561 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ; | ||
| 2562 | - sp:predicate rdf:type ; | ||
| 2563 | - sp:subject | ||
| 2564 | - [ sp:varName "productFlowInMonthMaterial"^^xsd:string | ||
| 2565 | - ] | ||
| 2566 | - ] [ sp:object | ||
| 2567 | - [ sp:varName "productFlowInMonthMaterial"^^xsd:string | ||
| 2568 | - ] ; | ||
| 2569 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 2570 | - sp:subject | ||
| 2571 | - [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string | ||
| 2572 | - ] | ||
| 2573 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState> ; | ||
| 2574 | - sp:predicate rdf:type ; | ||
| 2575 | - sp:subject | ||
| 2576 | - [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string | ||
| 2577 | - ] | ||
| 2578 | ] [ rdf:type sp:Optional ; | 2554 | ] [ rdf:type sp:Optional ; |
| 2579 | sp:elements ([ sp:object | 2555 | sp:elements ([ sp:object |
| 2580 | - [ sp:varName "materialMass"^^xsd:string | 2556 | + [ sp:varName "massValueString"^^xsd:string |
| 2581 | ] ; | 2557 | ] ; |
| 2582 | - sp:predicate rdf:type ; | 2558 | + sp:predicate <http://www.reportinghub.no/ep/schema/flow#productFlowMass> ; |
| 2583 | - sp:subject | ||
| 2584 | - [ sp:varName "productFlowInMonthMaterial"^^xsd:string | ||
| 2585 | - ] | ||
| 2586 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ; | ||
| 2587 | - sp:predicate rdf:type ; | ||
| 2588 | sp:subject | 2559 | sp:subject |
| 2589 | - [ sp:varName "materialMass"^^xsd:string | 2560 | + [ sp:varName "productionFlowMixedPart"^^xsd:string |
| 2590 | - ] | ||
| 2591 | - ] [ rdf:type sp:Bind ; | ||
| 2592 | - sp:expression | ||
| 2593 | - [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ; | ||
| 2594 | - sp:arg1 [ sp:varName "materialMass"^^xsd:string | ||
| 2595 | - ] | ||
| 2596 | - ] ; | ||
| 2597 | - sp:variable | ||
| 2598 | - [ sp:varName "massValueString"^^xsd:string | ||
| 2599 | ] | 2561 | ] |
| 2600 | ]) | 2562 | ]) |
| 2601 | ] [ rdf:type sp:Optional ; | 2563 | ] [ rdf:type sp:Optional ; |
| 2602 | sp:elements ([ sp:object | 2564 | sp:elements ([ sp:object |
| 2603 | - [ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string | 2565 | + [ sp:varName "volumeValueString"^^xsd:string |
| 2604 | - ] ; | ||
| 2605 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 2606 | - sp:subject | ||
| 2607 | - [ sp:varName "stateOfMaterialThatFlowsInPeriodVolume"^^xsd:string | ||
| 2608 | - ] | ||
| 2609 | - ] [ sp:object | ||
| 2610 | - [ sp:varName "stateVolume"^^xsd:string | ||
| 2611 | ] ; | 2566 | ] ; |
| 2612 | - sp:predicate rdf:type ; | 2567 | + sp:predicate <http://www.reportinghub.no/ep/schema/flow#productFlowVolume> ; |
| 2613 | - sp:subject | ||
| 2614 | - [ sp:varName "stateOfMaterialThatFlowsInPeriodVolume"^^xsd:string | ||
| 2615 | - ] | ||
| 2616 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ; | ||
| 2617 | - sp:predicate rdf:type ; | ||
| 2618 | sp:subject | 2568 | sp:subject |
| 2619 | - [ sp:varName "stateVolume"^^xsd:string | 2569 | + [ sp:varName "productionFlowMixedPart"^^xsd:string |
| 2620 | - ] | ||
| 2621 | - ] [ rdf:type sp:Bind ; | ||
| 2622 | - sp:expression | ||
| 2623 | - [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ; | ||
| 2624 | - sp:arg1 [ sp:varName "stateVolume"^^xsd:string | ||
| 2625 | - ] | ||
| 2626 | - ] ; | ||
| 2627 | - sp:variable | ||
| 2628 | - [ sp:varName "volumeValueString"^^xsd:string | ||
| 2629 | ] | 2570 | ] |
| 2630 | ]) | 2571 | ]) |
| 2631 | ] [ rdf:type sp:Optional ; | 2572 | ] [ rdf:type sp:Optional ; |
| 2632 | sp:elements ([ sp:object | 2573 | sp:elements ([ sp:object |
| 2633 | - [ sp:varName "productFlowInMonthMaterial"^^xsd:string | 2574 | + [ sp:varName "densityValueString"^^xsd:string |
| 2634 | - ] ; | ||
| 2635 | - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 2636 | - sp:subject | ||
| 2637 | - [ sp:varName "stateOfMaterialThatFlowsInPeriodDensity"^^xsd:string | ||
| 2638 | - ] | ||
| 2639 | - ] [ sp:object | ||
| 2640 | - [ sp:varName "stateDensity"^^xsd:string | ||
| 2641 | ] ; | 2575 | ] ; |
| 2642 | - sp:predicate rdf:type ; | 2576 | + sp:predicate <http://www.reportinghub.no/ep/schema/flow#productFlowDensity> ; |
| 2643 | - sp:subject | ||
| 2644 | - [ sp:varName "stateOfMaterialThatFlowsInPeriodDensity"^^xsd:string | ||
| 2645 | - ] | ||
| 2646 | - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ; | ||
| 2647 | - sp:predicate rdf:type ; | ||
| 2648 | sp:subject | 2577 | sp:subject |
| 2649 | - [ sp:varName "stateDensity"^^xsd:string | 2578 | + [ sp:varName "productionFlowMixedPart"^^xsd:string |
| 2650 | - ] | ||
| 2651 | - ] [ rdf:type sp:Bind ; | ||
| 2652 | - sp:expression | ||
| 2653 | - [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ; | ||
| 2654 | - sp:arg1 [ sp:varName "stateDensity"^^xsd:string | ||
| 2655 | - ] | ||
| 2656 | - ] ; | ||
| 2657 | - sp:variable | ||
| 2658 | - [ sp:varName "densityValueString"^^xsd:string | ||
| 2659 | ] | 2579 | ] |
| 2660 | ]) | 2580 | ]) |
| 2661 | ] [ sp:object | 2581 | ] [ sp:object | ... | ... |
| ... | @@ -4,6 +4,7 @@ | ... | @@ -4,6 +4,7 @@ |
| 4 | # imports: http://www.reportinghub.no/ep/schema/1.0/production | 4 | # imports: http://www.reportinghub.no/ep/schema/1.0/production |
| 5 | 5 | ||
| 6 | @prefix ep-report: <http://www.reportinghub.no/ep/schema/report#> . | 6 | @prefix ep-report: <http://www.reportinghub.no/ep/schema/report#> . |
| 7 | +@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> . | ||
| 7 | @prefix owl: <http://www.w3.org/2002/07/owl#> . | 8 | @prefix owl: <http://www.w3.org/2002/07/owl#> . |
| 8 | @prefix prod-property: <http://www.reportinghub.no/ep/spin/prod-property#> . | 9 | @prefix prod-property: <http://www.reportinghub.no/ep/spin/prod-property#> . |
| 9 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | 10 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
| ... | @@ -104,6 +105,185 @@ | ... | @@ -104,6 +105,185 @@ |
| 104 | ] ; | 105 | ] ; |
| 105 | spin:returnType xsd:string . | 106 | spin:returnType xsd:string . |
| 106 | 107 | ||
| 108 | +<http://www.reportinghub.no/ep/schema/flow#productFlowDensity> | ||
| 109 | + rdf:type spin:MagicProperty , owl:DatatypeProperty ; | ||
| 110 | + rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ; | ||
| 111 | + rdfs:label "product flow density"^^xsd:string ; | ||
| 112 | + rdfs:range xsd:string ; | ||
| 113 | + rdfs:subClassOf spin:MagicProperties ; | ||
| 114 | + spin:body | ||
| 115 | + [ rdf:type sp:Select ; | ||
| 116 | + sp:resultVariables ([ sp:varName "densityValueString"^^xsd:string | ||
| 117 | + ]) ; | ||
| 118 | + sp:where ([ sp:object | ||
| 119 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 120 | + ] ; | ||
| 121 | + sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ; | ||
| 122 | + sp:subject spin:_arg1 | ||
| 123 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ; | ||
| 124 | + sp:predicate rdf:type ; | ||
| 125 | + sp:subject | ||
| 126 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 127 | + ] | ||
| 128 | + ] [ sp:object | ||
| 129 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 130 | + ] ; | ||
| 131 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 132 | + sp:subject | ||
| 133 | + [ sp:varName "materialWithDensity"^^xsd:string | ||
| 134 | + ] | ||
| 135 | + ] [ sp:object | ||
| 136 | + [ sp:varName "density"^^xsd:string | ||
| 137 | + ] ; | ||
| 138 | + sp:predicate rdf:type ; | ||
| 139 | + sp:subject | ||
| 140 | + [ sp:varName "materialWithDensity"^^xsd:string | ||
| 141 | + ] | ||
| 142 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ; | ||
| 143 | + sp:predicate rdf:type ; | ||
| 144 | + sp:subject | ||
| 145 | + [ sp:varName "density"^^xsd:string | ||
| 146 | + ] | ||
| 147 | + ] [ rdf:type sp:Bind ; | ||
| 148 | + sp:expression | ||
| 149 | + [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ; | ||
| 150 | + sp:arg1 [ sp:varName "density"^^xsd:string | ||
| 151 | + ] | ||
| 152 | + ] ; | ||
| 153 | + sp:variable | ||
| 154 | + [ sp:varName "densityValueString"^^xsd:string | ||
| 155 | + ] | ||
| 156 | + ]) | ||
| 157 | + ] ; | ||
| 158 | + spin:constraint | ||
| 159 | + [ rdf:type spl:Argument ; | ||
| 160 | + rdfs:comment "the product flow that has mass"^^xsd:string ; | ||
| 161 | + spl:predicate sp:arg1 ; | ||
| 162 | + spl:valueType <http://www.reportinghub.no/ep/schema/flow#ProductFlow> | ||
| 163 | + ] ; | ||
| 164 | + spin:returnType xsd:string . | ||
| 165 | + | ||
| 166 | +<http://www.reportinghub.no/ep/schema/flow#productFlowMass> | ||
| 167 | + rdf:type spin:MagicProperty , owl:DatatypeProperty ; | ||
| 168 | + rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ; | ||
| 169 | + rdfs:label "product flow mass"^^xsd:string ; | ||
| 170 | + rdfs:range xsd:string ; | ||
| 171 | + rdfs:subClassOf spin:MagicProperties ; | ||
| 172 | + spin:body | ||
| 173 | + [ rdf:type sp:Select ; | ||
| 174 | + sp:resultVariables ([ sp:varName "massValueString"^^xsd:string | ||
| 175 | + ]) ; | ||
| 176 | + sp:where ([ sp:object | ||
| 177 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 178 | + ] ; | ||
| 179 | + sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ; | ||
| 180 | + sp:subject spin:_arg1 | ||
| 181 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ; | ||
| 182 | + sp:predicate rdf:type ; | ||
| 183 | + sp:subject | ||
| 184 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 185 | + ] | ||
| 186 | + ] [ sp:object | ||
| 187 | + [ sp:varName "materialMass"^^xsd:string | ||
| 188 | + ] ; | ||
| 189 | + sp:predicate rdf:type ; | ||
| 190 | + sp:subject | ||
| 191 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 192 | + ] | ||
| 193 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ; | ||
| 194 | + sp:predicate rdf:type ; | ||
| 195 | + sp:subject | ||
| 196 | + [ sp:varName "materialMass"^^xsd:string | ||
| 197 | + ] | ||
| 198 | + ] [ rdf:type sp:Bind ; | ||
| 199 | + sp:expression | ||
| 200 | + [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ; | ||
| 201 | + sp:arg1 [ sp:varName "materialMass"^^xsd:string | ||
| 202 | + ] | ||
| 203 | + ] ; | ||
| 204 | + sp:variable | ||
| 205 | + [ sp:varName "massValueString"^^xsd:string | ||
| 206 | + ] | ||
| 207 | + ]) | ||
| 208 | + ] ; | ||
| 209 | + spin:constraint | ||
| 210 | + [ rdf:type spl:Argument ; | ||
| 211 | + rdfs:comment "the product flow that has mass"^^xsd:string ; | ||
| 212 | + spl:predicate sp:arg1 ; | ||
| 213 | + spl:valueType <http://www.reportinghub.no/ep/schema/flow#ProductFlow> | ||
| 214 | + ] ; | ||
| 215 | + spin:returnType xsd:string . | ||
| 216 | + | ||
| 217 | +<http://www.reportinghub.no/ep/schema/flow#productFlowVolume> | ||
| 218 | + rdf:type spin:MagicProperty , owl:DatatypeProperty ; | ||
| 219 | + rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ; | ||
| 220 | + rdfs:label "product flow volume"^^xsd:string ; | ||
| 221 | + rdfs:range xsd:string ; | ||
| 222 | + rdfs:subClassOf spin:MagicProperties ; | ||
| 223 | + spin:body | ||
| 224 | + [ rdf:type sp:Select ; | ||
| 225 | + sp:resultVariables ([ sp:varName "volumeValueString"^^xsd:string | ||
| 226 | + ]) ; | ||
| 227 | + sp:where ([ sp:object | ||
| 228 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 229 | + ] ; | ||
| 230 | + sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ; | ||
| 231 | + sp:subject spin:_arg1 | ||
| 232 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ; | ||
| 233 | + sp:predicate rdf:type ; | ||
| 234 | + sp:subject | ||
| 235 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 236 | + ] | ||
| 237 | + ] [ sp:object | ||
| 238 | + [ sp:varName "productFlowMaterial"^^xsd:string | ||
| 239 | + ] ; | ||
| 240 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 241 | + sp:subject | ||
| 242 | + [ sp:varName "materialInState"^^xsd:string | ||
| 243 | + ] | ||
| 244 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState> ; | ||
| 245 | + sp:predicate rdf:type ; | ||
| 246 | + sp:subject | ||
| 247 | + [ sp:varName "materialInState"^^xsd:string | ||
| 248 | + ] | ||
| 249 | + ] [ sp:object | ||
| 250 | + [ sp:varName "materialInState"^^xsd:string | ||
| 251 | + ] ; | ||
| 252 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 253 | + sp:subject | ||
| 254 | + [ sp:varName "materialWithVolume"^^xsd:string | ||
| 255 | + ] | ||
| 256 | + ] [ sp:object | ||
| 257 | + [ sp:varName "volume"^^xsd:string | ||
| 258 | + ] ; | ||
| 259 | + sp:predicate rdf:type ; | ||
| 260 | + sp:subject | ||
| 261 | + [ sp:varName "materialWithVolume"^^xsd:string | ||
| 262 | + ] | ||
| 263 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ; | ||
| 264 | + sp:predicate rdf:type ; | ||
| 265 | + sp:subject | ||
| 266 | + [ sp:varName "volume"^^xsd:string | ||
| 267 | + ] | ||
| 268 | + ] [ rdf:type sp:Bind ; | ||
| 269 | + sp:expression | ||
| 270 | + [ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ; | ||
| 271 | + sp:arg1 [ sp:varName "volume"^^xsd:string | ||
| 272 | + ] | ||
| 273 | + ] ; | ||
| 274 | + sp:variable | ||
| 275 | + [ sp:varName "volumeValueString"^^xsd:string | ||
| 276 | + ] | ||
| 277 | + ]) | ||
| 278 | + ] ; | ||
| 279 | + spin:constraint | ||
| 280 | + [ rdf:type spl:Argument ; | ||
| 281 | + rdfs:comment "the product flow that has mass"^^xsd:string ; | ||
| 282 | + spl:predicate sp:arg1 ; | ||
| 283 | + spl:valueType <http://www.reportinghub.no/ep/schema/flow#ProductFlow> | ||
| 284 | + ] ; | ||
| 285 | + spin:returnType xsd:string . | ||
| 286 | + | ||
| 107 | <http://www.reportinghub.no/ep/schema/flow#reportedFlowMaterial> | 287 | <http://www.reportinghub.no/ep/schema/flow#reportedFlowMaterial> |
| 108 | rdf:type spin:MagicProperty , owl:ObjectProperty ; | 288 | rdf:type spin:MagicProperty , owl:ObjectProperty ; |
| 109 | rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; | 289 | rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ; | ... | ... |
-
Please register or login to post a comment