David Price

First bit of fix after rework of MPRG transform last week.

......@@ -708,9 +708,6 @@ mpr-tables:GasSales
rdfs:subClassOf rhspin:MPRGTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy ([ sp:varName "facilityName"^^xsd:string
] [ sp:varName "purposeTypeName"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "facilityName"^^xsd:string
] [ sp:varName "purposeTypeName"^^xsd:string
] [ sp:varName "materialTypeName"^^xsd:string
......@@ -740,23 +737,23 @@ mpr-tables:GasSales
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowsInReportingPeriod"^^xsd:string
[ sp:varName "productionFlowNetwork"^^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#ProductionFlow> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowsInReportingPeriod"^^xsd:string
[ sp:varName "productionFlowNetwork"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowInReportingPeriod"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasNetworkPart> ;
sp:subject
[ sp:varName "productionFlowsInReportingPeriod"^^xsd:string
[ sp:varName "productionFlowNetwork"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
......@@ -781,13 +778,6 @@ mpr-tables:GasSales
[ sp:varName "productionFlowWhole"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowMixedPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasMixedPart> ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
......@@ -802,218 +792,36 @@ mpr-tables:GasSales
[ sp:varName "productionFlowFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowMixedPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productFlowPartOfMixedPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowPartOfMixedPart"^^xsd:string
]
] [ sp:object
[ sp:varName "productFlowPartOfMixedPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productFlowInMonth"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#FlowDuringMonth> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowInMonth"^^xsd:string
]
] [ sp:object
[ sp:varName "materialFlowedInMonth"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:subject
[ sp:varName "productFlowInMonth"^^xsd:string
]
] [ sp:object
[ sp:varName "materialFlowedInMonth"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:subject
[ sp:varName "spatialPartOfProductFlowInMonth"^^xsd:string
]
] [ sp:object
[ sp:varName "spatialPartOfProductFlowInMonth"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "movedProduct"^^xsd:string
]
] [ sp:object
[ sp:varName "movedProduct"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#movedProduct> ;
sp:subject
[ sp:varName "productTransaction"^^xsd:string
]
] [ sp:object
[ sp:varName "sellerEnergyQuantity"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "movedProduct"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Work> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "sellerEnergyQuantity"^^xsd:string
]
] [ sp:object
[ sp:varName "sellerEnergyValue"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#megajoule> ;
sp:subject
[ sp:varName "sellerEnergyQuantity"^^xsd:string
]
] [ sp:object
[ sp:varName "movedProduct"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "volumeOfMovedProduct"^^xsd:string
]
] [ sp:object
[ sp:varName "sellerVolumeQuantity"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "volumeOfMovedProduct"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "sellerVolumeQuantity"^^xsd:string
]
] [ sp:object
[ sp:varName "sellerVolumeValue"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#metre3> ;
sp:subject
[ sp:varName "sellerVolumeQuantity"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-activity#ProductTransaction> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productTransaction"^^xsd:string
]
] [ sp:object
[ sp:varName "salesActivity"^^xsd:string
[ sp:varName "productFlowWhole"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasMixedPart> ;
sp:subject
[ sp:varName "productTransaction"^^xsd:string
[ sp:varName "productionFlowWhole"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-activity#SalesActivity> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "salesActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "sellerPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#seller> ;
sp:subject
[ sp:varName "salesActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "seller"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "sellerPart"^^xsd:string
]
] [ sp:object
[ sp:varName "sellerName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "seller"^^xsd:string
[ sp:varName "productFlowWhole"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "buyerPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#buyer> ;
sp:subject
[ sp:varName "salesActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "buyer"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "buyerPart"^^xsd:string
]
] [ sp:object
[ sp:varName "buyerName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "buyer"^^xsd:string
]
] [ sp:object
[ sp:varName "buyerMovedProduct"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#movedProduct> ;
sp:subject
[ sp:varName "salesActivity"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#Fluid> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "buyerMovedProduct"^^xsd:string
]
] [ sp:object
[ sp:varName "buyerEnergyQuantity"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "buyerMovedProduct"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Work> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "buyerEnergyQuantity"^^xsd:string
]
] [ sp:object
[ sp:varName "buyerEnergyValue"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#megajoule> ;
sp:subject
[ sp:varName "buyerEnergyQuantity"^^xsd:string
]
] [ sp:object
[ sp:varName "buyerMovedProduct"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "buyerMovedProductPart"^^xsd:string
]
] [ sp:object
[ sp:varName "buyerVolumeQuantity"^^xsd:string
[ sp:varName "productFlowMaterialType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "buyerMovedProductPart"^^xsd:string
[ sp:varName "productFlowWhole"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductMaterialType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "buyerVolumeQuantity"^^xsd:string
[ sp:varName "productFlowMaterialType"^^xsd:string
]
] [ sp:object
[ sp:varName "buyerVolumeValue"^^xsd:string
[ sp:varName "materialTypeName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#metre3> ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "buyerVolumeQuantity"^^xsd:string
[ sp:varName "productFlowMaterialType"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
......@@ -1039,27 +847,6 @@ mpr-tables:GasSales
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "productFlowMaterialType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductMaterialType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowMaterialType"^^xsd:string
]
] [ sp:object
[ sp:varName "materialTypeName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "productFlowMaterialType"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "productionFlowDefinitionType"^^xsd:string
] ;
sp:predicate rdf:type ;
......
......@@ -7,7 +7,7 @@ WHERE {
?productVolumeReport ep-core:partOf ?report .
?productVolumeReport a ep-report:ProductVolumeReport .
?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod .
?productionFlowsInReportingPeriod a ep-flow:ProductionFlow .
?productionFlowsInReportingPeriod a ep-flow:ProductionFlowNetwork .
?stateOfField ep-flow:facilityContainsFlow ?productionFlowsInReportingPeriod .
?stateOfField ep-core:temporalPartOf ?reportedField .
?reportedField npd:name ?reportedFieldName .
......@@ -30,7 +30,7 @@ let:facilityName="{# SELECT DISTINCT
{
?report a ep-report:ProductionReport .
?report ep-report:reportSubmittedBy ?submittingFieldState .
?report ep-report:reportSubmittedFrom ?submittingFieldState .
?submittingFieldState ep-core:temporalPartOf ?submittingField .
?submittingField npd:name ?submittingFieldName .
......