David Price

Merge branch 'master' into drilling-rd-more

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 ;
......
......@@ -2030,25 +2030,173 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
])
] .
<http://www.epim.no/schemas/mprml/1#VolumeFlowRateQualifiedMeasure>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90180b Process flow rate for a flow - status not supplied"^^xsd:string ;
sp:templates ([ sp:object _:b37 ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "flow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#VolumetricFlowRate> ;
sp:predicate rdf:type ;
sp:subject _:b37
] [ sp:object
[ sp:varName "realVolumeFlowRate"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeFlowRateScale"^^xsd:string
] ;
sp:subject _:b37
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#flowRateRef> ;
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
]
] [ sp:object
[ sp:varName "realVolumeFlowRate"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "uomVolumeFlowRate"^^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:selectVolumeFlowRateScale ;
sp:arg1 [ sp:varName "uomVolumeFlowRate"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeFlowRateScale"^^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 90180a Process flow rate for a flow - status supplied"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
sp:predicate rdf:type ;
sp:subject _:b38
] [ sp:object
[ sp:varName "flow"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b38
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b38
] [ sp:object _:b39 ;
sp:predicate rdf:type ;
sp:subject _:b38
] [ sp:object <http://www.reportinghub.no/ep/schema/core#VolumetricFlowRate> ;
sp:predicate rdf:type ;
sp:subject _:b39
] [ sp:object
[ sp:varName "realVolumeFlowRate"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeFlowRateScale"^^xsd:string
] ;
sp:subject _:b39
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#flowRateRef> ;
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
]
] [ sp:object
[ sp:varName "realVolumeFlowRate"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "uomVolumeFlowRate"^^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:selectVolumeFlowRateScale ;
sp:arg1 [ sp:varName "uomVolumeFlowRate"^^xsd:string
]
] ;
sp:variable
[ sp:varName "volumeFlowRateScale"^^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
]
])
] .
<http://www.epim.no/schemas/mprml/1#VolumeMeasure>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90071a Process volume for a quantity of material - creating volume if necessary"^^xsd:string ;
sp:templates ([ sp:object _:b37 ;
sp:templates ([ sp:object _:b40 ;
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 _:b37
sp:subject _:b40
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b37
sp:subject _:b40
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
......@@ -2196,21 +2344,21 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90072b Process volume at standard temperature pressure for a quantity of material"^^xsd:string ;
sp:templates ([ sp:object _:b38 ;
sp:templates ([ sp:object _:b41 ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "stdQuantityOfMaterial"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b38
sp:subject _:b41
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b38
sp:subject _:b41
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeStdTempPresRef> ;
......@@ -2339,19 +2487,19 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90070b Ensure that a quantity of material is derived from the target - flow does not have quantity of material"^^xsd:string ;
sp:templates ([ sp:object _:b39 ;
sp:templates ([ sp:object _:b42 ;
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 _:b39
sp:subject _:b42
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b39
sp:subject _:b42
]) ;
sp:where ([ rdf:type sp:Exists ;
sp:elements ([ rdf:type sp:Union ;
......@@ -2409,22 +2557,22 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
rdfs:comment "STEP 90072a Create a temporal part at standard temperature pressure if necessary"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInAStandardState> ;
sp:predicate rdf:type ;
sp:subject _:b40
sp:subject _:b43
] [ sp:object
[ sp:varName "quantityOfMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b40
sp:subject _:b43
] [ sp:object
[ sp:varName "standardTemperature"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b40
sp:subject _:b43
] [ sp:object
[ sp:varName "standardPressure"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b40
sp:subject _:b43
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#volumeStdTempPresRef> ;
......@@ -2504,50 +2652,54 @@ 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
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b41
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b41
] [ sp:object _:b42 ;
sp:predicate rdf:type ;
sp:subject _:b41
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b42
] [ sp:object
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 _:b42
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
] ;
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 "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
......@@ -2555,12 +2707,12 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "quantityOfMaterialx"^^xsd:string
[ sp:varName "classOfMaterialWithMassCriterion"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ClassOfMaterialWithMassCriterion> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "quantityOfMaterialx"^^xsd:string
[ sp:varName "classOfMaterialWithMassCriterion"^^xsd:string
]
])
] [ sp:object
......@@ -2582,32 +2734,59 @@ 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 ;
sp:predicate rdf:type ;
sp:subject
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 _:b44
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b44
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b44
] [ sp:object _:b45 ;
sp:predicate rdf:type ;
sp:subject _:b44
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b43
sp:subject _:b45
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b43
sp:subject _:b45
]) ;
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,20 +2799,450 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
sp:subject
[ sp:varName "quantityOfMaterial"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "target"^^xsd:string
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "classOfMaterialWithMassCriterion"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ClassOfMaterialWithMassCriterion> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "classOfMaterialWithMassCriterion"^^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 _: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: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 _:b47 ;
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 _:b47
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b47
]) ;
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 "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: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 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
[ 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 _:b48 ;
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 _:b48
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b48
]) ;
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 90172 Process volume at standard conditions for a quantity of material - 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 _:b49
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b49
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInAStandardState> ;
sp:predicate rdf:type ;
sp:subject _:b49
] [ sp:object
[ sp:varName "standardTemperature"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b49
] [ sp:object
[ sp:varName "standardPressure"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b49
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b49
] [ sp:object _:b50 ;
sp:predicate rdf:type ;
sp:subject _:b49
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b50
] [ sp:object
[ sp:varName "realVolume"^^xsd:string
] ;
sp:predicate
[ sp:varName "volumeScale"^^xsd:string
] ;
sp:subject _:b50
]) ;
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
] ;
......@@ -2653,6 +3262,40 @@ except where the quantity of material is derived from a flow"""^^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
]
])
] .
......@@ -2660,21 +3303,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 _:b51 ;
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 _:b51
] [ sp:object
[ sp:varName "realWork"^^xsd:string
] ;
sp:predicate
[ sp:varName "workScale"^^xsd:string
] ;
sp:subject _:b44
sp:subject _:b51
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#workRef> ;
......@@ -2784,19 +3427,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 _:b52 ;
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 _:b52
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b45
sp:subject _:b52
]) ;
sp:where ([ rdf:type sp:Exists ;
sp:elements ([ sp:object spin:_this ;
......