David Price

Improved product inventory

......@@ -397,3 +397,351 @@ mpr-tables:ProductionFlows
])
] ;
rhspin:tableHeaders ("facility"^^xsd:string "flow name"^^xsd:string "type"^^xsd:string "subtype"^^xsd:string "purpose"^^xsd:string "product"^^xsd:string "material type"^^xsd:string "gross or net"^^xsd:string "duration type"^^xsd:string "mass (kg)"^^xsd:string "pressure (atm)"^^xsd:string "temperature (C)"^^xsd:string "volume (m^3"^^xsd:string "gross calorific value (MJ/m^3)"^^xsd:string) .
mpr-tables:ProductionInventory
rdf:type rhspin:TableTemplate ;
rdfs:label "Production inventory"^^xsd:string ;
rdfs:subClassOf rhspin:MPRGTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "wholeName"^^xsd:string
] [ sp:varName "wholeTypeName"^^xsd:string
] [ sp:varName "materialQuantityName"^^xsd:string
] [ sp:varName "materialPropertyName"^^xsd:string
] [ sp:varName "materialValue"^^xsd:string
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionInventorysInPeriod"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventorysInPeriod"^^xsd:string
]
] [ sp:object
[ sp:varName "productionInventoryInPeriod"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject
[ sp:varName "productionInventorysInPeriod"^^xsd:string
]
] [ sp:object
[ sp:varName "component"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
sp:subject
[ sp:varName "productionInventoryInPeriod"^^xsd:string
]
] [ sp:object
[ sp:varName "component"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ObjectThatLastsOneMonth> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object
[ sp:varName "mq"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialInInventory> ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object
[ sp:varName "materialQuantityValue"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "mq"^^xsd:string
]
] [ sp:object
[ sp:varName "materialValue"^^xsd:string
] ;
sp:predicate
[ sp:varName "materialProperty"^^xsd:string
] ;
sp:subject
[ sp:varName "materialQuantityValue"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialProperty"^^xsd:string
]
] [ sp:object
[ sp:varName "materialPropertyName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "materialProperty"^^xsd:string
]
] [ sp:object
[ sp:varName "materialQuantity"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialQuantityValue"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialQuantity"^^xsd:string
]
] [ sp:object
[ sp:varName "materialQuantityName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "materialQuantity"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "piPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object
[ sp:varName "piWholeMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "piPart"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "piWholeMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductMaterialType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeType"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeTypeName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "wholeType"^^xsd:string
]
] [ sp:object
[ sp:varName "piWholeMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
sp:subject
[ sp:varName "piWhole"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "piWhole"^^xsd:string
]
])
])
] ;
rhspin:tableHeaders ("Material"^^xsd:string "Type"^^xsd:string "Quantity"^^xsd:string "Unit"^^xsd:string "Value"^^xsd:string) .
mpr-tables:ProductionInventoryAll
rdf:type rhspin:TableTemplate ;
rdfs:label "Production inventory - All"^^xsd:string ;
rdfs:subClassOf rhspin:MPRGTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "wholeName"^^xsd:string
] [ sp:varName "wholeTypeName"^^xsd:string
] [ sp:varName "materialQuantityName"^^xsd:string
] [ sp:varName "materialPropertyName"^^xsd:string
] [ sp:varName "materialValue"^^xsd:string
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionInventorysInPeriod"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventorysInPeriod"^^xsd:string
]
] [ sp:object
[ sp:varName "productionInventoryInPeriod"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject
[ sp:varName "productionInventorysInPeriod"^^xsd:string
]
] [ sp:object
[ sp:varName "component"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
sp:subject
[ sp:varName "productionInventoryInPeriod"^^xsd:string
]
] [ sp:object
[ sp:varName "component"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ObjectThatLastsOneMonth> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object
[ sp:varName "mq"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialInInventory> ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object
[ sp:varName "materialQuantityValue"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "mq"^^xsd:string
]
] [ sp:object
[ sp:varName "materialValue"^^xsd:string
] ;
sp:predicate
[ sp:varName "materialProperty"^^xsd:string
] ;
sp:subject
[ sp:varName "materialQuantityValue"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialProperty"^^xsd:string
]
] [ sp:object
[ sp:varName "materialPropertyName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "materialProperty"^^xsd:string
]
] [ sp:object
[ sp:varName "materialQuantity"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialQuantityValue"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialQuantity"^^xsd:string
]
] [ sp:object
[ sp:varName "materialQuantityName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "materialQuantity"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "piPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object
[ sp:varName "piWholeMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "piPart"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "piWholeMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductMaterialType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeType"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeTypeName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "wholeType"^^xsd:string
]
] [ sp:object
[ sp:varName "piWholeMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
sp:subject
[ sp:varName "piWhole"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "piWhole"^^xsd:string
]
])
])
] ;
rhspin:tableHeaders ("Material"^^xsd:string "Material Type"^^xsd:string "Quantity"^^xsd:string "Unit"^^xsd:string "Value"^^xsd:string) .
......
......@@ -157,8 +157,9 @@ OPTIONAL {
</ui:forEach> -->
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlows" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlows" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventory" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventoryAll" />
</ui:group>
\ No newline at end of file
......