David Price

cleanup inventory, added volume to inventory report

...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 19
20 <http://www.reportinghub.no/ep/spin/mpr-tables> 20 <http://www.reportinghub.no/ep/spin/mpr-tables>
21 rdf:type owl:Ontology ; 21 rdf:type owl:Ontology ;
22 - 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> ; 22 + 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> ;
23 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 23 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
24 24
25 mpr-tables:Cargo 25 mpr-tables:Cargo
...@@ -1484,13 +1484,15 @@ mpr-tables:ProductionFlowsAll ...@@ -1484,13 +1484,15 @@ mpr-tables:ProductionFlowsAll
1484 1484
1485 mpr-tables:ProductionInventory 1485 mpr-tables:ProductionInventory
1486 rdf:type rhspin:TableTemplate ; 1486 rdf:type rhspin:TableTemplate ;
1487 - rdfs:label "Production inventory"^^xsd:string ; 1487 + rdfs:label "Production Inventory"^^xsd:string ;
1488 rdfs:subClassOf rhspin:MPRGTableTemplates ; 1488 rdfs:subClassOf rhspin:MPRGTableTemplates ;
1489 spin:body 1489 spin:body
1490 [ rdf:type sp:Select ; 1490 [ rdf:type sp:Select ;
1491 sp:resultVariables ([ sp:varName "wholeName"^^xsd:string 1491 sp:resultVariables ([ sp:varName "wholeName"^^xsd:string
1492 ] [ sp:varName "wholeTypeName"^^xsd:string 1492 ] [ sp:varName "wholeTypeName"^^xsd:string
1493 ] [ sp:varName "massValueString"^^xsd:string 1493 ] [ sp:varName "massValueString"^^xsd:string
1494 + ] [ sp:varName "volumeValueString"^^xsd:string
1495 + ] [ sp:varName "densityValueString"^^xsd:string
1494 ]) ; 1496 ]) ;
1495 sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; 1497 sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
1496 sp:predicate rdf:type ; 1498 sp:predicate rdf:type ;
...@@ -1559,273 +1561,141 @@ mpr-tables:ProductionInventory ...@@ -1559,273 +1561,141 @@ mpr-tables:ProductionInventory
1559 sp:subject 1561 sp:subject
1560 [ sp:varName "monthobject"^^xsd:string 1562 [ sp:varName "monthobject"^^xsd:string
1561 ] 1563 ]
1562 - ] [ sp:object
1563 - [ sp:varName "materialQuantityValue"^^xsd:string
1564 - ] ;
1565 - sp:predicate rdf:type ;
1566 - sp:subject
1567 - [ sp:varName "materialInventory"^^xsd:string
1568 - ]
1569 - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
1570 - sp:predicate rdf:type ;
1571 - sp:subject
1572 - [ sp:varName "materialQuantityValue"^^xsd:string
1573 - ]
1574 - ] [ sp:object
1575 - [ sp:varName "materialValue"^^xsd:string
1576 - ] ;
1577 - sp:predicate
1578 - [ sp:varName "materialProperty"^^xsd:string
1579 - ] ;
1580 - sp:subject
1581 - [ sp:varName "materialQuantityValue"^^xsd:string
1582 - ]
1583 - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
1584 - sp:predicate rdf:type ;
1585 - sp:subject
1586 - [ sp:varName "materialProperty"^^xsd:string
1587 - ]
1588 - ] [ sp:object
1589 - [ sp:varName "materialPropertyName"^^xsd:string
1590 - ] ;
1591 - sp:predicate rdfs:label ;
1592 - sp:subject
1593 - [ sp:varName "materialProperty"^^xsd:string
1594 - ]
1595 - ] [ sp:object
1596 - [ sp:varName "materialQuantity"^^xsd:string
1597 - ] ;
1598 - sp:predicate rdf:type ;
1599 - sp:subject
1600 - [ sp:varName "materialQuantityValue"^^xsd:string
1601 - ]
1602 - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
1603 - sp:predicate rdf:type ;
1604 - sp:subject
1605 - [ sp:varName "materialQuantity"^^xsd:string
1606 - ]
1607 - ] [ rdf:type sp:Bind ;
1608 - sp:expression
1609 - [ rdf:type fn:concat ;
1610 - sp:arg1 [ rdf:type spif:decimalFormat ;
1611 - arg:number
1612 - [ sp:varName "materialValue"^^xsd:string
1613 - ] ;
1614 - arg:pattern "#.##"
1615 - ] ;
1616 - sp:arg2 " " ;
1617 - sp:arg3 [ sp:varName "materialPropertyName"^^xsd:string
1618 - ]
1619 - ] ;
1620 - sp:variable
1621 - [ sp:varName "massValueString"^^xsd:string
1622 - ]
1623 ] [ rdf:type sp:Optional ; 1564 ] [ rdf:type sp:Optional ;
1624 sp:elements ([ sp:object 1565 sp:elements ([ sp:object
1625 - [ sp:varName "piPart"^^xsd:string 1566 + [ sp:varName "materialQuantityValue"^^xsd:string
1626 ] ; 1567 ] ;
1627 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 1568 + sp:predicate rdf:type ;
1628 sp:subject 1569 sp:subject
1629 - [ sp:varName "monthobject"^^xsd:string 1570 + [ sp:varName "materialInventory"^^xsd:string
1571 + ]
1572 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
1573 + sp:predicate rdf:type ;
1574 + sp:subject
1575 + [ sp:varName "materialQuantityValue"^^xsd:string
1630 ] 1576 ]
1631 ] [ sp:object 1577 ] [ sp:object
1632 - [ sp:varName "piWholeMaterial"^^xsd:string 1578 + [ sp:varName "materialValue"^^xsd:string
1579 + ] ;
1580 + sp:predicate
1581 + [ sp:varName "materialProperty"^^xsd:string
1633 ] ; 1582 ] ;
1634 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
1635 sp:subject 1583 sp:subject
1636 - [ sp:varName "piPart"^^xsd:string 1584 + [ sp:varName "materialQuantityValue"^^xsd:string
1585 + ]
1586 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
1587 + sp:predicate rdf:type ;
1588 + sp:subject
1589 + [ sp:varName "materialProperty"^^xsd:string
1637 ] 1590 ]
1638 ] [ sp:object 1591 ] [ sp:object
1639 - [ sp:varName "wholeType"^^xsd:string 1592 + [ sp:varName "materialPropertyName"^^xsd:string
1593 + ] ;
1594 + sp:predicate rdfs:label ;
1595 + sp:subject
1596 + [ sp:varName "materialProperty"^^xsd:string
1597 + ]
1598 + ] [ sp:object
1599 + [ sp:varName "materialQuantity"^^xsd:string
1640 ] ; 1600 ] ;
1641 sp:predicate rdf:type ; 1601 sp:predicate rdf:type ;
1642 sp:subject 1602 sp:subject
1643 - [ sp:varName "piWholeMaterial"^^xsd:string 1603 + [ sp:varName "materialQuantityValue"^^xsd:string
1644 ] 1604 ]
1645 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductMaterialType> ; 1605 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
1646 sp:predicate rdf:type ; 1606 sp:predicate rdf:type ;
1647 sp:subject 1607 sp:subject
1648 - [ sp:varName "wholeType"^^xsd:string 1608 + [ sp:varName "materialQuantity"^^xsd:string
1609 + ]
1610 + ] [ rdf:type sp:Bind ;
1611 + sp:expression
1612 + [ rdf:type fn:concat ;
1613 + sp:arg1 [ rdf:type spif:decimalFormat ;
1614 + arg:number
1615 + [ sp:varName "materialValue"^^xsd:string
1616 + ] ;
1617 + arg:pattern "#.##"
1618 + ] ;
1619 + sp:arg2 " " ;
1620 + sp:arg3 [ sp:varName "materialPropertyName"^^xsd:string
1621 + ]
1622 + ] ;
1623 + sp:variable
1624 + [ sp:varName "massValueString"^^xsd:string
1625 + ]
1626 + ])
1627 + ] [ rdf:type sp:Optional ;
1628 + sp:elements ([ sp:object
1629 + [ sp:varName "materialInventory"^^xsd:string
1630 + ] ;
1631 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
1632 + sp:subject
1633 + [ sp:varName "stateOfMaterialInventoryVolume"^^xsd:string
1649 ] 1634 ]
1650 ] [ sp:object 1635 ] [ sp:object
1651 - [ sp:varName "wholeTypeName"^^xsd:string 1636 + [ sp:varName "volumeQuantityValue"^^xsd:string
1652 ] ; 1637 ] ;
1653 - sp:predicate rdfs:label ; 1638 + sp:predicate rdf:type ;
1654 sp:subject 1639 sp:subject
1655 - [ sp:varName "wholeType"^^xsd:string 1640 + [ sp:varName "stateOfMaterialInventoryVolume"^^xsd:string
1641 + ]
1642 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
1643 + sp:predicate rdf:type ;
1644 + sp:subject
1645 + [ sp:varName "volumeQuantityValue"^^xsd:string
1656 ] 1646 ]
1657 ] [ sp:object 1647 ] [ sp:object
1658 - [ sp:varName "piWholeMaterial"^^xsd:string 1648 + [ sp:varName "volumeValue"^^xsd:string
1649 + ] ;
1650 + sp:predicate
1651 + [ sp:varName "volumePredicate"^^xsd:string
1659 ] ; 1652 ] ;
1660 - sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
1661 sp:subject 1653 sp:subject
1662 - [ sp:varName "piWhole"^^xsd:string 1654 + [ sp:varName "volumeQuantityValue"^^xsd:string
1655 + ]
1656 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
1657 + sp:predicate rdf:type ;
1658 + sp:subject
1659 + [ sp:varName "volumePredicate"^^xsd:string
1663 ] 1660 ]
1664 ] [ sp:object 1661 ] [ sp:object
1665 - [ sp:varName "wholeName"^^xsd:string 1662 + [ sp:varName "volumeUnit"^^xsd:string
1666 ] ; 1663 ] ;
1667 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; 1664 + sp:predicate rdfs:label ;
1668 sp:subject 1665 sp:subject
1669 - [ sp:varName "piWhole"^^xsd:string 1666 + [ sp:varName "volumePredicate"^^xsd:string
1667 + ]
1668 + ] [ rdf:type sp:Bind ;
1669 + sp:expression
1670 + [ rdf:type fn:concat ;
1671 + sp:arg1 [ rdf:type spif:decimalFormat ;
1672 + arg:number
1673 + [ sp:varName "volumeValue"^^xsd:string
1674 + ] ;
1675 + arg:pattern "#.##"
1676 + ] ;
1677 + sp:arg2 " " ;
1678 + sp:arg3 [ sp:varName "volumeUnit"^^xsd:string
1679 + ]
1680 + ] ;
1681 + sp:variable
1682 + [ sp:varName "volumeValueString"^^xsd:string
1670 ] 1683 ]
1671 ]) 1684 ])
1672 - ])
1673 - ] ;
1674 - rhspin:tableHeaders ("Material"^^xsd:string "Type"^^xsd:string "Quantity"^^xsd:string "Unit"^^xsd:string "Value"^^xsd:string) .
1675 -
1676 -mpr-tables:ProductionInventoryAll
1677 - rdf:type rhspin:TableTemplate ;
1678 - rdfs:label "Production Inventory"^^xsd:string ;
1679 - rdfs:subClassOf rhspin:MPRGTableTemplates ;
1680 - spin:body
1681 - [ rdf:type sp:Select ;
1682 - sp:resultVariables ([ sp:varName "wholeName"^^xsd:string
1683 - ] [ sp:varName "wholeTypeName"^^xsd:string
1684 - ] [ sp:varName "massValueString"^^xsd:string
1685 - ] [ sp:varName "densityValueString"^^xsd:string
1686 - ]) ;
1687 - sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
1688 - sp:predicate rdf:type ;
1689 - sp:subject
1690 - [ sp:varName "productionReport"^^xsd:string
1691 - ]
1692 - ] [ sp:object
1693 - [ sp:varName "productionReport"^^xsd:string
1694 - ] ;
1695 - sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
1696 - sp:subject
1697 - [ sp:varName "productVolumeReport"^^xsd:string
1698 - ]
1699 - ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
1700 - sp:predicate rdf:type ;
1701 - sp:subject
1702 - [ sp:varName "productVolumeReport"^^xsd:string
1703 - ]
1704 - ] [ sp:object
1705 - [ sp:varName "productionInventorysInPeriod"^^xsd:string
1706 - ] ;
1707 - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
1708 - sp:subject
1709 - [ sp:varName "productVolumeReport"^^xsd:string
1710 - ]
1711 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
1712 - sp:predicate rdf:type ;
1713 - sp:subject
1714 - [ sp:varName "productionInventorysInPeriod"^^xsd:string
1715 - ]
1716 - ] [ sp:object
1717 - [ sp:varName "productionInventoryInPeriod"^^xsd:string
1718 - ] ;
1719 - sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
1720 - sp:subject
1721 - [ sp:varName "productionInventorysInPeriod"^^xsd:string
1722 - ]
1723 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
1724 - sp:predicate rdf:type ;
1725 - sp:subject
1726 - [ sp:varName "productionInventoryInPeriod"^^xsd:string
1727 - ]
1728 - ] [ sp:object
1729 - [ sp:varName "component"^^xsd:string
1730 - ] ;
1731 - sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
1732 - sp:subject
1733 - [ sp:varName "productionInventoryInPeriod"^^xsd:string
1734 - ]
1735 - ] [ sp:object
1736 - [ sp:varName "component"^^xsd:string
1737 - ] ;
1738 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
1739 - sp:subject
1740 - [ sp:varName "monthobject"^^xsd:string
1741 - ]
1742 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ObjectThatLastsOneMonth> ;
1743 - sp:predicate rdf:type ;
1744 - sp:subject
1745 - [ sp:varName "monthobject"^^xsd:string
1746 - ]
1747 - ] [ sp:object
1748 - [ sp:varName "materialInventory"^^xsd:string
1749 - ] ;
1750 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialInInventory> ;
1751 - sp:subject
1752 - [ sp:varName "monthobject"^^xsd:string
1753 - ]
1754 - ] [ sp:object
1755 - [ sp:varName "materialQuantityValue"^^xsd:string
1756 - ] ;
1757 - sp:predicate rdf:type ;
1758 - sp:subject
1759 - [ sp:varName "materialInventory"^^xsd:string
1760 - ]
1761 - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
1762 - sp:predicate rdf:type ;
1763 - sp:subject
1764 - [ sp:varName "materialQuantityValue"^^xsd:string
1765 - ]
1766 - ] [ sp:object
1767 - [ sp:varName "materialValue"^^xsd:string
1768 - ] ;
1769 - sp:predicate
1770 - [ sp:varName "materialProperty"^^xsd:string
1771 - ] ;
1772 - sp:subject
1773 - [ sp:varName "materialQuantityValue"^^xsd:string
1774 - ]
1775 - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Scale> ;
1776 - sp:predicate rdf:type ;
1777 - sp:subject
1778 - [ sp:varName "materialProperty"^^xsd:string
1779 - ]
1780 - ] [ sp:object
1781 - [ sp:varName "materialPropertyName"^^xsd:string
1782 - ] ;
1783 - sp:predicate rdfs:label ;
1784 - sp:subject
1785 - [ sp:varName "materialProperty"^^xsd:string
1786 - ]
1787 - ] [ sp:object
1788 - [ sp:varName "materialQuantity"^^xsd:string
1789 - ] ;
1790 - sp:predicate rdf:type ;
1791 - sp:subject
1792 - [ sp:varName "materialQuantityValue"^^xsd:string
1793 - ]
1794 - ] [ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
1795 - sp:predicate rdf:type ;
1796 - sp:subject
1797 - [ sp:varName "materialQuantity"^^xsd:string
1798 - ]
1799 - ] [ rdf:type sp:Bind ;
1800 - sp:expression
1801 - [ rdf:type fn:concat ;
1802 - sp:arg1 [ rdf:type spif:decimalFormat ;
1803 - arg:number
1804 - [ sp:varName "materialValue"^^xsd:string
1805 - ] ;
1806 - arg:pattern "#.##"
1807 - ] ;
1808 - sp:arg2 " " ;
1809 - sp:arg3 [ sp:varName "materialPropertyName"^^xsd:string
1810 - ]
1811 - ] ;
1812 - sp:variable
1813 - [ sp:varName "massValueString"^^xsd:string
1814 - ]
1815 ] [ rdf:type sp:Optional ; 1685 ] [ rdf:type sp:Optional ;
1816 sp:elements ([ sp:object 1686 sp:elements ([ sp:object
1817 [ sp:varName "materialInventory"^^xsd:string 1687 [ sp:varName "materialInventory"^^xsd:string
1818 ] ; 1688 ] ;
1819 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 1689 sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
1820 sp:subject 1690 sp:subject
1821 - [ sp:varName "stateOfMaterialInventory"^^xsd:string 1691 + [ sp:varName "stateOfMaterialInventoryDensity"^^xsd:string
1822 ] 1692 ]
1823 ] [ sp:object 1693 ] [ sp:object
1824 [ sp:varName "densityQuantityValue"^^xsd:string 1694 [ sp:varName "densityQuantityValue"^^xsd:string
1825 ] ; 1695 ] ;
1826 sp:predicate rdf:type ; 1696 sp:predicate rdf:type ;
1827 sp:subject 1697 sp:subject
1828 - [ sp:varName "stateOfMaterialInventory"^^xsd:string 1698 + [ sp:varName "stateOfMaterialInventoryDensity"^^xsd:string
1829 ] 1699 ]
1830 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ; 1700 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ;
1831 sp:predicate rdf:type ; 1701 sp:predicate rdf:type ;
...@@ -1921,7 +1791,7 @@ mpr-tables:ProductionInventoryAll ...@@ -1921,7 +1791,7 @@ mpr-tables:ProductionInventoryAll
1921 ]) 1791 ])
1922 ]) 1792 ])
1923 ] ; 1793 ] ;
1924 - rhspin:tableHeaders ("Material"^^xsd:string "Material Type"^^xsd:string "Mass"^^xsd:string "Density"^^xsd:string) . 1794 + rhspin:tableHeaders ("Material"^^xsd:string "Material Type"^^xsd:string "Mass"^^xsd:string "Volume"^^xsd:string "Density"^^xsd:string) .
1925 1795
1926 mpr-tables:WellProductionFlows 1796 mpr-tables:WellProductionFlows
1927 rdf:type rhspin:TableTemplate ; 1797 rdf:type rhspin:TableTemplate ;
......
...@@ -179,7 +179,7 @@ OPTIONAL { ...@@ -179,7 +179,7 @@ OPTIONAL {
179 179
180 <mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlowsAll" /> 180 <mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlowsAll" />
181 181
182 - <mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventoryAll" /> 182 + <mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventory" />
183 183
184 184
185 185
......