David Price

Fixed density of productFlow

......@@ -102,6 +102,15 @@
<http://www.reportinghub.no/ep/schema/flow#productFlowDensity>
rdf:type spin:MagicProperty , owl:DatatypeProperty ;
rdfs:comment """SELECT ?densityValueString
WHERE {
?arg1 ep-flow:materialThatFlows ?productFlowMaterial .
?productFlowMaterial a ep-material:QuantityOfMaterial .
?materialWithDensity ep-core:temporalPartOf ?productFlowMaterial .
?materialWithDensity a ?density .
?density a ep-core:Density .
BIND (ep-spin-lib:normalizePropertyUnitAndValue(?density) AS ?densityValueString) .
}"""^^xsd:string ;
rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
rdfs:label "product flow density"^^xsd:string ;
rdfs:range xsd:string ;
......@@ -110,29 +119,22 @@
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "densityValueString"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "productFlowMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:subject spin:_arg1
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:where ([ sp:object spin:_arg1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productFlowMaterial"^^xsd:string
[ sp:varName "flowWithDensity"^^xsd:string
]
] [ sp:object
[ sp:varName "productFlowMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialWithDensity"^^xsd:string
[ sp:varName "flowWithDensity"^^xsd:string
]
] [ sp:object
[ sp:varName "density"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "materialWithDensity"^^xsd:string
[ sp:varName "flowWithDensity"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ;
sp:predicate rdf:type ;
......