David Price

Working dpr2

......@@ -3114,6 +3114,293 @@ dpr-tables:ProductFlowsOther
] ;
rhspin:tableHeaders ("Field"^^xsd:string "Facility Name"^^xsd:string "Flow Purpose"^^xsd:string "Flow Definition"^^xsd:string "Material"^^xsd:string "Flow Density"^^xsd:string "Flow Temperature"^^xsd:string "Flow Pressure"^^xsd:string) .
dpr-tables:ProductionFlows
rdf:type rhspin:TableTemplate ;
rdfs:label "Production Flows New"^^xsd:string ;
rdfs:subClassOf rhspin:DPRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy ([ sp:varName "facilityName"^^xsd:string
] [ sp:varName "purposeTypeName"^^xsd:string
] [ sp:varName "materialTypeName"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "facilityName"^^xsd:string
] [ sp:varName "purposeTypeName"^^xsd:string
] [ sp:varName "materialTypeName"^^xsd:string
] [ sp:varName "massValueString"^^xsd:string
] [ sp:varName "volumeValueString"^^xsd:string
] [ sp:varName "densityValueString"^^xsd:string
] [ sp:varName "definitionTypeName"^^xsd:string
] [ sp:varName "grossOrNet"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "productionFlowInReportingPeriod"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportsOnFlow> ;
sp:subject
[ sp:varName "report"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowWhole"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlowInReportingPeriod"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductionFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/data/erh>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
sp:arg1 [ sp:varName "productionFlowFacility"^^xsd:string
]
] ;
sp:variable
[ sp:varName "facilityName"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowMixedPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasMixedPart> ;
sp:subject
[ sp:varName "productionFlowInReportingPeriod"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:subject
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
]
] [ sp:object
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "materialMass"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Mass> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialMass"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ;
sp:arg1 [ sp:varName "materialMass"^^xsd:string
]
] ;
sp:variable
[ sp:varName "massValueString"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "stateOfMaterialThatFlowsInPeriodVolume"^^xsd:string
]
] [ sp:object
[ sp:varName "stateVolume"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "stateOfMaterialThatFlowsInPeriodVolume"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "stateVolume"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ;
sp:arg1 [ sp:varName "stateVolume"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeValueString"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "stateOfMaterialThatFlowsInPeriodDensity"^^xsd:string
]
] [ sp:object
[ sp:varName "stateDensity"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "stateOfMaterialThatFlowsInPeriodDensity"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "stateDensity"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizePropertyUnitAndValue ;
sp:arg1 [ sp:varName "stateDensity"^^xsd:string
]
] ;
sp:variable
[ sp:varName "densityValueString"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productFlowWhole"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowWhole"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "productionFlowPurposeType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/data/erh>
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowPurposeType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowPurposeType"^^xsd:string
]
] [ sp:object
[ sp:varName "purposeTypeName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "productionFlowPurposeType"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "productionFlowPartGrossOrNetType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowWhole"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlowGrossOrNetType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowPartGrossOrNetType"^^xsd:string
]
] [ sp:object
[ sp:varName "grossOrNet"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "productionFlowPartGrossOrNetType"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "productFlowMaterialType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowWhole"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#ReportingProductType> ;
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 ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "productionFlowDefinitionType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/data/erh>
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowDefinitionType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowDefinitionType"^^xsd:string
]
] [ sp:object
[ sp:varName "definitionTypeName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "productionFlowDefinitionType"^^xsd:string
]
])
])
] ;
rhspin:tableHeaders ("Facility"^^xsd:string "Purpose"^^xsd:string "Material"^^xsd:string "Mass"^^xsd:string "Volume"^^xsd:string "Density"^^xsd:string "Flow type"^^xsd:string "Gross/Net"^^xsd:string) .
dpr-tables:ProductionOperationActivity
rdf:type rhspin:TableTemplate ;
rdfs:label "Production Operation Activities"^^xsd:string ;
......@@ -4204,30 +4491,32 @@ dpr-tables:ProductionVolumes
sp:subject
[ sp:varName "flow"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductionFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "flowWhole"^^xsd:string
]
] [ sp:object
[ sp:varName "flowInOutFacility"^^xsd:string
] [ rdf:type sp:Optional ;
sp:elements ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductionFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "flowWhole"^^xsd:string
]
] [ sp:object
[ sp:varName "flowInOutFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
sp:subject
[ sp:varName "flowWhole"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/data/erh>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
sp:arg1 [ sp:varName "flowInOutFacility"^^xsd:string
]
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
sp:subject
[ sp:varName "flowWhole"^^xsd:string
sp:variable
[ sp:varName "flowInOutFacilityName"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/data/erh>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
sp:arg1 [ sp:varName "productionFloflowInOutFacilitywFacility"^^xsd:string
]
] ;
sp:variable
[ sp:varName "flowInOutFacilityName"^^xsd:string
]
])
] [ sp:object
[ sp:varName "flowPurpose"^^xsd:string
] ;
......
......@@ -35,16 +35,14 @@
sp:subject spin:_arg1
]) ;
sp:graphNameNode <http://www.reportinghub.no/data/erh>
] [ rdf:type sp:TriplePath ;
sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:path [ rdf:type sp:AltPath ;
sp:path1 <http://www.reportinghub.no/np/schema/npd#name> ;
sp:path2 <http://www.reportinghub.no/ep/schema/core#name>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectNPDorERHorEPName ;
sp:arg1 [ sp:varName "productionFlowFacility"^^xsd:string
]
] ;
sp:subject
[ sp:varName "productionFlowFacility"^^xsd:string
sp:variable
[ sp:varName "name"^^xsd:string
]
])
] ;
......@@ -82,13 +80,16 @@
sp:subject
[ sp:varName "facilityPart"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityWholeName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "facilityWhole"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "facilityWholeName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "facilityWhole"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:constraint
......
......@@ -78,8 +78,8 @@ WHERE {
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationMarineShip" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionVolumes" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionFlows" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionVolumes" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductFlows" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:InjectionVolumes" />
......
# baseURI: http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2-importedfacts.ttl
# imports: http://www.reportinghub.no/data/erh
# imports: http://www.reportinghub.no/np/data/npd
# imports: http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2
@prefix TRYM_DAY_2012-02-28_final-dpr2-importedfacts: <http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2-importedfacts.ttl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2-importedfacts.ttl>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/data/erh> , <http://www.reportinghub.no/np/data/npd> , <http://www.reportinghub.no/test/dpr2/testcase/epim-dpr2/PL147/test-results/TRYM_DAY_2012-02-28_final-dpr2> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .