David Leal

Minor bug fixes

......@@ -156,7 +156,7 @@ ep-dpr-spin-lib:buildChemicalTypeURI
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/chemical/" ;
sp:arg1 "https://www.reportinghub.no/ep/data/chemicalType/" ;
sp:arg2 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg1
]
......@@ -641,28 +641,11 @@ ep-dpr-spin-lib:buildProductionFlowName
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg3 ;
sp:arg2 ""
] ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg2
]
] ;
sp:arg3 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg2
] ;
sp:arg4 "$" ;
sp:arg5 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg3
]
[ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg2
]
] ;
sp:variable
......@@ -681,28 +664,12 @@ ep-dpr-spin-lib:buildProductionFlowURI
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg3 ;
sp:arg2 ""
] ;
sp:arg2 [ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/productionFlow/" ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 spin:_arg2
]
] ;
sp:arg3 [ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/productionFlow/" ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 spin:_arg2 ;
sp:arg4 "$" ;
sp:arg5 spin:_arg3
]
[ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/productionFlow/" ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 spin:_arg2
]
] ;
sp:variable
......@@ -765,18 +732,11 @@ ep-dpr-spin-lib:buildProductionInventoryName
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg2 ;
sp:arg2 ""
] ;
sp:arg2 spin:_arg1 ;
sp:arg3 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg2
]
[ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 spin:_arg2
]
] ;
sp:variable
......@@ -795,22 +755,12 @@ ep-dpr-spin-lib:buildProductionInventoryURI
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg2 ;
sp:arg2 ""
] ;
sp:arg2 [ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/productionInventory/" ;
sp:arg2 spin:_arg1
] ;
sp:arg3 [ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/productionInventory/" ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 spin:_arg2
]
[ rdf:type ep-spin-lib:buildURI ;
sp:arg1 "https://www.reportinghub.no/ep/data/productionInventory/" ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 spin:_arg2
]
] ;
sp:variable
......@@ -7553,59 +7503,59 @@ ep-dpr-spin-lib:selectWorkScale
])
] .
_:b10
sp:varName "uri"^^xsd:string .
_:b22
sp:varName "volumeFlowRateAtStdType"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b21
sp:varName "specificVolumeScale"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b20
sp:varName "safetyActivityType"^^xsd:string .
_:b13
sp:varName "uri"^^xsd:string .
_:b19
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b14
sp:varName "densityScale"^^xsd:string .
_:b18
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b15
sp:varName "productionFacilityType"^^xsd:string .
_:b17
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b16
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b17
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b15
sp:varName "productionFacilityType"^^xsd:string .
_:b18
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b14
sp:varName "densityScale"^^xsd:string .
_:b19
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b13
sp:varName "uri"^^xsd:string .
_:b20
sp:varName "safetyActivityType"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b21
sp:varName "specificVolumeScale"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b22
sp:varName "volumeFlowRateAtStdType"^^xsd:string .
_:b10
sp:varName "uri"^^xsd:string .
_:b1 sp:varName "uri"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b2 sp:varName "UUID"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b3 sp:varName "uri"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b5 sp:varName "uri"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b3 sp:varName "uri"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b2 sp:varName "UUID"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b1 sp:varName "uri"^^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
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema
@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 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "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 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ 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://www.reportinghub.no/ep/transform/transform-helper-schema> , <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: 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
# imports: http://www.reportinghub.no/ep/transform/transform-helper-schema
@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 90103 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 "temporalPartOfAProductionFacility"^^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 <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "state"^^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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ 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 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "field"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ 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 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "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 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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "locationOfProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/geography> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......