David Leal

First MPR transforms

......@@ -10,11 +10,11 @@
<http://www.reportinghub.no/ep/schema/1.0/production-report>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/np/schema/1.0/npd> ;
owl:imports <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/report> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-prodreport:DailyProductVolumeReport
rdf:type owl:Class , ep-prodreport:ProductVolumeReportPeriodType ;
rdf:type ep-prodreport:ProductVolumeReportPeriodType , owl:Class ;
rdfs:label "daily product volume report"^^xsd:string ;
rdfs:subClassOf ep-prodreport:DailyProductionReport .
......@@ -43,13 +43,18 @@ ep-prodreport:ProductionReport
rdfs:label "Production Report"^^xsd:string ;
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/report#Report> .
ep-prodreport:ProductionReportKind
rdf:type rdfs:Class ;
rdfs:label "production report kind"^^xsd:string ;
rdfs:subClassOf owl:Class .
ep-prodreport:ReportAliasIdentifier
rdf:type owl:Class ;
rdfs:subClassOf owl:Thing ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-prodreport:isAliasFor
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-prodreport:aliasName
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
......@@ -58,15 +63,10 @@ ep-prodreport:ReportAliasIdentifier
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-prodreport:aliasName
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-prodreport:isAliasFor
] .
ep-prodreport:ReportType
rdf:type rdfs:Class ;
rdfs:label "report type"^^xsd:string ;
rdfs:subClassOf owl:Class .
ep-prodreport:aliasName
rdf:type owl:DatatypeProperty ;
rdfs:range xsd:string .
......
......@@ -48,7 +48,7 @@ sp:if
<http://www.reportinghub.no/ep/dpr/spin/1.1/lib>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://www.reportinghub.no/ep/spin/1.1/lib> ;
owl:imports <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://spinrdf.org/spin> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-dpr-spin-lib:BuildDailyProductionReportURI
......@@ -412,6 +412,28 @@ ep-dpr-spin-lib:buildProductionFlowsToDateURI
])
] .
ep-dpr-spin-lib:buildProductionReportKindURI
rdf:type spin:Function ;
rdfs:label "build ProductionReportKind URI"^^xsd:string ;
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "uri"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/productionReportKind/" ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1
]
] ;
sp:variable
[ sp:varName "uri"^^xsd:string
]
])
] .
ep-dpr-spin-lib:buildShipURI
rdf:type spin:Function ;
rdfs:subClassOf ep-dpr-spin-lib:Function ;
......@@ -5490,22 +5512,6 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b29) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ;
sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale>
] ;
sp:variable _:b29
])
] ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "myVar"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
......@@ -5585,6 +5591,22 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION
[ sp:varName "myVar"^^xsd:string
]
])
] ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b29) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ;
sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale>
] ;
sp:variable _:b29
])
] .
ep-dpr-spin-lib:selectTemperatureScale
......@@ -7113,89 +7135,89 @@ ep-dpr-spin-lib:selectWorkScale
])
] .
_:b1 sp:varName "uri"^^xsd:string .
_:b32
sp:varName "volumeFlowRateAtStdType"^^xsd:string .
_:b2 sp:varName "uri"^^xsd:string .
_:b31
sp:varName "volumeAtStdType"^^xsd:string .
_:b3 sp:varName "UUID"^^xsd:string .
_:b30
sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b29
sp:varName "specificVolumeScale"^^xsd:string .
_:b5 sp:varName "uri"^^xsd:string .
_:b28
sp:varName "safetyActivityType"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b27
sp:varName "relationshipToMeasure"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b26
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b25
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b24
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b10
sp:varName "uri"^^xsd:string .
_:b23
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b22
sp:varName "productionFacilityType"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b21
sp:varName "productType"^^xsd:string .
_:b13
_:b20
sp:varName "densityScale"^^xsd:string .
_:b19
sp:varName "uri"^^xsd:string .
_:b14
_:b18
sp:varName "uri"^^xsd:string .
_:b15
_:b17
sp:varName "uri"^^xsd:string .
_:b16
sp:varName "uri"^^xsd:string .
_:b17
_:b15
sp:varName "uri"^^xsd:string .
_:b18
_:b14
sp:varName "uri"^^xsd:string .
_:b19
_:b13
sp:varName "uri"^^xsd:string .
_:b20
sp:varName "densityScale"^^xsd:string .
_:b21
sp:varName "productType"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b22
sp:varName "productionFacilityType"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b23
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b10
sp:varName "uri"^^xsd:string .
_:b24
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b25
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b26
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b27
sp:varName "relationshipToMeasure"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b28
sp:varName "safetyActivityType"^^xsd:string .
_:b5 sp:varName "uri"^^xsd:string .
_:b29
sp:varName "specificVolumeScale"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b30
sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b3 sp:varName "UUID"^^xsd:string .
_:b31
sp:varName "volumeAtStdType"^^xsd:string .
_:b2 sp:varName "uri"^^xsd:string .
_:b32
sp:varName "volumeFlowRateAtStdType"^^xsd:string .
_:b1 sp:varName "uri"^^xsd:string .
......
......@@ -3690,3 +3690,195 @@ ep-mpr-spin-lib:SelectWorkScale
ep-mpr-spin-lib:selectMap
rdf:type owl:ObjectProperty .
ep-mpr-spin-lib:selectProductionFacilityType
rdf:type spin:Function ;
rdfs:label "select ProductionFacilityType"^^xsd:string ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "productionFacilityType"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ 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>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Field> ;
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_country>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/geography#Country> ;
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_controller--lift>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Controller-lift> ;
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_unknown>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
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_completion>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Completion> ;
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--production>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Manifold-production> ;
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_wellbore>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#WellBore> ;
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/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_platform>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Platform> ;
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_zone>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Zone> ;
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_wellhead>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#WellHead> ;
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_state>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/geography#State> ;
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_wellgroup>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#WellGroup> ;
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_flowline--production>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Flowline-production> ;
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_cluster>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#Cluster> ;
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_bottomhole>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#WellBoreBottom> ;
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--injection>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Manifold-injection> ;
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_tank>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Tank> ;
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_county>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/geography#County> ;
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_separator>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Separator> ;
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_lease>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Lease> ;
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_flowline>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Flowline> ;
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_reservoir>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/facility#Reservoir> ;
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_well>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/well#Well> ;
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_compressor>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/equipment#Compressor> ;
sp:arg3 <http://www.reportinghub.no/ep/schema/facility#ProductionFacility>
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
] ;
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
]
])
] .
......
......@@ -12,6 +12,7 @@
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
@prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
......@@ -31,37 +32,25 @@
<http://www.witsml.org/schemas/131/addendum/combo#A_Global-WITSMLComposite>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20004b Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
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/flow#facilityContainsFlow> ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionContextFacilityType"^^xsd:string
] ;
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
[ sp:varName "state"^^xsd:string
]
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
] [ sp:object
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
[ sp:varName "state"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -77,28 +66,84 @@
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#contextFacilityRef> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityName"^^xsd:string
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#state> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "contextFacilityKind"^^xsd:string
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "stateName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedStateName"^^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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20005a Set the facility operator- installation or context facility exist
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 "productionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeSetRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeRef> ;
sp:subject
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorName"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject
[ sp:varName "operatorRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
......@@ -113,14 +158,18 @@
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
......@@ -128,46 +177,48 @@
sp:subject
[ sp:varName "productionFacilityToDate"^^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:arg1 [ sp:varName "operatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacility"^^xsd:string
[ sp:varName "normalizedOperatorName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "contextFacilityKind"^^xsd:string
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "normalizedOperatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionContextFacilityType"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20009 Set the geographic context - offshore location - blockId"^^xsd:string ;
rdfs:comment "STEP 20007b Set the geographic context - country"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "block"^^xsd:string
[ 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 "productVolumeSet"^^xsd:string
......@@ -189,20 +240,13 @@
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "offshoreLocationRef"^^xsd:string
[ sp:varName "countryName"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#offshoreLocationRef> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#country> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "blockId"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#blockID> ;
sp:subject
[ sp:varName "offshoreLocationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
......@@ -212,31 +256,254 @@
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "blockId"^^xsd:string
sp:arg1 [ sp:varName "countryName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedBlockId"^^xsd:string
[ sp:varName "normalizedCountryName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildBlockURI ;
sp:arg1 [ sp:varName "normalizedBlockId"^^xsd:string
[ 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 20001b Add the report kind ."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "dailyProductVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReportKind> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#DailyProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "dailyProductVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "dailyProductionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "dailyProductVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeSetRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeRef> ;
sp:subject
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kind> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductVolumeReportPeriodType ;
sp:arg1 [ sp:varName "periodKindRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productVolumeReportPeriodType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20002b Record the end date"^^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 "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^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:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeSetRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeRef> ;
sp:subject
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ;
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 "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20002a Record the end date-time"^^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 "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeSetRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeRef> ;
sp:subject
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:variable
[ sp:varName "block"^^xsd:string
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20006a Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext - productionFacility already defined"^^xsd:string ;
sp:templates ([ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
rdfs:comment "STEP 20006b Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext - productionFacility not already defined"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b1
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
sp:predicate rdf:type ;
sp:subject _:b3
......@@ -245,11 +512,6 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b3
] [ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject _:b3
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
......@@ -293,7 +555,8 @@
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ sp:object
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
......@@ -313,35 +576,30 @@
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20006b Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext - productionFacility not already defined"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
rdfs:comment "STEP 20004a 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 _:b5
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
[ sp:varName "productionContextFacilityType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b4
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b5
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
sp:predicate rdf:type ;
sp:subject _:b6
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b6
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
......@@ -356,19 +614,26 @@
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#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 "comment"^^xsd:string
[ sp:varName "contextFacilityKind"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#comment> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
]
])
] [ sp:object
......@@ -385,19 +650,13 @@
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
......@@ -405,31 +664,58 @@
sp:subject
[ sp:varName "productionFacilityToDate"^^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 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> ;
rdfs:comment """STEP 20005b Set the facility operator- installation or context facility do not exist
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "country"^^xsd:string
]
sp:subject _:b4
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "countryName"^^xsd:string
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "country"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b4
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject _:b5
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
......@@ -444,69 +730,108 @@
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "countryName"^^xsd:string
[ sp:varName "operatorName"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#country> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#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 "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "countryName"^^xsd:string
sp:arg1 [ sp:varName "operatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedCountryName"^^xsd:string
[ sp:varName "normalizedOperatorName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildCountryURI ;
sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "normalizedOperatorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "country"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20005b Set the facility operator- installation or context facility do not exist
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
rdfs:comment "STEP 20004b Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b7
] [ sp:object _:b8 ;
sp:subject _:b6
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b7
sp:subject _:b6
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b8
sp:subject _:b7
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b7
sp:subject _:b6
] [ 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 "operator"^^xsd:string
[ sp:varName "productionContextFacilityType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject _:b8
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
......@@ -521,19 +846,28 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#contextFacilityRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityName"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorName"^^xsd:string
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "contextFacilityKind"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject
[ sp:varName "operatorRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
......@@ -556,11 +890,6 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
......@@ -572,46 +901,41 @@ 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 "operatorName"^^xsd:string
sp:arg1 [ sp:varName "contextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedOperatorName"^^xsd:string
[ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "normalizedOperatorName"^^xsd:string
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedContextFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "operator"^^xsd:string
[ 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 20002a Record the end date-time"^^xsd:string ;
rdfs:comment "STEP 20007a Set the geographic context - field"^^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 "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "field"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -627,32 +951,50 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
[ sp:varName "fieldRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#fieldRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
[ sp:varName "fieldRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
[ sp:varName "geographicContextRef"^^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 "dailyProductionFlow"^^xsd:string
[ 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:variable
[ sp:varName "field"^^xsd:string
]
])
] ;
......@@ -661,12 +1003,12 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
rdfs:comment "STEP 20003 Set the installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b9
sp:subject _:b8
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b9
sp:subject _:b8
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
......@@ -683,7 +1025,7 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b9
sp:subject _:b8
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
......@@ -765,26 +1107,25 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20004a Set the context facility - installation exists"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
rdfs:comment "STEP 20006a Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext - productionFacility already defined"^^xsd:string ;
sp:templates ([ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
sp:predicate rdf:type ;
sp:subject _:b9
] [ sp:object
[ sp:varName "productionContextFacilityType"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b9
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "productionContextFacility"^^xsd:string
]
sp:predicate rdfs:comment ;
sp:subject _:b9
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
......@@ -799,26 +1140,19 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#contextFacilityRef> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
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 "comment"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#comment> ;
sp:subject
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
]
])
] [ sp:object
......@@ -842,6 +1176,11 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
......@@ -849,58 +1188,17 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:subject
[ sp:varName "productionFacilityToDate"^^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 20002b Record the end date"^^xsd:string ;
rdfs:comment "STEP 20009 Set the geographic context - offshore location - blockId"^^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 "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "block"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionFlowToDate"^^xsd:string
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -916,38 +1214,56 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "offshoreLocationRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#offshoreLocationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "blockId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#blockID> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
[ sp:varName "offshoreLocationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
[ sp:varName "geographicContextRef"^^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 "dailyProductionFlow"^^xsd:string
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "blockId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedBlockId"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildBlockURI ;
sp:arg1 [ sp:varName "normalizedBlockId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "block"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20001 Create the DailyProductVolumeReport, the DailyProductionFlow and the ProductionFlowToDate ."^^xsd:string ;
rdfs:comment "STEP 20001a Create the DailyProductVolumeReport, the DailyProductionFlow and the ProductionFlowToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#DailyProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject _:b10
......@@ -961,39 +1277,28 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
] ;
sp:predicate rdfs:label ;
sp:subject _:b10
] [ sp:object _:b11 ;
sp:predicate rdf:type ;
sp:subject _:b10
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ReportType> ;
sp:predicate rdf:type ;
sp:subject _:b11
] [ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b11
] [ sp:object
[ sp:varName "productVolumeReportPeriodType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b11
] [ sp:object _:b12 ;
sp:subject _:b10
] [ sp:object _:b11 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b10
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#DailyProductionFlow> ;
sp:predicate rdf:type ;
sp:subject _:b12
sp:subject _:b11
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b12
] [ sp:object _:b13 ;
sp:subject _:b11
] [ sp:object _:b12 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b12
sp:subject _:b11
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
sp:subject _:b13
sp:subject _:b12
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
......@@ -1026,15 +1331,6 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kind> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "periodKindRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#periodKindRef> ;
......@@ -1197,242 +1493,4 @@ role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
[ sp:varName "locationOfProductionFacility"^^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 "productVolumeSet"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeSetRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeRef> ;
sp:subject
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#state> ;
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 "stateName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedStateName"^^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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20005a Set the facility operator- installation or context facility exist
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 "productionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeSetRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeRef> ;
sp:subject
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorName"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#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 "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "dailyProductionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ 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 20007a Set the geographic context - field"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "field"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeSet"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeSetRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productVolumeRef> ;
sp:subject
[ sp:varName "productVolumeSet"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#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> ;
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:variable
[ sp:varName "field"^^xsd:string
]
])
] .
......
# Saved by TopBraid on Wed Oct 05 12:01:16 BST 2011
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facility-v1.0
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0
@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-productVolumeReport-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0#> .
@prefix TRANSFORM_mpr-productionReport-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0#> .
@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#> .
......@@ -15,5 +17,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/TRANSFORM_mpr-facility-v1.0> ;
owl:imports <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
# Saved by TopBraid on Wed Oct 05 12:01:16 BST 2011
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
......
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0
# 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-productVolume-v1.0#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
@prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
@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 rhspin: <http://www.reportinghub.no/spin/rh#> .
@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#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20102 Record the Facility that has the flows
Nothing is done with the namingSystem!"""^^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:object
[ sp:varName "productionFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^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 "facilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#facilityRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityNameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "facilityRef"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "facilityNameRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "facilityNamingSystem"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
sp:subject
[ sp:varName "facilityNameRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "facilityKind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "facilityNameRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "facilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedFacilityName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "facilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> ;
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
] .
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
@prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
@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 rhspin: <http://www.reportinghub.no/spin/rh#> .
@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#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20002a Record the end date-time"^^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 "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "productionFlowToDate"^^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 "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20001b Add the report kind ."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReportKind> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
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 "nameRef"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "kind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedKind"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "normalizedKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportKind"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20005a Set the facility operator- installation or context facility exist
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 "productionFacility"^^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 "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
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ 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 20008 Set the geographic context - offshore location"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/geography#OffshoreLocation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "quadrant"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaQuadrantId> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "blockSuffix"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaBlockSuffixId> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "areaName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasAreaName> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "areaNameNorthSeaOffshore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaAreaName> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "commentOffshoreLocation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasOffshoreLocationComment> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^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 "offshoreLocationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#offshoreLocationRef> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "northSeaOffshoreRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#northSeaOffshoreRef> ;
sp:subject
[ sp:varName "offshoreLocationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "quadrant"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#quadrant> ;
sp:subject
[ sp:varName "northSeaOffshoreRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "areaNameNorthSeaOffshore"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#areaName> ;
sp:subject
[ sp:varName "northSeaOffshoreRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "blockSuffix"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#blockSuffix> ;
sp:subject
[ sp:varName "northSeaOffshoreRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "areaName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#areaName> ;
sp:subject
[ sp:varName "offshoreLocationRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "commentOffshoreLocation"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#comment> ;
sp:subject
[ sp:varName "offshoreLocationRef"^^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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20004a 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 "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
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ 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 20007a Set the geographic context - field"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "field"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^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 "fieldRef"^^xsd:string
] ;
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> ;
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:variable
[ sp:varName "field"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20005b Set the facility operator- installation or context facility do not exist
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject _:b2
]) ;
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 "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
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] [ 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 20009 Set the geographic context - offshore location - blockId"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "block"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^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 "offshoreLocationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#offshoreLocationRef> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "blockId"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#blockID> ;
sp:subject
[ sp:varName "offshoreLocationRef"^^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 "blockId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedBlockId"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildBlockURI ;
sp:arg1 [ sp:varName "normalizedBlockId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "block"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20002b Record the end date"^^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: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
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20006b Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext - productionFacility not already defined"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b3
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b3
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b4
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b5
]) ;
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
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#comment> ;
sp:subject
[ sp:varName "geographicContextRef"^^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
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
])
] ;
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
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#state> ;
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 "stateName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedStateName"^^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
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20003 Set the installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b6
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b6
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b6
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "installationKind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRef"^^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
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "installationName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "installationKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20004b Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b7
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b7
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b8
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b7
] [ 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 _:b8 ;
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 "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
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] [ 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 20006a Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext - productionFacility already defined"^^xsd:string ;
sp:templates ([ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
sp:predicate rdf:type ;
sp:subject _:b9
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b9
] [ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject _:b9
]) ;
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
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#comment> ;
sp:subject
[ sp:varName "geographicContextRef"^^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
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20001a Create the ProductVolumeReport, the DailyProductionFlow and the ProductionFlowToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject _:b10
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject _:b10
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b10
] [ sp:object
[ sp:varName "productVolumeReportPeriodType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b10
] [ sp:object _:b11 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b10
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject _:b11
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b11
] [ sp:object _:b12 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b11
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
sp:subject _:b12
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://purl.org/dc/elements/1.1/title> ;
sp:subject _:b10
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
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 "nameRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "periodKindRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#periodKindRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductVolumeReportPeriodType ;
sp:arg1 [ sp:varName "periodKindRef"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productVolumeReportPeriodType"^^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
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0>
rdf:type owl:Ontology ;
owl:imports <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> ;
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
] .
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0#> .
@prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
@prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
@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#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001c Add the report kind"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReportKind> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
]) ;
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 "kind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
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
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "kind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedKind"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "normalizedKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportKind"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 10001a Create the ProductionReport - dTimStart and dTimEnd supplied
Extract the name from the productionOperation child"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
]) ;
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
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "nameRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimStart> ;
sp:subject
[ sp:varName "prodctionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dTimEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dTimEnd> ;
sp:subject
[ sp:varName "prodctionOperationRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "name"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildDailyProductionReportURI ;
sp:arg1 [ sp:varName "normalizedName"^^xsd:string
] ;
sp:arg2 [ sp:varName "dTimStart"^^xsd:string
] ;
sp:arg3 [ sp:varName "dTimEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dailyProductionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 10001b Create the ProductionReport - dateStart and dateEnd supplied
Extract the name from the productionOperation child"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "dailyProductionReport"^^xsd:string
]
]) ;
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
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "nameRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "prodctionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "prodctionOperationRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "name"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildDailyProductionReportURI ;
sp:arg1 [ sp:varName "normalizedName"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateStart"^^xsd:string
] ;
sp:arg3 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dailyProductionReport"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> ;
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
] .
# baseURI: http://www.reportinghub.no/test/mpr/TEST_mpr-xml-ingest
# imports: file:///EPIM-Ontologies/www.reportinghub.no/test/mpr/testcase/DongEnergy/dpr-mprformat/TRYM-volumes_2011-08-27_final.xml
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector
# imports: http://www.reportinghub.no/np/data/npd
@prefix : <http://www.reportinghub.no/test/mpr/TEST_mpr-xml-ingest#> .
@prefix TRANSFORM_mpr-collector: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector#> .
@prefix TRYM-volumes_2011-08-27_final: <file:///EPIM-Ontologies/www.reportinghub.no/test/mpr/testcase/DongEnergy/dpr-mprformat/TRYM-volumes_2011-08-27_final.xml#> .
@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#> .
......@@ -15,5 +18,5 @@
<http://www.reportinghub.no/test/mpr/TEST_mpr-xml-ingest>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector> , <http://www.reportinghub.no/np/data/npd> ;
owl:imports <file:///EPIM-Ontologies/www.reportinghub.no/test/mpr/testcase/DongEnergy/dpr-mprformat/TRYM-volumes_2011-08-27_final.xml> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector> , <http://www.reportinghub.no/np/data/npd> , <http://www.epim.no/schemas/mprml/1> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
<?xml version="1.0" encoding="UTF-8"?><objects version="1.0.0.0(PRODML)" xmlns="http://www.witsml.org/schemas/131" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<?xml version="1.0" encoding="UTF-8"?><objects version="1.0.0.0(PRODML)" xmlns="http://www.epim.no/schemas/mprml/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<context xsi:type="obj_report">
<kind>Daily production report Trym</kind>
<title>Daily production report Trym September 2011</title>
......