David Leal

Merge branch 'MPR_2013-07-09a'

......@@ -15,7 +15,7 @@
<http://www.reportinghub.no/ep/transform/transform-helper-schema>
rdf:type owl:Ontology ;
rdfs:comment "The Transform Helper Schema is the set of properties and classes used for the creation of temporary data used as part of the ERH transformations. All instances of classes and uses of these properties is deleted before the triples are stored in the RDF database."^^xsd:string ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.epim.no/schemas/mprml/1> ;
owl:imports <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://spinrdf.org/spin> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
transhelp:buildRdlURI
......@@ -44,15 +44,15 @@ transhelp:derivedFrom
rdf:type owl:ObjectProperty .
transhelp:domainOfPropertyMapsToMPREnumeration
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdfs:label "domain of property maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:facilityIdentifier
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:flowingStateMapsToMPREnumeration
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "flowing state maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
......@@ -71,43 +71,46 @@ transhelp:hasEquivalentInRDL
rdfs:label "has equivalent in RDL"^^xsd:string .
transhelp:interval
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalEnd
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalIdentifier
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalStart
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:label
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:mapsTo
rdf:type rdf:Property .
transhelp:materialClassMapsToMPREnumeration
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "material class maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:necessaryIntervalString
rdf:type owl:DatatypeProperty .
transhelp:nominalInstant
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:propertyMapsToMPREnumeration
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "property maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:quantitySpaceMapsToClassOfScale
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "quantity space maps to class of scale"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:rangeOfPropertyMapsToMPREnumeration
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdfs:label "range of property maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
......
......@@ -6,134 +6,582 @@
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeParameterSet-v1.1.1#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix smf: <http://topbraid.org/sparqlmotionfunctions#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix unnamed: <http://www.reportinghub.no/ep/schema/1.0/unnamed#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.epim.no/schemas/mprml/1#Cs_productVolumeParameterSet>
<http://www.epim.no/schemas/mprml/1#Cs_productVolumeFacility>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80004 Set flowing or not-flowing state"^^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
[ 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 <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
[ sp:varName "parameterSetRef"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "classOfSpatialPart"^^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
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80000b Create the spatial parts for the parameter set properties."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "flowingStateType"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "classOfSpatialPart"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "startedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "finishedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
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 "classOfSpatialPart"^^xsd:string
]
] [ sp:object owl:Class ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "classOfSpatialPart"^^xsd:string
]
] [ sp:object spin:_this ;
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
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "startedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "finishedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
])
] .
<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
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b2
]) ;
sp:where ([ sp:object
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 "dTim"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:subject
[ 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/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
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 80002b Find existing temporal part of parameterSet facility corresponding to the nominal time"^^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 "temporalPartOfASpatialPart"^^xsd:string
[ 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 "nameRef"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#flowingStateMapsToMPREnumeration> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:subject
[ sp:varName "flowingStateType"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
]
] [ 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 80002a Measurement qualifier specified"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ;
sp:predicate rdf:type ;
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 "intervalString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ;
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 "temporalPart"^^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 "temporalPart"^^xsd:string
[ 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
]
] [ 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 fn:concat ;
sp:arg1 [ sp:varName "intervalStart"^^xsd:string
] ;
sp:arg2 "$" ;
sp:arg3 [ sp:varName "intervalEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalString"^^xsd:string
]
])
] ;
spin:rule
[ 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: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: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: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:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "qualifierRef"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ rdf:type sp:Optional ;
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
]
])
] [ rdf:type sp:Optional ;
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
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ 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:Optional ;
sp:elements ([ 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 "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
] ;
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:predicate rdf:type ;
sp:subject
[ 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 "intervalStartString"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEndString"^^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> ;
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#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject
[ sp:varName "temporalPart"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "qualifierRef"^^xsd:string
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "intervalStart"^^xsd:string
]
] ;
sp:variable
[ sp:varName "measuredQualityType"^^xsd:string
[ sp:varName "intervalStartString"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "intervalEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalEndString"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80001a Create temporal parts corresponding to the parameter period"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
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 _:b1
] [ sp:object
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "spatialPart"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfSpatialPart"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:subject _:b2
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
[ 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#flowingStateMapsToMPREnumeration> ;
sp:subject
[ sp:varName "flowingStateType"^^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> ;
sp:subject _:b2
sp:subject
[ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterSetRef> ;
......@@ -152,10 +600,19 @@
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:subject
[ sp:varName "spatialPart"^^xsd:string
[ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfSpatialPart"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "spatialPartOfATemporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
......@@ -169,38 +626,95 @@
sp:subject
[ sp:varName "classOfSpatialPart"^^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
[ 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> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "measuredQualityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "parameterFacility"^^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
] [ rdf:type sp:Exists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object
[ sp:varName "dTim"^^xsd:string
] [ sp:object
[ sp:varName "parameterRef"^^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 "parameterFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
sp:arg1 [ sp:varName "qualifierRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:variable
[ sp:varName "measuredQualityType"^^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 ;
sp:templates ([ sp:object
[ sp:varName "end"^^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 "dTimEnd"^^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 "finishedAt"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dateStart"^^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#dateStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
......@@ -213,79 +727,85 @@
]
]))
])
] [ 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 "end"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80001c No temporal part corresponding to the parameter period is necessary"^^xsd:string ;
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 "spatialPart"^^xsd:string
[ 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 "spatialPart"^^xsd:string
[ 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
] [ rdf:type sp:NotExists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object
[ sp:varName "dTim"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dTimStart"^^xsd:string
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
]) ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
]))
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80003 Assign parameter value"^^xsd:string ;
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 "temporalPart"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "quantityType"^^xsd:string
......@@ -329,7 +849,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPart"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "measureValueRef"^^xsd:string
......@@ -367,224 +887,218 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80000 Create the object that has the parameterSet property - either for all of its life or for a temporal part"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "classOfSpatialPart"^^xsd:string
] ;
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 _:b4
] [ sp:object spin:_this ;
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.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:varName "parameterFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/core#ValidlyMeasuredState> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ 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 "nameRef"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#parameterRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "classOfSpatialPart"^^xsd:string
[ sp:varName "parameterFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80001b Set the times for the temporal part corresponding to the parameter period"^^xsd:string ;
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 "dTim"^^xsd:string
[ sp:varName "start"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "startedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^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.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
[ sp:varName "parameterRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTim"^^xsd:string
]) ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ 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:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^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 "dateStart"^^xsd:string
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
sp:subject _:b4
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
sp:subject _:b4
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
]) ;
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
] ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "classOfParameterSetFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#spatialPartOf> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfASpatialPart"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "dTim"^^xsd:string
] [ sp:object
[ sp:varName "intervalString"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTim> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#necessaryIntervalString> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "parameterSetFacility"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "dTimStart"^^xsd:string
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
sp:arg2 0 ;
sp:arg3 [ rdf:type smf:indexOf ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 "$"
]
])
] [ rdf:type sp:Optional ;
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:variable
[ sp:varName "intervalStart"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^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:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
sp:arg2 [ rdf:type smf:indexOf ;
sp:arg1 [ sp:varName "intervalString"^^xsd:string
] ;
sp:arg2 "$"
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "parameterRef"^^xsd:string
sp:arg2 1
] ;
sp:variable
[ sp:varName "intervalEnd"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 80002b Measurement qualifier not specified"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/core#MeasuredState> ;
sp:predicate rdf:type ;
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 "temporalPart"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#ValidlyMeasuredState> ;
]) ;
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 "temporalPart"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "qualifierRef"^^xsd:string
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#qualifierRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject spin:_this
])
] [ 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.reportinghub.no/ep/transform/transform-helper-schema#domainOfPropertyMapsToMPREnumeration> ;
sp:subject
[ sp:varName "classOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "parameterRef"^^xsd:string
[ sp:varName "classOfProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPart"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] .
......