David Leal

Merge branch 'MPR_2013-07-15'

......@@ -23,19 +23,29 @@
<http://www.epim.no/schemas/mprml/1#Cs_productVolumeFacility>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80000a Find the classes of spatial part that need to be created for the parameter set properties."^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
rdfs:comment "STEP 80003b Create temporal parts of parameterSet facility corresponding to the start and end without duplicates"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "classOfSpatialPart"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "parameterSetRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
sp:subject spin:_this
] [ sp:object spin:_this ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
......@@ -46,28 +56,58 @@
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:subject
[ sp:varName "parameterSetRef"^^xsd:string
[ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "classOfSpatialPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "classOfSpatialPart"^^xsd:string
[ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ;
sp:subject
[ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 0 ;
sp:arg3 [ rdf:type smf:indexOf ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 "$"
]
] ;
sp:variable
[ sp:varName "intervalStart"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ rdf:type afn:substr ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 [ rdf:type smf:indexOf ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 "$"
]
] ;
sp:arg2 1
] ;
sp:variable
[ sp:varName "intervalEnd"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "classOfSpatialPart"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
])
] ;
spin:rule
......@@ -77,22 +117,22 @@
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "classOfSpatialPart"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "startedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "finishedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject _:b1
sp:subject _:b2
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
......@@ -133,128 +173,114 @@
]
])
])
] .
<http://www.epim.no/schemas/mprml/1#Cs_productVolumeParameterSet>
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80002a Create temporal part of parameterSet facility corresponding to the nominal time, if necessary"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject _:b2
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
rdfs:comment "STEP 80000a Find the classes of spatial part that need to be created for the parameter set properties."^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b2
sp:subject
[ sp:varName "classOfSpatialPart"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:where ([ sp:object
[ sp:varName "parameterSetRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
sp:subject spin:_this
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "parameterSetRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTim"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "classOfSpatialPart"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "classOfSpatialPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
])
] ;
] .
<http://www.epim.no/schemas/mprml/1#Cs_productVolumeParameterSet>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80002b Find existing temporal part of parameterSet facility corresponding to the nominal time"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
rdfs:comment "STEP 80000d The whole production facility has the parameterSet property"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "facilityRef"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dTim"^^xsd:string
[ sp:varName "facilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dTim"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "classOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "classOfProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80003a Create list of necessary temporal parts of parameterSet facility corresponding to the start and end"^^xsd:string ;
rdfs:comment "STEP 80003c Assign temporal parts of parameterSet facility to parameter elements"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalString"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
......@@ -270,6 +296,34 @@
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
......@@ -288,33 +342,104 @@
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80003d No temporal part of the parameterSetFacility is required"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80003b Create temporal parts of parameterSet facility corresponding to the start and end without duplicates - moved to a rule on Cs_productVolumeFacility"^^xsd:string ;
sp:templates () ;
sp:where ()
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80004b Measurement qualifier not specified"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#ValidlyMeasuredState> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
[ sp:varName "qualifierRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
sp:subject spin:_this
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "intervalStart"^^xsd:string
] ;
sp:arg2 "$" ;
sp:arg3 [ sp:varName "intervalEnd"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:variable
[ sp:varName "intervalString"^^xsd:string
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
])
] ;
......@@ -322,28 +447,28 @@
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80001a Regularise start and end times - time specified by parameter element"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "start1"^^xsd:string
[ sp:varName "dTimStartString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "start2"^^xsd:string
[ sp:varName "dateStartString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "end1"^^xsd:string
[ sp:varName "dTimEndString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "end2"^^xsd:string
[ sp:varName "dateEndString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject
......@@ -363,6 +488,16 @@
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dTimStart"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dTimStartString"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -372,6 +507,16 @@
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dTimEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dTimEndString"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -381,6 +526,16 @@
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dateStartString"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -390,104 +545,60 @@
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dateEndString"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dTimStart"^^xsd:string
]
] ;
sp:variable
[ sp:varName "start1"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
]
] ;
sp:variable
[ sp:varName "start2"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dTimEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "end1"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "end2"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80003c Assign temporal parts of parameterSet facility to parameter elements"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "parameterRef"^^xsd:string
rdfs:comment "STEP 80005 Assign parameter value"^^xsd:string ;
sp:templates ([ sp:object _:b3 ;
sp:predicate
[ sp:varName "propertyType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object "80003c" ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
[ sp:varName "quantityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
sp:subject _:b3
] [ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
[ sp:varName "measureValue"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalStartString"^^xsd:string
sp:predicate
[ sp:varName "measureScale"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
sp:subject _:b3
]) ;
sp:where ([ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "intervalEndString"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#propertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "propertyType"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#rangeOfPropertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "quantityType"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
......@@ -495,57 +606,120 @@
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
[ sp:varName "measureValueRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#measureValueRef> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "intervalStart"^^xsd:string
]
] [ sp:object
[ sp:varName "measureValue"^^xsd:string
] ;
sp:variable
[ sp:varName "intervalStartString"^^xsd:string
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "measureValueRef"^^xsd:string
]
] [ sp:object
[ sp:varName "measureUomString"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#uom> ;
sp:subject
[ sp:varName "measureValueRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "intervalEnd"^^xsd:string
[ rdf:type ep-mpr-spin-lib:selectQuantityTypeUomScale ;
sp:arg1 [ sp:varName "quantityType"^^xsd:string
] ;
sp:arg2 [ sp:varName "measureUomString"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalEndString"^^xsd:string
[ sp:varName "measureScale"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80006 Set flowing or not-flowing state"^^xsd:string ;
rdfs:comment "STEP 80001c Regularise start and end times - end time inherited from temporal part of production facility"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "flowingStateType"^^xsd:string
[ sp:varName "endString"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "finishedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "endString"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]))
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80006 Set flowing or not-flowing state"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "flowingStateType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
......@@ -576,6 +750,64 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80001b Regularise start and end times - start time inherited from temporal part of production facility"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "startString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "startedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "startString"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]))
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80000c Create the spatial parts that have the parameterSet property"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
......@@ -639,57 +871,79 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80004a Measurement qualifier specified"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ;
rdfs:comment "STEP 80002a Create temporal part of parameterSet facility corresponding to the nominal time, if necessary"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b4
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "qualifierRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "qualifierRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "measuredQualityType"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80001c Regularise start and end times - end time inherited from temporal part of production facility"^^xsd:string ;
rdfs:comment "STEP 80002b Find existing temporal part of parameterSet facility corresponding to the nominal time"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "end"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
......@@ -698,54 +952,40 @@
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "finishedAt"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]))
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
] ;
sp:variable
[ sp:varName "end"^^xsd:string
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80003d No temporal part of the parameterSetFacility is required"^^xsd:string ;
rdfs:comment "STEP 80003a Create list of necessary temporal parts of parameterSet facility corresponding to the start and end"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "intervalString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
......@@ -781,329 +1021,82 @@
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80005 Assign parameter value"^^xsd:string ;
sp:templates ([ sp:object _:b3 ;
sp:predicate
[ sp:varName "propertyType"^^xsd:string
] ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "quantityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object
[ sp:varName "measureValue"^^xsd:string
] ;
sp:predicate
[ sp:varName "measureScale"^^xsd:string
] ;
sp:subject _:b3
]) ;
sp:where ([ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#propertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "propertyType"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#rangeOfPropertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "quantityType"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "measureValueRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#measureValueRef> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "measureValue"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "measureValueRef"^^xsd:string
]
] [ sp:object
[ sp:varName "measureUomString"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#uom> ;
sp:subject
[ sp:varName "measureValueRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectQuantityTypeUomScale ;
sp:arg1 [ sp:varName "quantityType"^^xsd:string
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "intervalStart"^^xsd:string
] ;
sp:arg2 [ sp:varName "measureUomString"^^xsd:string
sp:arg2 "$" ;
sp:arg3 [ sp:varName "intervalEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "measureScale"^^xsd:string
[ sp:varName "intervalString"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80004b Measurement qualifier not specified"^^xsd:string ;
rdfs:comment "STEP 80004a Measurement qualifier specified"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#ValidlyMeasuredState> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "qualifierRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80001b Regularise start and end times - start time inherited from temporal part of production facility"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "start"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "startedAt"^^xsd:string
sp:where ([ sp:object
[ sp:varName "qualifierRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]))
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "start"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80003b Create temporal parts of parameterSet facility corresponding to the start and end without duplicates"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ;
sp:subject
[ sp:varName "parameterSetFacility"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 0 ;
sp:arg3 [ rdf:type smf:indexOf ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 "$"
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "qualifierRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalStart"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ rdf:type afn:substr ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 [ rdf:type smf:indexOf ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 "$"
]
] ;
sp:arg2 1
] ;
sp:variable
[ sp:varName "intervalEnd"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80000d The whole production facility has the parameterSet property"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
sp:subject
[ sp:varName "facilityRef"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "classOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfProductionFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "measuredQualityType"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeParameterSet-v1.1.1>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/unnamed> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> ;
owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/schema/1.0/unnamed> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......