David Leal

Merge branch 'MPR_period_date'

......@@ -22,13 +22,27 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20050 Set the context facility - installation is always specified"^^xsd:string ;
rdfs:comment "STEP 20032 Inherit start dates from the report context if necessary"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "contextFacility"^^xsd:string
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -36,270 +50,192 @@
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStartx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dTimStartx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "contextFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "reportPeriodType"^^xsd:string
] ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject _:b2
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "productionInventoryToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b2
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object
[] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b2
] [ sp:object
[] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b3
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://purl.org/dc/elements/1.1/title> ;
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 "productionReport"^^xsd:string
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "periodKindRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#periodKindRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectReportPeriodType ;
sp:arg1 [ sp:varName "periodKindRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportPeriodType"^^xsd:string
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate rdf:type ;
rdfs:comment """STEP 20060 Set the facility operator
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReportKind> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdfs:subClassOf ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
sp:subject _:b1
] [ sp:object
[ sp:varName "kind"^^xsd:string
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "kind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportKind"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20011 Create the period ProductionFlow and the ProductionFlowToDate - if necessary ."^^xsd:string ;
sp:templates ([ sp:object _:b4 ;
sp:templates ([ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject _:b4
sp:subject _:b2
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b4
] [ sp:object _:b5 ;
sp:subject _:b2
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object _:b4 ;
sp:subject _:b3
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object _:b5 ;
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
......@@ -310,6 +246,11 @@
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
......@@ -360,170 +301,239 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20012 Create the period ProductionInventory and the ProductionInventoryToDate - if necessary ."^^xsd:string ;
sp:templates ([ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
rdfs:comment "STEP 20050 Set the context facility - installation is always specified"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "contextFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject _:b6
] [ sp:object
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b6
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b6
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject _:b7
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityRef"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b6
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "flowRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b6
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b6
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "contextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20033 Inherit end dates from the report context if necessary"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "productionFlowToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20030 Record the start and end date-times"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dTimStart"^^xsd:string
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEndx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dTimEndx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "productionInventoryToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
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 "dTimEnd"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReportKind> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdfs:subClassOf ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "reportKind"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -534,69 +544,100 @@
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "kind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20040 Set the production facility - supplied"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "normalizedProductionFacilityName"^^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#hasDerivedText> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionInventoryToDate"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
......@@ -622,201 +663,195 @@
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
] ;
sp:variable
[ sp:varName "normalizedProductionFacilityName"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20032 Inherit start dates from the report context if necessary"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "reportPeriodType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStartx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dTimStartx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
sp:subject _:b4
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:subject _:b4
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
sp:subject _:b5
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b5
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:subject _:b5
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
]
sp:subject _:b6
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://purl.org/dc/elements/1.1/title> ;
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 "productionInventory"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionInventoryToDate"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "nameRef"^^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:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "periodKindRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#periodKindRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectReportPeriodType ;
sp:arg1 [ sp:varName "periodKindRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportPeriodType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20031 Record the start and end dates"^^xsd:string ;
rdfs:comment "STEP 20030 Record the start and end date-times"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
......@@ -834,16 +869,16 @@
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
......@@ -923,7 +958,7 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20040 Set the installation"^^xsd:string ;
rdfs:comment "STEP 20041 Set the production facility - taken from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
......@@ -938,80 +973,48 @@
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "normalizedProductionFacilityName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^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:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "normalizedProductionFacilityName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20060 Set the facility operator
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b8
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b8
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "installationRefx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
......@@ -1024,31 +1027,31 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "operator"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20033 Inherit end dates from the report context if necessary"^^xsd:string ;
rdfs:comment "STEP 20031 Record the start and end dates"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
......@@ -1063,6 +1066,13 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productionFlowToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
......@@ -1077,6 +1087,13 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
......@@ -1096,39 +1113,25 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEndx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dTimEndx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
......@@ -1202,6 +1205,97 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20012 Create the period ProductionInventory and the ProductionInventoryToDate - if necessary ."^^xsd:string ;
sp:templates ([ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject _:b7
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b7
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b7
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate rdf:type ;
sp:subject _:b8
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^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 "productionFacilityToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0>
......
......@@ -20,7 +20,7 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from productVolume/installation where the installation is a field"^^xsd:string ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the report name from context/contextFacility"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
......@@ -38,48 +38,36 @@
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "installation"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
sp:arg1 [ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
[ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
......@@ -91,14 +79,14 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ;
rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject spin:_this
......@@ -119,12 +107,21 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
......@@ -135,7 +132,7 @@
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
sp:arg1 [ sp:varName "date"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
......@@ -203,14 +200,22 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10010 Add the contextFacility"^^xsd:string ;
rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "contextFacility"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
......@@ -223,58 +228,110 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contectFacilityRef"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001z Add the issue date and title"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "contextFacility"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#month> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "titleRef"^^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:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10020 Add the operator"^^xsd:string ;
rdfs:comment "STEP 10001r Set the submitting installation"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "operator"^^xsd:string
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
......@@ -284,57 +341,104 @@
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "operator"^^xsd:string
[ sp:varName "installation"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001n Create the ProductionReport - extract the report name from the reporting from the reporting installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "contextRef"^^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:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001q Set the submitting installation"^^xsd:string ;
rdfs:comment "STEP 10020 Add the operator"^^xsd:string ;
sp:templates ([ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "installation"^^xsd:string
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
......@@ -344,49 +448,54 @@
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "installation"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
sp:templates ([ sp:object "noDate" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object
......@@ -399,13 +508,15 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
......@@ -428,21 +539,21 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject spin:_this
rdfs:comment "STEP 10001o Set the default production facility from context/contextFacility"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "normalizedProductionFacilityName"^^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#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object
......@@ -456,57 +567,40 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "date"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "date"^^xsd:string
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
[ sp:varName "normalizedProductionFacilityName"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001z Add the issue date and title"^^xsd:string ;
rdfs:comment "STEP 10010 Add the contextFacility - unless the contextFacility is the production facility"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
[ sp:varName "contextFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -519,29 +613,25 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#month> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "contextFacility"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
[ sp:varName "contextFacility"^^xsd:string
]
])
] [ sp:object spin:_this ;
......@@ -549,217 +639,91 @@
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001o Create the ProductionReport - unable to find a name"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^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/report#reportSubmittedBy> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRefx"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRefx"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 "installation-not-specified" ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionReport"^^xsd:string
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
sp:templates ([ sp:object "noDate" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001p Create the ProductionReport - check that different installations are not specified"^^xsd:string ;
sp:templates ([ sp:object "Error - different installations specified for different parts of the same report" ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalStart> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalEnd> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRefx"^^xsd:string
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "installationRefx"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "installation"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRefx"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "installation"^^xsd:string
]
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001n Create the ProductionReport - extract the name from productionOperation/installation where the installation is a field"^^xsd:string ;
rdfs:comment "STEP 10001p Create the ProductionReport - unable to find an identifier"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
......@@ -776,74 +740,50 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRefx"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRefx"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "reportingFacility"^^xsd:string
]
])
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "installation"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg1 "" ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
] ;
......@@ -855,5 +795,5 @@
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> ;
owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......