David Price

cleanup inventory, added volume to inventory report

......@@ -19,7 +19,7 @@
<http://www.reportinghub.no/ep/spin/mpr-tables>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://spinrdf.org/spin> ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
mpr-tables:Cargo
......@@ -1484,13 +1484,15 @@ mpr-tables:ProductionFlowsAll
mpr-tables:ProductionInventory
rdf:type rhspin:TableTemplate ;
rdfs:label "Production inventory"^^xsd:string ;
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 "massValueString"^^xsd:string
] [ sp:varName "volumeValueString"^^xsd:string
] [ sp:varName "densityValueString"^^xsd:string
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
......@@ -1559,273 +1561,141 @@ mpr-tables:ProductionInventory
sp:subject
[ sp:varName "monthobject"^^xsd:string
]
] [ sp:object
[ sp:varName "materialQuantityValue"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialQuantityValue"^^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
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ rdf:type spif:decimalFormat ;
arg:number
[ sp:varName "materialValue"^^xsd:string
] ;
arg:pattern "#.##"
] ;
sp:arg2 " " ;
sp:arg3 [ sp:varName "materialPropertyName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "massValueString"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "piPart"^^xsd:string
[ sp:varName "materialQuantityValue"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "monthobject"^^xsd:string
[ sp:varName "materialInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialQuantityValue"^^xsd:string
]
] [ sp:object
[ sp:varName "piWholeMaterial"^^xsd:string
[ sp:varName "materialValue"^^xsd:string
] ;
sp:predicate
[ sp:varName "materialProperty"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "piPart"^^xsd:string
[ 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 "wholeType"^^xsd:string
[ 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 "piWholeMaterial"^^xsd:string
[ sp:varName "materialQuantityValue"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductMaterialType> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeType"^^xsd:string
[ sp:varName "materialQuantity"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ rdf:type spif:decimalFormat ;
arg:number
[ sp:varName "materialValue"^^xsd:string
] ;
arg:pattern "#.##"
] ;
sp:arg2 " " ;
sp:arg3 [ sp:varName "materialPropertyName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "massValueString"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "materialInventory"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "stateOfMaterialInventoryVolume"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeTypeName"^^xsd:string
[ sp:varName "volumeQuantityValue"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeType"^^xsd:string
[ sp:varName "stateOfMaterialInventoryVolume"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "volumeQuantityValue"^^xsd:string
]
] [ sp:object
[ sp:varName "piWholeMaterial"^^xsd:string
[ sp:varName "volumeValue"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumePredicate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
sp:subject
[ sp:varName "piWhole"^^xsd:string
[ sp:varName "volumeQuantityValue"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "volumePredicate"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeName"^^xsd:string
[ sp:varName "volumeUnit"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "piWhole"^^xsd:string
[ sp:varName "volumePredicate"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ rdf:type spif:decimalFormat ;
arg:number
[ sp:varName "volumeValue"^^xsd:string
] ;
arg:pattern "#.##"
] ;
sp:arg2 " " ;
sp:arg3 [ sp:varName "volumeUnit"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeValueString"^^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"^^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 "massValueString"^^xsd:string
] [ sp:varName "densityValueString"^^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 <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventoryInPeriod"^^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 "materialInventory"^^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 "materialInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialQuantityValue"^^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
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ rdf:type spif:decimalFormat ;
arg:number
[ sp:varName "materialValue"^^xsd:string
] ;
arg:pattern "#.##"
] ;
sp:arg2 " " ;
sp:arg3 [ sp:varName "materialPropertyName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "massValueString"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "materialInventory"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "stateOfMaterialInventory"^^xsd:string
[ sp:varName "stateOfMaterialInventoryDensity"^^xsd:string
]
] [ sp:object
[ sp:varName "densityQuantityValue"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "stateOfMaterialInventory"^^xsd:string
[ sp:varName "stateOfMaterialInventoryDensity"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ;
sp:predicate rdf:type ;
......@@ -1921,7 +1791,7 @@ mpr-tables:ProductionInventoryAll
])
])
] ;
rhspin:tableHeaders ("Material"^^xsd:string "Material Type"^^xsd:string "Mass"^^xsd:string "Density"^^xsd:string) .
rhspin:tableHeaders ("Material"^^xsd:string "Material Type"^^xsd:string "Mass"^^xsd:string "Volume"^^xsd:string "Density"^^xsd:string) .
mpr-tables:WellProductionFlows
rdf:type rhspin:TableTemplate ;
......
......@@ -179,7 +179,7 @@ OPTIONAL {
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlowsAll" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventoryAll" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventory" />
......