David Price

Flow detail improved in DPR html

......@@ -1893,23 +1893,23 @@ dpr-tables:ProductFlows
[ sp:varName "productFlowWholeLife"^^xsd:string
]
] [ sp:object
[ sp:varName "productMaterialType"^^xsd:string
[ sp:varName "reportingProductType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowWholeLife"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductMaterialType> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/material#ReportingProductType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productMaterialType"^^xsd:string
[ sp:varName "reportingProductType"^^xsd:string
]
] [ sp:object
[ sp:varName "productMaterialName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "productMaterialType"^^xsd:string
[ sp:varName "reportingProductType"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -4149,13 +4149,13 @@ dpr-tables:ProductionVolumes
rdfs:subClassOf rhspin:DPRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy ([ sp:varName "containingWholeFacilityName"^^xsd:string
sp:orderBy ([ sp:varName "containingFacilityName"^^xsd:string
] [ sp:varName "flowInOutFacilityName"^^xsd:string
] [ sp:varName "flowPurposeName"^^xsd:string
] [ sp:varName "flowDefinitionName"^^xsd:string
] [ sp:varName "densityValue"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "containingWholeFacilityName"^^xsd:string
sp:resultVariables ([ sp:varName "containingFacilityName"^^xsd:string
] [ sp:varName "flowInOutFacilityName"^^xsd:string
] [ sp:varName "flowPurposeName"^^xsd:string
] [ sp:varName "flowDefinitionName"^^xsd:string
......@@ -4163,32 +4163,17 @@ dpr-tables:ProductionVolumes
] [ sp:varName "pressureValue"^^xsd:string
] [ sp:varName "temperatureValue"^^xsd:string
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "report"^^xsd:string
]
] [ sp:object
[ sp:varName "report"^^xsd:string
sp:where ([ sp:object
[ sp:varName "productionflownetwork"^^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:predicate <http://www.reportinghub.no/ep/schema/report#reportsOnFlowNetwork> ;
sp:subject
[ sp:varName "productvolumereport"^^xsd:string
[ sp:varName "report"^^xsd:string
]
] [ sp:object
[ sp:varName "productionflownetwork"^^xsd:string
[ sp:varName "containingFacilityName"^^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#ProductionFlowNetwork> ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#networkInFacilityName> ;
sp:subject
[ sp:varName "productionflownetwork"^^xsd:string
]
......@@ -4205,27 +4190,6 @@ dpr-tables:ProductionVolumes
[ sp:varName "flow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionflownetwork"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionflownetworkFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "containingWholeFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionflownetworkFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "containingWholeFacilityName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "containingWholeFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "flowWhole"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
......@@ -4244,38 +4208,16 @@ dpr-tables:ProductionVolumes
sp:subject
[ sp:varName "flowWhole"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "flowInOutFacilityNameNPD"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "flowInOutFacility"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "flowInOutFacilityNameEP"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "flowInOutFacility"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:if ;
sp:arg1 [ rdf:type smf:isBound ;
sp:arg1 [ sp:varName "flowInOutFacilityNameNPD"^^xsd:string
]
] ;
sp:arg2 [ sp:varName "flowInOutFacilityNameNPD"^^xsd:string
] ;
sp:arg3 [ sp:varName "flowInOutFacilityNameEP"^^xsd:string
]
] ;
sp:variable
] [ rdf:type sp:TriplePath ;
sp:object
[ sp:varName "flowInOutFacilityName"^^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>
] ;
sp:subject
[ sp:varName "flowInOutFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "flowPurpose"^^xsd:string
......
......@@ -13,6 +13,49 @@
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/ep/schema/flow#networkInFacilityName>
rdf:type spin:MagicProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork> ;
rdfs:label "report end flow material"^^xsd:string ;
rdfs:range xsd:string ;
rdfs:subClassOf spin:MagicProperties ;
spin:body
[ rdf:type sp:Select ;
sp:distinct "true"^^xsd:boolean ;
sp:resultVariables ([ sp:varName "facilityWholeName"^^xsd:string
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork> ;
sp:predicate rdf:type ;
sp:subject spin:_arg1
] [ sp:object spin:_arg1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "facilityPart"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityWhole"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
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
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "the network"^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork>
] ;
spin:returnType xsd:string .
<http://www.reportinghub.no/ep/schema/flow#reportedFlowMaterial>
rdf:type spin:MagicProperty , owl:ObjectProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
......@@ -136,6 +179,54 @@ ep-report:reportsOnFlow
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> .
ep-report:reportsOnFlowNetwork
rdf:type spin:MagicProperty , owl:ObjectProperty ;
rdfs:domain ep-report:ProductionReport ;
rdfs:label "reports on flow network"^^xsd:string ;
rdfs:range <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork> ;
rdfs:subClassOf spin:MagicProperties ;
spin:body
[ rdf:type sp:Select ;
sp:distinct "true"^^xsd:boolean ;
sp:resultVariables ([ sp:varName "productionFlowNetwork"^^xsd:string
]) ;
sp:where ([ sp:object ep-report:ProductionReport ;
sp:predicate rdf:type ;
sp:subject spin:_arg1
] [ 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 ep-report:ProductVolumeReport ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowNetwork"^^xsd:string
] ;
sp:predicate ep-report:reportOn ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowNetwork"^^xsd:string
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "the report that contains flows"^^xsd:string ;
spl:predicate sp:arg1 ;
spl:valueType ep-report:ProductionReport
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/flow#ProductionFlowNetwork> .
<http://www.reportinghub.no/ep/spin/prod-property>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/erhfacts> , <http://www.reportinghub.no/ep/schema/1.0/production> ;
......