David Leal

Improvement to approval processing

# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-approval-v1.1.1
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/schema/1.0/production-activity
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-approval-v1.1.1#> .
@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 sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.epim.no/schemas/mprml/1#Cs_businessAssociate>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90200 Set the approver"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#approver> ;
sp:subject
[ sp:varName "approveReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonOrOrganization> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "approver"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#approverRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "report"^^xsd:string
]
] [ sp:object
[ sp:varName "report"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#approvedReport> ;
sp:subject
[ sp:varName "approveReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#ApproveAReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "approveReport"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "approver"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-approval-v1.1.1>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
@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 visual: <http://topbraid.org/visual#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
composite:index "0"^^xsd:int
] .
......@@ -3,6 +3,7 @@
# imports: http://www.reportinghub.no/ep/transform/1.0/mpr/injectionTestResults
# imports: http://www.reportinghub.no/ep/transform/1.0/mpr/productionTestResults
# imports: http://www.reportinghub.no/ep/transform/1.0/mpr/wellTest
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-approval-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-comment-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-commonPropertiesProductVolume-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1
......@@ -20,6 +21,7 @@
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector#> .
@prefix TRANSFORM_mpr-approval-v1.1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-approval-v1.1.1#> .
@prefix TRANSFORM_mpr-comment-v1.1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-comment-v1.1.1#> .
@prefix TRANSFORM_mpr-facility-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facility-v1.0#> .
@prefix TRANSFORM_mpr-facilityIdentifierStructure-v1.1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1#> .
......@@ -48,5 +50,5 @@
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionOperationReport-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionActivity-v1.1.1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/1.0/mpr/wellTest> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-comment-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/injectionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-weather-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/productionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-operationalHSEReport-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-commonPropertiesProductVolume-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-installationReport-v1.1.1> ;
owl:imports <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionOperationReport-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionActivity-v1.1.1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/1.0/mpr/wellTest> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-comment-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-approval-v1.1.1> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/injectionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-weather-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/productionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-commonPropertiesProductVolume-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-operationalHSEReport-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-installationReport-v1.1.1> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
......@@ -22,6 +22,271 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 40010 Create the ProductionOperationReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationReport> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/report#Report> ;
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 "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "reportPeriodType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "productionOperationRef"^^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:predicate rdf:type ;
sp:subject _:b3
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#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:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ 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 "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "nameRef"^^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 "productionOperationRef"^^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 "productionOperationRef"^^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 40030 Record the start and end date-times"^^xsd:string ;
sp:templates ([ 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:object
[ 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 "dTimEnd"^^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 "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 "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperationRef"^^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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 40040 Set the installation"^^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 "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
]) ;
sp:where ([ 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
[ 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:object
[ sp:varName "productionOperationRef"^^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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 40020 Add the report kind ."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
......@@ -109,17 +374,21 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 40040 Set the installation"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "productionFacility"^^xsd:string
rdfs:comment "STEP 40051 Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object
[ sp:varName "contextFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b4
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
......@@ -135,22 +404,38 @@
sp:subject
[ sp:varName "productionOperationRef"^^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 "productionOperationRef"^^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:object
[ sp:varName "installationRef"^^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 "productionOperationRef"^^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:subject
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "contextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
......@@ -166,32 +451,86 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ 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 40070 Create an approve a report activity"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/activity#ApproveAReport> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "productionOperationReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#approvedReport> ;
sp:subject _:b5
]) ;
sp:where ([ 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 "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionOperationReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/report#Report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "productionOperationReport"^^xsd:string
]
] [ rdf:type sp:Exists ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object
[ sp:varName "approvalDate"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#approvalDate> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
]) ([ sp:object
[ sp:varName "approverRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#approverRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
]))
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 40060 Set the facility operator
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:templates ([ sp:object _:b6 ;
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 _:b1
sp:subject _:b6
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
sp:subject _:b6
]) ;
sp:where ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
......@@ -284,27 +623,14 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 40030 Record the start and end date-times"^^xsd:string ;
rdfs:comment """STEP 40071 Set the approval date
The approver is set by STEP 90200 in the approval transform"""^^xsd:string ;
sp:templates ([ 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:object
[ 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 "dTimEnd"^^xsd:string
[ sp:varName "approvalDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "approveProductionOperationReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -318,42 +644,35 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "productionOperationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/report#Report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "productionOperationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "productionOperationReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#approvedReport> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "approveProductionOperationReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#ApproveAReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "approveProductionOperationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "approvalDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#approvalDate> ;
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
[ sp:varName "productionOperationRef"^^xsd:string
]
])
] ;
......@@ -431,208 +750,6 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 40051 Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "contextFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b2
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
]) ;
sp:where ([ 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
]
] [ 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 "productionOperationRef"^^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:object
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^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
]
] [ 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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 40010 Create the ProductionOperationReport; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationReport> ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject _:b3
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b3
] [ sp:object
[ sp:varName "reportPeriodType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b3
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b4
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#title> ;
sp:subject _:b3
]) ;
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 "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 "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "nameRef"^^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 "productionOperationRef"^^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 "productionOperationRef"^^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
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionOperationReport-v1.1.1>
......