David Leal

More work on MPR - getting the reference to the facility better

# baseURI: http://www.reportinghub.no/ep/schema/1.0/production-equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/production-facility
# imports: http://www.reportinghub.no/ep/schema/1.0/production-organization
@prefix ep-core: <http://www.reportinghub.no/ep/schema/core#> .
@prefix ep-prodeqt: <http://www.reportinghub.no/ep/schema/production-equipment#> .
@prefix ep-prodfac: <http://www.reportinghub.no/ep/schema/production-facility#> .
@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#> .
......@@ -11,9 +13,28 @@
<http://www.reportinghub.no/ep/schema/1.0/production-equipment>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/production-organization> , <http://www.reportinghub.no/ep/schema/1.0/equipment> ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/production-facility> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-organization> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
<http://www.reportinghub.no/ep/schema/equipment#ChokeValve>
rdfs:subClassOf ep-prodeqt:Valve .
<http://www.reportinghub.no/ep/schema/equipment#Controller-lift>
rdfs:subClassOf ep-prodeqt:Controller .
<http://www.reportinghub.no/ep/schema/equipment#Manifold>
rdfs:label "manifold"^^xsd:string .
ep-prodeqt:BlockValve
rdf:type owl:Class ;
rdfs:label "block valve"^^xsd:string ;
rdfs:subClassOf ep-prodeqt:Valve .
ep-prodeqt:Controller
rdf:type ep-prodfac:ProductionFacilityType , owl:Class ;
rdfs:label "controller"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/equipment#Equipment> .
ep-prodeqt:DownHoleControlValve
rdf:type owl:Class ;
rdfs:label "down hole control valve"^^xsd:string ;
......@@ -28,18 +49,43 @@ ep-prodeqt:GasLiftChoke
rdfs:label "gas lift choke"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/equipment#Equipment> .
ep-prodeqt:PressureMeter
rdf:type owl:Class ;
rdfs:label "pressure meter"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/equipment#Equipment> .
ep-prodeqt:RegulatingValve
rdf:type owl:Class ;
rdfs:label "regulating valve"^^xsd:string ;
rdfs:subClassOf ep-prodeqt:Valve .
ep-prodeqt:SleeveValve
rdf:type owl:Class ;
rdfs:label "sleeve valve"^^xsd:string ;
rdfs:subClassOf ep-prodeqt:Valve .
ep-prodeqt:TemperatureMeter
rdf:type owl:Class ;
rdfs:label "temperature meter"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/equipment#Equipment> .
ep-prodeqt:Valve
rdf:type owl:Class ;
rdfs:label "valve"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/equipment#Equipment> .
ep-prodeqt:hasCaptain
rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:label "has captain"^^xsd:string ;
rdfs:range <http://www.reportinghub.no/ep/schema/production-organization#Person> .
ep-prodeqt:hasValvePosition
rdf:type ep-core:Class_of_indirect_property , owl:FunctionalProperty , owl:ObjectProperty ;
rdf:type owl:ObjectProperty , owl:FunctionalProperty , ep-core:Class_of_indirect_property ;
rdfs:domain ep-prodeqt:Valve ;
rdfs:label "has valve position"^^xsd:string ;
rdfs:range ep-core:Ratio .
ep-prodfac:Pipeline
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "pipeline"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Facility> .
......
# baseURI: http://www.reportinghub.no/ep/schema/1.0/production-facility
# imports: http://www.reportinghub.no/ep/schema/1.0/facility
# imports: http://www.reportinghub.no/ep/schema/1.0/organization
# imports: http://www.reportinghub.no/ep/schema/1.0/production-well
@prefix ep-core: <http://www.reportinghub.no/ep/schema/core#> .
@prefix ep-prodfac: <http://www.reportinghub.no/ep/schema/production-facility#> .
......@@ -11,29 +12,139 @@
<http://www.reportinghub.no/ep/schema/1.0/production-facility>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/organization> ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/production-well> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/facility> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
<http://www.reportinghub.no/ep/schema/equipment#ChokeValve>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/equipment#Compressor>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/equipment#Controller-lift>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/equipment#Manifold>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/equipment#Separator>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/equipment#Tank>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#Field>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#Flowline>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#Lease>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#Platform>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#ProductionFacility>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate>
rdf:type owl:Class ;
rdfs:label "production facility to date"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> .
<http://www.reportinghub.no/ep/schema/facility#Reservoir>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#Template>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/facility#facilityOperator>
rdf:type owl:ObjectProperty , owl:FunctionalProperty , ep-core:Class_of_indirect_property ;
rdf:type ep-core:Class_of_indirect_property , owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/facility#Facility> ;
rdfs:label "facility operator"^^xsd:string ;
rdfs:range <http://www.reportinghub.no/ep/schema/organization#Organization> .
<http://www.reportinghub.no/ep/schema/geography#Country>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/geography#State>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/geography#Terminal>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/organization#Company>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-equipment#BlockValve>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-equipment#FlowMeter>
rdf:type ep-prodfac:ProductionFacilityType ;
rdfs:label "flow meter"^^xsd:string .
<http://www.reportinghub.no/ep/schema/production-equipment#PressureMeter>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-equipment#RegulatingValve>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-equipment#SleeveValve>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-equipment#TemperatureMeter>
rdf:type ep-prodfac:ProductionFacilityType .
ep-prodfac:Boat
rdf:type owl:Class ;
rdfs:subClassOf ep-prodfac:ShipOrBoat .
ep-prodfac:Field-area
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "field - area"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Field> .
ep-prodfac:Field-group
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "field - group"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Field> .
ep-prodfac:Field-part
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "field - part"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Field> .
ep-prodfac:Installation
rdf:type ep-prodfac:ProductionFacilityType , owl:Class ;
rdfs:label "installation"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Facility> .
ep-prodfac:OilTanker
rdf:type owl:Class ;
rdfs:label "oil tanker"^^xsd:string ;
rdfs:subClassOf ep-prodfac:Ship .
ep-prodfac:Plant
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "plant"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Facility> .
ep-prodfac:Plant-processing
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "plant - processing"^^xsd:string ;
rdfs:subClassOf ep-prodfac:Plant .
ep-prodfac:ProcessingFacility
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "processing facility"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Facility> .
ep-prodfac:ProductionFacilityType
rdf:type rdfs:Class ;
rdfs:label "production facility type"^^xsd:string ;
rdfs:subClassOf owl:Class .
ep-prodfac:Ship
rdf:type owl:Class ;
rdfs:label "Ship"^^xsd:string ;
......@@ -43,6 +154,11 @@ ep-prodfac:ShipOrBoat
rdf:type owl:Class ;
rdfs:subClassOf ep-prodfac:TemporalPartOfAShipOrBoat .
ep-prodfac:StorageFacility
rdf:type owl:Class , ep-prodfac:ProductionFacilityType ;
rdfs:label "storage facility"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Facility> .
ep-prodfac:SupplyShip
rdf:type owl:Class ;
rdfs:label "supply ship"^^xsd:string ;
......@@ -52,6 +168,11 @@ ep-prodfac:TemporalPartOfAShipOrBoat
rdf:type owl:Class ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Facility> .
ep-prodfac:TrunkLine
rdf:type ep-prodfac:ProductionFacilityType , owl:Class ;
rdfs:label "trunk line"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/facility#Facility> .
ep-prodfac:numberOfBedsAvailable
rdf:type owl:DatatypeProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/facility#Facility> ;
......@@ -96,3 +217,31 @@ ep-prodfac:numberOfPersonnelOnBoard
rdf:type owl:DatatypeProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/facility#Facility> ;
rdfs:range xsd:integer .
<http://www.reportinghub.no/ep/schema/production-organization#CommercialEntity>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-well#RockFormation>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-well#TubingHead>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/production-well#WellCompletion>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/well#Well>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/well#WellBore>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/well#WellGroup>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/ep/schema/well#WellHead>
rdf:type ep-prodfac:ProductionFacilityType .
<http://www.reportinghub.no/np/schema/npd#Licence>
rdf:type ep-prodfac:ProductionFacilityType ;
rdfs:label "licence"^^xsd:string .
......
......@@ -12,6 +12,14 @@
owl:imports <http://www.reportinghub.no/ep/schema/1.0/organization> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
<http://www.reportinghub.no/ep/schema/organization#Organization>
rdfs:subClassOf ep-prodorg:PersonOrOrganization .
ep-prodorg:CommercialEntity
rdf:type owl:Class ;
rdfs:label "commercial entity"^^xsd:string ;
rdfs:subClassOf ep-prodorg:PersonOrOrganization .
ep-prodorg:Person
rdf:type owl:Class ;
rdfs:subClassOf ep-prodorg:PersonOrOrganization .
......
......@@ -112,6 +112,11 @@ ep-prodwell:PureFluid
rdfs:label "pure fluid"^^xsd:string ;
rdfs:subClassOf ep-material:Fluid .
ep-prodwell:RockFormation
rdf:type owl:Class ;
rdfs:label "rock formation"^^xsd:string ;
rdfs:subClassOf ep-core:PhysicalObject .
ep-prodwell:SplitFraction
rdf:type ep-prodwell:FluidComponentKindType , owl:Class ;
rdfs:label "split fraction"^^xsd:string ;
......@@ -127,11 +132,21 @@ ep-prodwell:TemporalPartOfASpatialPartOfAWellBore
rdfs:label "temporal part of a spatial part of a wellbore"^^xsd:string ;
rdfs:subClassOf ep-well:TemporalPartOfAWellBore .
ep-prodwell:TubingHead
rdf:type owl:Class ;
rdfs:label "tubing head"^^xsd:string ;
rdfs:subClassOf ep-well:SpatialPartOfAWell .
ep-prodwell:UnknownFluid
rdf:type ep-well:FluidComponentType , owl:Class , ep-prodwell:InjectionFluidType ;
rdfs:label "unknown fluid"^^xsd:string ;
rdfs:subClassOf ep-material:Fluid .
ep-prodwell:WellCompletion
rdf:type owl:Class ;
rdfs:label "well completion"^^xsd:string ;
rdfs:subClassOf ep-well:SpatialPartOfAWellBore .
ep-prodwell:completeLiquidPartOf
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:domain ep-material:QuantityOfMaterial ;
......
......@@ -4125,7 +4125,7 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_blockvalve>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#BlockValve> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-equipment#BlockValve> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4149,7 +4149,7 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_commercialentity>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/organization#CommercialEntity> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-organization#CommercialEntity> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4161,7 +4161,7 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_completion>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#Completion> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-well#WellCompletion> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4179,7 +4179,7 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_controller>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Controller> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-equipment#Controller> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4197,19 +4197,19 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_field-area>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Field-area> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#Field-area> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_field-group>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Field-group> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#Field-group> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_field-part>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Field-part> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#Field-part> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4233,13 +4233,13 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_formation>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#Formation> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-well#RockFormation> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_installation>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Installation> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#Installation> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4251,31 +4251,31 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_licence>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Licence> ;
sp:arg2 <http://www.reportinghub.no/np/schema/npd#Licence> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_manifold>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Manifold> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Manifold> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_pipeline>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Pipeline> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#Pipeline> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_plant-processing>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Plant-processing> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#Plant-processing> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_plant>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Plant> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#Plant> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4287,19 +4287,19 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_pressuremeter>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#PressureMeter> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-equipment#PressureMeter> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_processingfacility>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#ProcessingFacility> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#ProcessingFacility> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_regulatingvalve>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#RegulatingValve> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-equipment#RegulatingValve> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4317,7 +4317,7 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_sleevevalve>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#SleeveValve> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-equipment#SleeveValve> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4329,7 +4329,7 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_storage>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Storage> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#StorageFacility> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......@@ -4341,31 +4341,31 @@ ep-mpr-spin-lib:selectProductionFacilityType
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_temperaturemeter>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#TemperatureMeter> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-equipment#TemperatureMeter> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_template>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Template> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Template> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_terminal>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Terminal> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_trunkline>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#TrunkLine> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-facility#TrunkLine> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.epim.no/schemas/mprml/1#RF_tubinghead>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#TubingHead> ;
sp:arg2 <http://www.reportinghub.no/ep/schema/production-well#TubingHead> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
......
......@@ -4,6 +4,7 @@
# 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-commonPropertiesProductVolume-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0
......@@ -11,6 +12,7 @@
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector#> .
@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#> .
@prefix TRANSFORM_mpr-fluidSample-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0#> .
@prefix TRANSFORM_mpr-productVolume-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0#> .
@prefix TRANSFORM_mpr-productVolumeReport-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0#> .
......@@ -32,5 +34,5 @@
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/1.0/mpr/wellTest> , <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-productVolume-v1.0> , <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-commonPropertiesProductVolume-v1.1.1> ;
owl:imports <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-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-productionReport-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/injectionTestResults> , <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-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> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/mpr/spin/1.1/lib
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-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#FacilityIdentifierStruct>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc.
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00009 Record the Facility that has the flows - kind is \"licence\"
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "licence"^^xsd:string
]
] [ sp:object
[ sp:varName "licenceName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "licenceName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "licence"^^xsd:string
]
] [ sp:object
[ sp:varName "licenceName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "licence"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompany
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00005 Record the Facility that has the flows - kind is \"well\"
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "well"^^xsd:string
]
] [ sp:object
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "well"^^xsd:string
]
] [ sp:object
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "well"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00001a Record the Facility that has the flows - kind is \"field\", etc.
Nothing is done with the namingSystem!
?field ep-core:derivedFrom ?this .
?this rdfs:label ?fieldName ."""^^xsd:string ;
sp:templates () ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\"
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc.
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "tuf"^^xsd:string
]
] [ sp:object
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "tuf"^^xsd:string
]
] [ sp:object
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "tuf"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <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
] .
......@@ -21,74 +21,6 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
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
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^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 "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#name> ;
sp:subject
[ sp:varName "operatorRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "operatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedOperatorName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "normalizedOperatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "operator"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20070 Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
......@@ -151,115 +83,6 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20050 Set the context facility - installation exists"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionContextFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "productionContextFacility"^^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 "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "contextFacilityKind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#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 "productionFacility"^^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#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "contextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "contextFacilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacilityType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFlow and the ProductionFlowToDate ; the period ProductionInventory and the ProductionInventoryToDate; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductVolumeReport> ;
sp:predicate rdf:type ;
......@@ -412,26 +235,14 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20007b Set the geographic context - country"^^xsd:string ;
rdfs:comment "STEP 20007a Set the geographic context - field"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "country"^^xsd:string
[ sp:varName "field"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Country> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "country"^^xsd:string
]
] [ sp:object
[ sp:varName "countryName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "country"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
......@@ -451,13 +262,20 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "countryName"^^xsd:string
[ sp:varName "fieldRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#country> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#fieldRef> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "fieldRef"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
......@@ -467,55 +285,88 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "countryName"^^xsd:string
sp:arg1 [ sp:varName "fieldName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedCountryName"^^xsd:string
[ sp:varName "normalizedFieldName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildCountryURI ;
sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedFieldName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "country"^^xsd:string
[ sp:varName "field"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20051 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 ;
rdfs:comment "STEP 20030 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 "productionContextFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionContextFacilityType"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
[ sp:varName "productionFlowToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b9
] [ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
] [ 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:varName "productionInventory"^^xsd:string
]
] [ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
] [ 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:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ 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 "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
......@@ -529,161 +380,90 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "contextFacilityKind"^^xsd:string
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
[ sp:varName "productionFlowToDate"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionFacility"^^xsd:string
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "contextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "contextFacilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacilityType"^^xsd:string
[ sp:varName "productionInventory"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20007a Set the geographic context - field"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "field"^^xsd:string
] [ sp:object
[ sp:varName "productionInventoryToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "productionInventory"^^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:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#fieldRef> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "fieldRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "fieldName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedFieldName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedFieldName"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] ;
sp:variable
[ sp:varName "field"^^xsd:string
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
......@@ -816,32 +596,36 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20040 Set the installation"^^xsd:string ;
rdfs:comment "STEP 20051 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
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityType"^^xsd:string
[ sp:varName "productionContextFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
] [ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b9
] [ sp:object _:b9 ;
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 _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -855,26 +639,26 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeRef"^^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 "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationName"^^xsd:string
[ sp:varName "contextFacilityName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "installationKind"^^xsd:string
[ sp:varName "contextFacilityKind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
]
])
] [ sp:object
......@@ -901,96 +685,361 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ 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 <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "installationName"^^xsd:string
sp:arg1 [ sp:varName "contextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
[ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "installationKind"^^xsd:string
sp:arg1 [ sp:varName "contextFacilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
[ sp:varName "productionContextFacilityType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20030 Record the start and end date-times"^^xsd:string ;
rdfs:comment "STEP 20040 Set the installation"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "productionFacility"^^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:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
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 "productionFlowToDate"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ 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/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#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 20007b Set the geographic context - country"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "country"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Country> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "country"^^xsd:string
]
] [ sp:object
[ sp:varName "countryName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "country"^^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 "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "countryName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#country> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "countryName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedCountryName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildCountryURI ;
sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "country"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20050 Set the context facility - installation exists"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionContextFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "productionContextFacility"^^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 "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "contextFacilityKind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#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 "productionFacility"^^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#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "contextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "contextFacilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacilityType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
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> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^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:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ 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 "dTimEnd"^^xsd:string
[ 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 "dTimEnd"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
......@@ -1008,16 +1057,16 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
......@@ -1062,36 +1111,110 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
[ 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 "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#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 20007c Set the geographic context - state"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "state"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "state"^^xsd:string
]
] [ sp:object
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "state"^^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 "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#state> ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "locationOfProductionFacility"^^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 ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "stateName"^^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:variable
[ sp:varName "normalizedStateName"^^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:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildStateURI ;
sp:arg1 [ sp:varName "normalizedStateName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "state"^^xsd:string
]
])
] ;
......@@ -1188,25 +1311,14 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20007c Set the geographic context - state"^^xsd:string ;
rdfs:comment """STEP 20060 Set the facility operator
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "state"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "state"^^xsd:string
]
] [ sp:object
[ sp:varName "stateName"^^xsd:string
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "state"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -1220,43 +1332,48 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "stateName"^^xsd:string
[ sp:varName "operatorName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#state> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#name> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "stateName"^^xsd:string
sp:arg1 [ sp:varName "operatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedStateName"^^xsd:string
[ sp:varName "normalizedOperatorName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildStateURI ;
sp:arg1 [ sp:varName "normalizedStateName"^^xsd:string
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "normalizedOperatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "state"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
])
] ;
......@@ -1328,174 +1445,9 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "block"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
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> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^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: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> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^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: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> ;
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.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 "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
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ 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 "productionFlowToDate"^^xsd:string
] ;
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 "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionInventory"^^xsd:string
]
] [ 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 "productionInventoryToDate"^^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 rdf:type ;
sp:subject
[ sp:varName "productionInventoryToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#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>
rdf:type owl:Ontology ;
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> ;
owl:imports <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:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
......@@ -19,9 +19,9 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
......@@ -52,6 +52,36 @@
[ 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
]
])
])
] ;
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/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
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 "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
......@@ -59,22 +89,29 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "date"^^xsd:string
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^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:variable
[ sp:varName "intervalIdentifier"^^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 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ;
rdfs:comment "STEP 10001p Create the ProductionReport - no installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
......@@ -91,12 +128,13 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
] [ 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_productionOperation> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
......@@ -115,6 +153,7 @@
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
......@@ -170,8 +209,7 @@
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "name"^^xsd:string
]
sp:arg1 "noInstallation"
] ;
sp:variable
[ sp:varName "normalizedName"^^xsd:string
......@@ -191,8 +229,10 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
sp:templates ([ sp:object "noDate" ;
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/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
......@@ -206,54 +246,13 @@
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
] ;
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: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 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/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
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 "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
......@@ -261,29 +260,22 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
sp:arg2 [ sp:varName "dateEnd"^^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:variable
[ sp:varName "intervalIdentifier"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001p Create the ProductionReport - no installation"^^xsd:string ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
......@@ -300,60 +292,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#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_productionOperation> ;
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
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
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 "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
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 "installationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
......@@ -370,26 +309,20 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 "noInstallation"
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 rdfs:label
] ;
sp:variable
[ sp:varName "normalizedName"^^xsd:string
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedName"^^xsd:string
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
......@@ -401,10 +334,8 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "date"^^xsd:string
] ;
rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
sp:templates ([ sp:object "noDate" ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
......@@ -418,82 +349,38 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ 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:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
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:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
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/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
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 "contextRef"^^xsd:string
]
] [ sp:object
] [ 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:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^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"^^xsd:string ;
rdfs:comment "STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
......@@ -511,6 +398,31 @@
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ 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
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
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> ;
......@@ -534,6 +446,7 @@
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
......@@ -562,17 +475,18 @@
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "name"^^xsd:string
]
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 rdfs:label
] ;
sp:variable
[ sp:varName "normalizedName"^^xsd:string
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedName"^^xsd:string
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
......@@ -695,7 +609,7 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ;
rdfs:comment "STEP 10001n Create the ProductionReport - extract the name from productionOperation/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
......@@ -713,6 +627,24 @@
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#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
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
......@@ -736,19 +668,21 @@
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "name"^^xsd:string
]
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 rdfs:label
] ;
sp:variable
[ sp:varName "normalizedName"^^xsd:string
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedName"^^xsd:string
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
......@@ -757,6 +691,61 @@
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
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/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
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 "contextRef"^^xsd:string
]
] [ 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
]
])
] [ 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:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "date"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0>
......