David Leal

Upgrade to MPR geographicContext.

......@@ -6,6 +6,7 @@
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-commonPropertiesProductVolume-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0
# imports: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0
......@@ -15,6 +16,7 @@
@prefix TRANSFORM_mpr-facility-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facility-v1.0#> .
@prefix TRANSFORM_mpr-facilityIdentifierStructure-v1.1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1#> .
@prefix TRANSFORM_mpr-fluidSample-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0#> .
@prefix TRANSFORM_mpr-geographicContext-v1.1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1#> .
@prefix TRANSFORM_mpr-organization-v1.1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1#> .
@prefix TRANSFORM_mpr-productVolume-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0#> .
@prefix TRANSFORM_mpr-productVolumeReport-v1: <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0#> .
......@@ -36,5 +38,5 @@
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-collector>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/1.0/mpr/wellTest> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/injectionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/productionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-commonPropertiesProductVolume-v1.1.1> ;
owl:imports <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/1.0/mpr/wellTest> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/injectionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolumeReport-v1.0> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-fluidSample-v1.0> , <http://www.reportinghub.no/ep/transform/1.0/mpr/productionTestResults> , <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-commonPropertiesProductVolume-v1.1.1> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/geography
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1#> .
@prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/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#Cs_geographicContext>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90106 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:object
[ sp:varName "blockId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "block"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "offshoreLocationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#offshoreLocationRef> ;
sp:subject spin:_this
] [ 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 "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "locationOfProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^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 90105 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 spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "offshoreLocationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#offshoreLocationRef> ;
sp:subject spin:_this
] [ 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 "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "locationOfProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90101 Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#description> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "target"^^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 spin:_this
])
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90102 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 "temporalPartOfAProductionFacility"^^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 <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "country"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "countryName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#country> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "countryName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedCountryName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildCountryURI ;
sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "country"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90103 Set the geographic context - state"^^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 "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "country"^^xsd:string
]
] [ sp:object
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "country"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "stateName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#state> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "countryName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedCountryName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildCountryURI ;
sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "country"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90104 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 "temporalPartOfAProductionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#fieldRef> ;
sp:subject spin:_this
] [ 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 "target"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/geography> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix visual: <http://topbraid.org/visual#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
composite:index "0"^^xsd:int
] .
......@@ -21,45 +21,27 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReportKind> ;
rdfs:comment "STEP 20051 Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
sp:subject _:b1
] [ sp:object
[ sp:varName "kind"^^xsd:string
[ sp:varName "contextFacility"^^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:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b1
] [ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
] [ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productVolumeReport"^^xsd:string
[ sp:varName "productionFacilityToDate"^^xsd:string
]
] [ sp:object
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
......@@ -69,44 +51,59 @@
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
])
] [ sp:object
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "nameRef"^^xsd:string
[ sp:varName "contextFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^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
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "normalizedKind"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityToDate"^^xsd:string
] ;
sp:variable
[ sp:varName "reportKind"^^xsd:string
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
......@@ -277,156 +274,6 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20072 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 20075 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:object
[ sp:varName "blockId"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "block"^^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 20050 Set the context facility - installation exists"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "contextFacility"^^xsd:string
......@@ -481,87 +328,87 @@
rdfs:comment "STEP 20010 Create the ProductVolumeReport; the period ProductionFlow and the ProductionFlowToDate ; the period ProductionInventory and the ProductionInventoryToDate; the period ProductionFacility and the ProductionFacilityToDate ."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "productVolumeReportPeriodType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object _:b2 ;
sp:subject _:b2
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject _:b2
sp:subject _:b3
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b2
] [ sp:object _:b3 ;
sp:subject _:b3
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
sp:subject _:b3
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowToDate> ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object _:b4 ;
sp:subject _:b4
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventory> ;
sp:predicate rdf:type ;
sp:subject _:b4
sp:subject _:b5
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b4
] [ sp:object _:b5 ;
sp:subject _:b5
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
sp:subject _:b5
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionInventoryToDate> ;
sp:predicate rdf:type ;
sp:subject _:b5
sp:subject _:b6
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b6
sp:subject _:b7
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b6
] [ sp:object _:b7 ;
sp:subject _:b7
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b6
sp:subject _:b7
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject _:b7
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b6
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject _:b6
sp:subject _:b8
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b7
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject _:b7
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject _:b8
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject _:b8
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://purl.org/dc/elements/1.1/title> ;
sp:subject _:b1
sp:subject _:b2
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
......@@ -630,46 +477,27 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20040 Set the installation"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
rdfs:comment """STEP 20060 Set the facility operator
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b9
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
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 "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
......@@ -682,84 +510,25 @@
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityToDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacilityToDate> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20073 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:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "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:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
......@@ -929,49 +698,45 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20074 Set the geographic context - offshore location"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/geography#OffshoreLocation> ;
rdfs:comment "STEP 20020 Add the report kind ."^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "quadrant"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaQuadrantId> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReportKind> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "blockSuffix"^^xsd:string
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaBlockSuffixId> ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "areaName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasAreaName> ;
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "areaNameNorthSeaOffshore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaAreaName> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductVolumeReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "productVolumeReport"^^xsd:string
]
] [ sp:object
[ sp:varName "commentOffshoreLocation"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasOffshoreLocationComment> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
[ sp:varName "productVolumeReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
......@@ -982,95 +747,59 @@
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "offshoreLocationRef"^^xsd:string
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#offshoreLocationRef> ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "geographicContextRef"^^xsd:string
[ sp:varName "nameRef"^^xsd:string
]
] [ sp:object
[ sp:varName "northSeaOffshoreRef"^^xsd:string
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#northSeaOffshoreRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
sp:subject
[ sp:varName "offshoreLocationRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "quadrant"^^xsd:string
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "kind"^^xsd:string
]
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#quadrant> ;
sp:subject
[ sp:varName "northSeaOffshoreRef"^^xsd:string
sp:variable
[ sp:varName "normalizedKind"^^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
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "normalizedKind"^^xsd:string
]
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "locationOfProductionFacility"^^xsd:string
sp:variable
[ sp:varName "reportKind"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20051 Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b8
] [ sp:object
[ sp:varName "contextFacility"^^xsd:string
rdfs:comment "STEP 20040 Set the installation"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b8
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object _:b8 ;
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFacilityToDate"^^xsd:string
......@@ -1086,35 +815,19 @@
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
])
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "contextFacility"^^xsd:string
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
......@@ -1141,201 +854,9 @@
[ sp:varName "productionFacilityToDate"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20060 Set the facility operator
role is ignored, because it is implicitly \"operator\""""^^xsd:string ;
sp:templates ([ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b9
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
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
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <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 "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "operator"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20070 Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext"^^xsd:string ;
sp:templates ([ sp:object _:b10 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
sp:predicate rdf:type ;
sp:subject _:b10
] [ sp:object
[ sp:varName "geographicContextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b10
] [ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject _:b10
]) ;
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 "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20071 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.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> ;
owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
......@@ -19,14 +19,12 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10010 Add the contextFacility"^^xsd:string ;
rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "contextFacility"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
......@@ -39,89 +37,152 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contectFacilityRef"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "contextFacility"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
] [ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
sp:subject _:b1
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "date"^^xsd:string
] [ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
] [ 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 "contextRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "date"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "installation"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
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 "contextRef"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
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 "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 rdfs:label
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
......@@ -172,9 +233,70 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
rdfs:comment "STEP 10010 Add the contextFacility"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "contextFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionFacility"^^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 "contectFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "contextFacility"^^xsd:string
]
] [ 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 "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
......@@ -190,48 +312,48 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10020 Add the operator"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:templates ([ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
sp:subject _:b2
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
......@@ -278,7 +400,7 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ;
rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
......@@ -296,12 +418,21 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
......@@ -312,7 +443,7 @@
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
sp:arg1 [ sp:varName "date"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
......@@ -324,30 +455,35 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ;
rdfs:comment "STEP 10001n Create the ProductionReport - extract the name from productionOperation/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b2 ;
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
sp:subject _:b3
] [ sp:object
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
sp:subject _:b3
] [ 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 "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b3
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
......@@ -355,21 +491,21 @@
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
[ 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_productVolume> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
......@@ -380,25 +516,6 @@
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
......@@ -409,7 +526,7 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "something"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
......@@ -441,9 +558,9 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
......@@ -474,52 +591,48 @@
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "date"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001n Create the ProductionReport - extract the name from productionOperation/installation"^^xsd:string ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b3 ;
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b3
sp:subject _:b4
] [ sp:object
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b3
sp:subject _:b4
] [ 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 "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b4
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
......@@ -527,21 +640,21 @@
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
......@@ -550,25 +663,6 @@
sp:subject
[ sp:varName "installation"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
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 "something"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
......@@ -600,19 +694,24 @@
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b4 ;
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b4
sp:subject _:b5
] [ 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 "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b5
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
......@@ -699,85 +798,6 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b5
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ 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 "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "installation"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 rdfs:label
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001z Add the report kind, issue date and title"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
......
......@@ -25,9 +25,15 @@
<name>DONG E&amp;P Norge AS</name>
<role>Operating company</role>
</operator>
</context>
<geographicContext>
<comment>somewhere</comment>
</geographicContext>
</context>
<object xsi:type="obj_productVolume">
<name>TRYM</name>
<geographicContext>
<comment>somewhere else</comment>
</geographicContext>
<facility>
<name kind="field" namingSystem="NPD" uidRef="18081500">TRYM</name>
<flow>
......