David Price

Fixed density of productFlow

...@@ -102,6 +102,15 @@ ...@@ -102,6 +102,15 @@
102 102
103 <http://www.reportinghub.no/ep/schema/flow#productFlowDensity> 103 <http://www.reportinghub.no/ep/schema/flow#productFlowDensity>
104 rdf:type spin:MagicProperty , owl:DatatypeProperty ; 104 rdf:type spin:MagicProperty , owl:DatatypeProperty ;
105 + rdfs:comment """SELECT ?densityValueString
106 +WHERE {
107 + ?arg1 ep-flow:materialThatFlows ?productFlowMaterial .
108 + ?productFlowMaterial a ep-material:QuantityOfMaterial .
109 + ?materialWithDensity ep-core:temporalPartOf ?productFlowMaterial .
110 + ?materialWithDensity a ?density .
111 + ?density a ep-core:Density .
112 + BIND (ep-spin-lib:normalizePropertyUnitAndValue(?density) AS ?densityValueString) .
113 +}"""^^xsd:string ;
105 rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ; 114 rdfs:domain <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
106 rdfs:label "product flow density"^^xsd:string ; 115 rdfs:label "product flow density"^^xsd:string ;
107 rdfs:range xsd:string ; 116 rdfs:range xsd:string ;
...@@ -110,29 +119,22 @@ ...@@ -110,29 +119,22 @@
110 [ rdf:type sp:Select ; 119 [ rdf:type sp:Select ;
111 sp:resultVariables ([ sp:varName "densityValueString"^^xsd:string 120 sp:resultVariables ([ sp:varName "densityValueString"^^xsd:string
112 ]) ; 121 ]) ;
113 - sp:where ([ sp:object 122 + sp:where ([ sp:object spin:_arg1 ;
114 - [ sp:varName "productFlowMaterial"^^xsd:string 123 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
115 - ] ;
116 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
117 - sp:subject spin:_arg1
118 - ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
119 - sp:predicate rdf:type ;
120 sp:subject 124 sp:subject
121 - [ sp:varName "productFlowMaterial"^^xsd:string 125 + [ sp:varName "flowWithDensity"^^xsd:string
122 ] 126 ]
123 - ] [ sp:object 127 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
124 - [ sp:varName "productFlowMaterial"^^xsd:string 128 + sp:predicate rdf:type ;
125 - ] ;
126 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
127 sp:subject 129 sp:subject
128 - [ sp:varName "materialWithDensity"^^xsd:string 130 + [ sp:varName "flowWithDensity"^^xsd:string
129 ] 131 ]
130 ] [ sp:object 132 ] [ sp:object
131 [ sp:varName "density"^^xsd:string 133 [ sp:varName "density"^^xsd:string
132 ] ; 134 ] ;
133 sp:predicate rdf:type ; 135 sp:predicate rdf:type ;
134 sp:subject 136 sp:subject
135 - [ sp:varName "materialWithDensity"^^xsd:string 137 + [ sp:varName "flowWithDensity"^^xsd:string
136 ] 138 ]
137 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ; 139 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Density> ;
138 sp:predicate rdf:type ; 140 sp:predicate rdf:type ;
......