David Leal

Added status for volume values, and fixed a welltest report bug.

This diff could not be displayed because it is too large.
......@@ -23,7 +23,7 @@
<http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/spin/1.1/lib> ;
owl:imports <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-mpr-spin-lib:Function
......@@ -2826,6 +2826,79 @@ ep-mpr-spin-lib:selectMassScale
])
] .
ep-mpr-spin-lib:selectMeasuredQualityType
rdf:type spin:Function ;
rdfs:label "select MeasuredQualityType"^^xsd:string ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "measuredQualityType"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_badcalibration>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#MeasuredWithABadlyCalibratedSensor> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_rangelimit>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#MeasuredWithASensorThatIsNearTheLimitOfItsRange> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_questionable>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#QuestionablyMeasured> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_devicefailure>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseOfDeviceFailure> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_sensorfailure>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseOfSensorFailure> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_commfailure>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseOfCommunicationsFailure> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_timeout>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseTheSensorHasNotReturnedDataInTime> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_unknown>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasured> ;
sp:arg3 <http://www.reportinghub.no/ep/schema/core#PhysicalThing>
]
]
]
]
]
]
]
] ;
sp:variable
[ sp:varName "measuredQualityType"^^xsd:string
]
])
] .
ep-mpr-spin-lib:selectMolarVolumeScale
rdf:type spin:Function ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
......
......@@ -2504,19 +2504,32 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
<http://www.epim.no/schemas/mprml/1#VolumeQualifiedMeasure>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90071a Process volume for a flow - creating a quantity of material if necessary"^^xsd:string ;
sp:templates ([ sp:object _:b41 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:subject
[ sp:varName "flow"^^xsd:string
]
rdfs:comment "STEP 90172 Process volume at standard conditions for a quantity of material - status exists - create a new state and volume and associate status with that state"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "quantityOfMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b41
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b41
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInAStandardState> ;
sp:predicate rdf:type ;
sp:subject _:b41
] [ sp:object
[ sp:varName "target"^^xsd:string
[ sp:varName "standardTemperature"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate rdf:type ;
sp:subject _:b41
] [ sp:object
[ sp:varName "standardPressure"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b41
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b41
] [ sp:object _:b42 ;
sp:predicate rdf:type ;
......@@ -2533,34 +2546,335 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
sp:subject _:b42
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeStdRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "standardTempPresRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#standardTempPres> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
])
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "uomVolume"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
sp:arg1 [ sp:varName "uomVolume"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeScale"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "statusRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "statusRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "measuredQualityType"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectStandardTempPres-Temperature ;
sp:arg1 [ sp:varName "standardTempPresRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "standardTemperature"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectStandardTempPres-Pressure ;
sp:arg1 [ sp:varName "standardTempPresRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "standardPressure"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90171c Process volume for a quantity of material - volume for not for a specified state - status exists - create a new state and volume and associate status with that state"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "quantityOfMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b43
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b43
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b43
] [ sp:object _:b44 ;
sp:predicate rdf:type ;
sp:subject _:b43
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b44
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b44
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
sp:subject
[ sp:varName "somethingRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "flow"^^xsd:string
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "flow"^^xsd:string
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "uomVolume"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
sp:arg1 [ sp:varName "uomVolume"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeScale"^^xsd:string
]
] [ sp:object
[ sp:varName "statusRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "statusRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "measuredQualityType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90171b Process volume for a quantity of material - creating volume if necessary - volume for a specified state, so associate status with that state"^^xsd:string ;
sp:templates ([ sp:object _:b45 ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b45
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b45
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
sp:subject
[ sp:varName "somethingRef"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "volume"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "volume"^^xsd:string
]
])
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "uomVolume"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
sp:arg1 [ sp:varName "uomVolume"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeScale"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "statusRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "statusRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "measuredQualityType"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90171e Process volume for a quantity of material - volume for not for a specified state - no status exists - volume does not exist"^^xsd:string ;
sp:templates ([ sp:object _:b46 ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b46
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b46
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
sp:subject
[ sp:varName "quantityOfMaterialx"^^xsd:string
[ sp:varName "somethingRef"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
])
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "volume"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterialx"^^xsd:string
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "volume"^^xsd:string
]
])
] [ sp:object
......@@ -2582,32 +2896,194 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
sp:variable
[ sp:varName "volumeScale"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "statusRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
sp:subject spin:_this
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90070a Process volume for a quantity of material"^^xsd:string ;
sp:templates ([ sp:object _:b43 ;
rdfs:comment "STEP 90171a Process volume for a quantity of material - volume exists - volume for a specified state, so associate status with that state"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject
[ sp:varName "volume"^^xsd:string
]
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
sp:subject
[ sp:varName "somethingRef"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object
[ sp:varName "volume"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b43
sp:subject
[ sp:varName "volume"^^xsd:string
]
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "uomVolume"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
sp:arg1 [ sp:varName "uomVolume"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeScale"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "statusRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "statusRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "measuredQualityType"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90170 Process volume for a flow - creating a quantity of material if necessary"^^xsd:string ;
sp:templates ([ sp:object _:b47 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:subject
[ sp:varName "flow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b47
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b47
]) ;
sp:where ([ rdf:type sp:Exists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
]) ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeStdRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
]))
])
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "flow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "flow"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "quantityOfMaterialx"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterialx"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90171d Process volume for a quantity of material - volume for not for a specified state - no status exists - volume exists"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b43
sp:subject
[ sp:varName "volume"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
sp:subject
[ sp:varName "somethingRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
......@@ -2620,6 +3096,18 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object
[ sp:varName "volume"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "volume"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "target"^^xsd:string
......@@ -2653,6 +3141,13 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
sp:variable
[ sp:varName "volumeScale"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "statusRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
sp:subject spin:_this
])
])
] .
......@@ -2660,21 +3155,21 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90031 Process work for a quantity of material"^^xsd:string ;
sp:templates ([ sp:object _:b44 ;
sp:templates ([ sp:object _:b48 ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Work> ;
sp:predicate rdf:type ;
sp:subject _:b44
sp:subject _:b48
] [ sp:object
[ sp:varName "realWork"^^xsd:string
] ;
sp:predicate
[ sp:varName "workScale"^^xsd:string
] ;
sp:subject _:b44
sp:subject _:b48
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#workRef> ;
......@@ -2784,19 +3279,19 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90030b Ensure that a quantity of material is derived from the target - flow does not have quantity of material"^^xsd:string ;
sp:templates ([ sp:object _:b45 ;
sp:templates ([ sp:object _:b49 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:subject
[ sp:varName "flow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b45
sp:subject _:b49
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b45
sp:subject _:b49
]) ;
sp:where ([ rdf:type sp:Exists ;
sp:elements ([ sp:object spin:_this ;
......