Toggle navigation
Toggle navigation
This project
Loading...
Sign in
data.posccaesar.org
/
npd
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Authored by
David Leal
2012-11-09 18:19:15 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
19f834d65069e202da997d172316f77d62c30f24
19f834d6
1 parent
8d522798
Modified production and product flow URIs
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
744 additions
and
385 deletions
www.reportinghub.no/ep/spin/SPIN_EPIM-DPR-lib-v1.1.spin.ttl
www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1.ttl
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0.ttl
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0.ttl
www.reportinghub.no/ep/spin/SPIN_EPIM-DPR-lib-v1.1.spin.ttl
View file @
19f834d
...
...
@@ -19,7 +19,7 @@
<http://www.reportinghub.no/ep/dpr/spin/1.1/lib>
rdf:
type
owl:
Ontology
;
owl:
imports
<http://
www.reportinghub.no/ep/spin/1.1/lib>
,
<http://www.witsml.org/schemas/131/addendum/combo>
,
<http://www.reportinghub.no/ep/schema/1.0/production>
,
<http://spinrdf.org/spin
>
;
owl:
imports
<http://
spinrdf.org/spin>
,
<http://www.reportinghub.no/ep/schema/1.0/production>
,
<http://www.witsml.org/schemas/131/addendum/combo>
,
<http://www.reportinghub.no/ep/spin/1.1/lib
>
;
owl:
versionInfo
"Created with TopBraid Composer"
^^
xsd:
string
.
ep-dpr-spin-lib:
Function
...
...
@@ -326,25 +326,17 @@ ep-dpr-spin-lib:buildInstallationReportingFacilityName
sp:
arg1
spin:
_arg1
;
sp:
arg2
spin:
_arg2
]
;
sp:
arg2
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
spin:
_arg1
]
;
sp:
arg2
spin:
_arg1
;
sp:
arg3
[
rdf:
type
sp:
if
;
sp:
arg1
[
rdf:
type
sp:
eq
;
sp:
arg1
spin:
_arg2
;
sp:
arg2
""
]
;
sp:
arg2
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
spin:
_arg1
]
;
sp:
arg2
spin:
_arg1
;
sp:
arg3
[
rdf:
type
fn:
concat
;
sp:
arg1
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
spin:
_arg1
]
;
sp:
arg1
spin:
_arg1
;
sp:
arg2
"$"
;
sp:
arg3
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
spin:
_arg2
]
sp:
arg3
spin:
_arg2
]
]
]
;
...
...
@@ -584,9 +576,7 @@ ep-dpr-spin-lib:buildProductInventoryURI
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
spin:
_arg2
]
]
;
sp:
variable
...
...
@@ -701,9 +691,7 @@ ep-dpr-spin-lib:buildProductionFlowURI
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
spin:
_arg2
]
]
;
sp:
arg3
[
rdf:
type
ep-spin-lib:
buildURI
;
...
...
@@ -711,13 +699,9 @@ ep-dpr-spin-lib:buildProductionFlowURI
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
spin:
_arg2
;
sp:
arg4
"$"
;
sp:
arg5
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
spin:
_arg3
]
sp:
arg5
spin:
_arg3
]
]
]
;
...
...
@@ -825,9 +809,7 @@ ep-dpr-spin-lib:buildProductionInventoryURI
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
spin:
_arg2
]
]
]
;
...
...
@@ -1010,9 +992,7 @@ ep-dpr-spin-lib:buildTerminalURI
sp:
expression
[
rdf:
type
ep-spin-lib:
buildURI
;
sp:
arg1
"https://www.reportinghub.no/ep/data/terminal/"
;
sp:
arg2
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
spin:
_arg1
]
sp:
arg2
spin:
_arg1
]
;
sp:
variable
[
sp:
varName
"uri"
^^
xsd:
string
...
...
@@ -5944,6 +5924,22 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION
rdfs:
subClassOf
ep-dpr-spin-lib:
Function
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b21
)
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
sp:
if
;
sp:
arg1
[
rdf:
type
sp:
eq
;
sp:
arg1
spin:
_arg1
;
sp:
arg2
<http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3>
]
;
sp:
arg2
<http://www.reportinghub.no/ep/schema/core#fractionByVolume>
;
sp:
arg3
<http://www.reportinghub.no/ep/schema/core#undefinedScale>
]
;
sp:
variable
_:
b21
])
]
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
([
sp:
varName
"myVar"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
Bind
;
...
...
@@ -6023,22 +6019,6 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION
[
sp:
varName
"myVar"
^^
xsd:
string
]
])
]
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b21
)
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
sp:
if
;
sp:
arg1
[
rdf:
type
sp:
eq
;
sp:
arg1
spin:
_arg1
;
sp:
arg2
<http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3>
]
;
sp:
arg2
<http://www.reportinghub.no/ep/schema/core#fractionByVolume>
;
sp:
arg3
<http://www.reportinghub.no/ep/schema/core#undefinedScale>
]
;
sp:
variable
_:
b21
])
]
.
ep-dpr-spin-lib:
selectTemperatureScale
...
...
@@ -7573,59 +7553,59 @@ ep-dpr-spin-lib:selectWorkScale
])
]
.
_:
b
22
sp:
varName
"
volumeFlowRateAtStdType
"
^^
xsd:
string
.
_:
b
10
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b
2
1
sp:
varName
"
specificVolumeScale
"
^^
xsd:
string
.
_:
b
1
1
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b
20
sp:
varName
"
safetyActivityType
"
^^
xsd:
string
.
_:
b
12
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b1
9
sp:
varName
"
productionFlowPurposeType
"
^^
xsd:
string
.
_:
b1
3
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b1
8
sp:
varName
"
productionFlowDirectionRelationshipTyp
e"
^^
xsd:
string
.
_:
b1
4
sp:
varName
"
densityScal
e"
^^
xsd:
string
.
_:
b1
7
sp:
varName
"productionF
lowDirectionRelationship
Type"
^^
xsd:
string
.
_:
b1
5
sp:
varName
"productionF
acility
Type"
^^
xsd:
string
.
_:
b16
sp:
varName
"productionFlowDefinitionType"
^^
xsd:
string
.
_:
b1
5
sp:
varName
"productionF
acility
Type"
^^
xsd:
string
.
_:
b1
7
sp:
varName
"productionF
lowDirectionRelationship
Type"
^^
xsd:
string
.
_:
b1
4
sp:
varName
"
densityScal
e"
^^
xsd:
string
.
_:
b1
8
sp:
varName
"
productionFlowDirectionRelationshipTyp
e"
^^
xsd:
string
.
_:
b1
3
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b1
9
sp:
varName
"
productionFlowPurposeType
"
^^
xsd:
string
.
_:
b
12
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b
20
sp:
varName
"
safetyActivityType
"
^^
xsd:
string
.
_:
b
1
1
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b
2
1
sp:
varName
"
specificVolumeScale
"
^^
xsd:
string
.
_:
b
10
sp:
varName
"
uri
"
^^
xsd:
string
.
_:
b
22
sp:
varName
"
volumeFlowRateAtStdType
"
^^
xsd:
string
.
_:
b
9
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
1
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
8
sp:
varName
"uri
"
^^
xsd:
string
.
_:
b
2
sp:
varName
"UUID
"
^^
xsd:
string
.
_:
b
7
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
3
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
6
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
4
sp:
varName
"uri"
^^
xsd:
string
.
_:
b5
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
4
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
6
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
3
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
7
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
2
sp:
varName
"UUID
"
^^
xsd:
string
.
_:
b
8
sp:
varName
"uri
"
^^
xsd:
string
.
_:
b
1
sp:
varName
"uri"
^^
xsd:
string
.
_:
b
9
sp:
varName
"uri"
^^
xsd:
string
.
...
...
www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1.ttl
View file @
19f834d
...
...
@@ -8,6 +8,7 @@
@prefix
:
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1#>
.
@prefix
ep-dpr-spin-lib:
<http://www.reportinghub.no/ep/dpr/spin/1.1/lib#>
.
@prefix
ep-mpr-spin-lib:
<http://www.reportinghub.no/ep/mpr/spin/1.1/lib#>
.
@prefix
ep-spin-lib:
<http://www.reportinghub.no/ep/spin/lib#>
.
@prefix
fn:
<http://www.w3.org/2005/xpath-functions#>
.
@prefix
owl:
<http://www.w3.org/2002/07/owl#>
.
@prefix
rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
.
...
...
@@ -20,348 +21,306 @@
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00013 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
Naming system supplied
now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) ."""
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#Facility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
_:
b1
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"something"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
selectReportingFacilityType
;
sp:
arg1
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00001 Record the Facility that has the flows - kind is \"field\", etc.
rdfs:
comment
"""STEP 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
field
"
^^
xsd:
string
[
sp:
varName
"
platform
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
field
Label"
^^
xsd:
string
[
sp:
varName
"
platform
Label"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field-part>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field-group>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field-area>
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_platform>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"
field
Name"
^^
xsd:
string
[
sp:
varName
"
platform
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#
Field
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#
MoveableFacility
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
field
"
^^
xsd:
string
[
sp:
varName
"
platform
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
field
Name"
^^
xsd:
string
[
sp:
varName
"
platform
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
field
"
^^
xsd:
string
[
sp:
varName
"
platform
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
field
Id"
^^
xsd:
string
[
sp:
varName
"
platform
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
field
"
^^
xsd:
string
[
sp:
varName
"
platform
"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"
field
-"
;
sp:
arg2
[
sp:
varName
"
field
Id"
^^
xsd:
string
sp:
arg1
"
platform
-"
;
sp:
arg2
[
sp:
varName
"
platform
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
field
Label"
^^
xsd:
string
[
sp:
varName
"
platform
Label"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
rdfs:
comment
"""STEP 00012a Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
Naming system not supplied"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#Facility>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/geography#Terminal>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
facility
"
^^
xsd:
string
[
sp:
varName
"
terminal
"
^^
xsd:
string
]
])
;
sp:
where
([
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
[
sp:
object
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_terminal>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"something"
^^
xsd:
string
]
])
]
[
sp:
object
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"facility"
^^
xsd:
string
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
;
sp:
variable
[
sp:
varName
"normalizedfacilityName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-
mpr-spin-lib:
selectReportingFacilityType
;
sp:
arg1
[
sp:
varName
"
facilityKind
"
^^
xsd:
string
[
rdf:
type
ep-
dpr-spin-lib:
buildTerminalURI
;
sp:
arg1
[
sp:
varName
"
normalizedFacilityName
"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"terminal-"
;
sp:
arg2
[
sp:
varName
"normalizedFacilityName"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"facility"
^^
xsd:
string
sp:
variable
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 000
10 Record the Facility that has the flows - kind is \"licence\"
rdfs:
comment
"""STEP 000
07 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
licence
"
^^
xsd:
string
[
sp:
varName
"
terminal
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
licence
Label"
^^
xsd:
string
[
sp:
varName
"
terminal
Label"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
licence
>
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
terminal
>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"
licence
Name"
^^
xsd:
string
[
sp:
varName
"
terminal
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/
np/schema/npd#Licence
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/
ep/schema/facility#SurfaceFixedFacility
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
licence
"
^^
xsd:
string
[
sp:
varName
"
terminal
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
licence
Name"
^^
xsd:
string
[
sp:
varName
"
terminal
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
licence
"
^^
xsd:
string
[
sp:
varName
"
terminal
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
licence
Id"
^^
xsd:
string
[
sp:
varName
"
terminal
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
livence
"
^^
xsd:
string
[
sp:
varName
"
terminal
"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"
licence
-"
;
sp:
arg2
[
sp:
varName
"
licence
Id"
^^
xsd:
string
sp:
arg1
"
terminal
-"
;
sp:
arg2
[
sp:
varName
"
terminal
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
licence
Label"
^^
xsd:
string
[
sp:
varName
"
terminal
Label"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 0000
2 Record the Facility that has the flows - kind is \"wellbore
\"
rdfs:
comment
"""STEP 0000
5 Record the Facility that has the flows - kind is \"well
\"
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"well
Bore
"
^^
xsd:
string
[
sp:
varName
"well"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"well
Bore
Label"
^^
xsd:
string
[
sp:
varName
"wellLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_well
bore
>
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_well>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"well
Bore
Name"
^^
xsd:
string
[
sp:
varName
"wellName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/well#Well
Bore
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/well#Well>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"well
Bore
"
^^
xsd:
string
[
sp:
varName
"well"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"well
Bore
Name"
^^
xsd:
string
[
sp:
varName
"wellName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"well
Bore
"
^^
xsd:
string
[
sp:
varName
"well"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"well
Bore
Id"
^^
xsd:
string
[
sp:
varName
"wellId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"well
Bore
"
^^
xsd:
string
[
sp:
varName
"well"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"well
bore
-"
;
sp:
arg2
[
sp:
varName
"well
Bore
Id"
^^
xsd:
string
sp:
arg1
"well-"
;
sp:
arg2
[
sp:
varName
"wellId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"well
Bore
Label"
^^
xsd:
string
[
sp:
varName
"wellLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00012 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
rdfs:
comment
"""STEP 00014 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
Naming system not supplied
now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) AS ?facility) ."""
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#Facility>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/geography#Terminal>
;
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
sp:
subject
_:
b1
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"facility
Name
"
^^
xsd:
string
[
sp:
varName
"facility
Label
"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_terminal>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
where
([
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
...
...
@@ -370,39 +329,161 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
])
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-dpr-spin-lib:
buildTerminalURI
;
[
rdf:
type
ep-mpr-spin-lib:
selectReportingFacilityType
;
sp:
arg1
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"terminal"
^^
xsd:
string
[
sp:
varName
"normalizedfacilityName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
arg2
rdfs:
label
]
]
;
sp:
variable
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
;
sp:
arg2
"-"
;
sp:
arg3
[
sp:
varName
"normalizedFacilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00014 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
Naming system not supplied
now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) AS ?facility) ."""
^^
xsd:
string
;
rdfs:
comment
"""STEP 00012 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
Naming system supplied"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#Facility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2
]
[
sp:
object
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/geography#Terminal>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
_:
b2
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
_:
b2
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_terminal>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"something"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
arg2
"$"
;
sp:
arg3
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"facilityNameWithContext"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
]
;
sp:
arg2
"-"
;
sp:
arg3
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
]
;
sp:
variable
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-dpr-spin-lib:
buildTerminalURI
;
sp:
arg1
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"terminal-"
;
sp:
arg2
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Naming system supplied"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"facility"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
...
...
@@ -418,13 +499,11 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName)
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
]
[
sp:
object
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
...
...
@@ -441,213 +520,445 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName)
sp:
variable
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
arg2
"$"
;
sp:
arg3
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"facilityNameWithContext"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
]
;
sp:
arg2
"-"
;
sp:
arg3
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
]
;
sp:
variable
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
arg2
rdfs:
label
]
]
;
sp:
variable
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
;
sp:
arg2
"-"
;
sp:
arg3
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"facility"
^^
xsd:
string
]
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 0000
9 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompan
y
rdfs:
comment
"""STEP 0000
3 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacilit
y
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
company
"
^^
xsd:
string
[
sp:
varName
"
platform
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"companyLabel"
^^
xsd:
string
[
sp:
varName
"platformLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_platform>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"platformName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"platform"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"platformName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"platform"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"platformId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"platform"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"platform-"
;
sp:
arg2
[
sp:
varName
"platformId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"platformLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc.
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"tuf"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"tufLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
company
>
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
terminal
>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_commercialentity>
;
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_pipeline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_flowline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_installation>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_plant>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_processingfacility>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_trunkline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_storage>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_plant-processing>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"
company
Name"
^^
xsd:
string
[
sp:
varName
"
tuf
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#
ParentCompany
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#
TUF
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
company
"
^^
xsd:
string
[
sp:
varName
"
tuf
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
company
Name"
^^
xsd:
string
[
sp:
varName
"
tuf
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
company
"
^^
xsd:
string
[
sp:
varName
"
tuf
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
company
Id"
^^
xsd:
string
[
sp:
varName
"
tuf
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
company
"
^^
xsd:
string
[
sp:
varName
"
tuf
"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"
company
-"
;
sp:
arg2
[
sp:
varName
"
company
Id"
^^
xsd:
string
sp:
arg1
"
tuf
-"
;
sp:
arg2
[
sp:
varName
"
tuf
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
company
Label"
^^
xsd:
string
[
sp:
varName
"
tuf
Label"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 0000
5 Record the Facility that has the flows - kind is \"well
\"
rdfs:
comment
"""STEP 0000
2 Record the Facility that has the flows - kind is \"wellbore
\"
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"well"
^^
xsd:
string
[
sp:
varName
"well
Bore
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellLabel"
^^
xsd:
string
[
sp:
varName
"well
Bore
Label"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_well>
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_well
bore
>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"wellName"
^^
xsd:
string
[
sp:
varName
"well
Bore
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/well#Well>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/well#Well
Bore
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"well"
^^
xsd:
string
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellBoreId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"wellbore-"
;
sp:
arg2
[
sp:
varName
"wellBoreId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"wellBoreLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00011a Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Naming system not supplied"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"facility"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"something"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
selectReportingFacilityType
;
sp:
arg1
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"well"
^^
xsd:
string
sp:
variable
[
sp:
varName
"normalizedfacilityName"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellId"
^^
xsd:
string
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"well"
^^
xsd:
string
sp:
arg2
rdfs:
label
]
]
;
sp:
variable
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"well-"
;
sp:
arg2
[
sp:
varName
"wellId"
^^
xsd:
string
sp:
arg1
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
;
sp:
arg2
"-"
;
sp:
arg3
[
sp:
varName
"normalizedFacilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"wellLabel"
^^
xsd:
string
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"facility"
^^
xsd:
string
]
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
[
sp:
varName
"aFacilityIdentifierStructure"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 0000
6 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc.
rdfs:
comment
"""STEP 0000
8 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
tuf
"
^^
xsd:
string
[
sp:
varName
"
company
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
tuf
Label"
^^
xsd:
string
[
sp:
varName
"
company
Label"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_terminal>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_pipeline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_flowline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_installation>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_plant>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_processingfacility>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_trunkline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_storage>
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_company>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
plant-processing
>
;
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
commercialentity
>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"
tuf
Name"
^^
xsd:
string
[
sp:
varName
"
company
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#
TUF
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#
OperatingCompany
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
tuf
"
^^
xsd:
string
[
sp:
varName
"
company
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
tuf
Name"
^^
xsd:
string
[
sp:
varName
"
company
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
tuf
"
^^
xsd:
string
[
sp:
varName
"
company
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
tuf
Id"
^^
xsd:
string
[
sp:
varName
"
company
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
tuf
"
^^
xsd:
string
[
sp:
varName
"
company
"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"
tuf
-"
;
sp:
arg2
[
sp:
varName
"
tuf
Id"
^^
xsd:
string
sp:
arg1
"
company
-"
;
sp:
arg2
[
sp:
varName
"
company
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
tuf
Label"
^^
xsd:
string
[
sp:
varName
"
company
Label"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 0000
8 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an Operating
Company
rdfs:
comment
"""STEP 0000
9 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an Parent
Company
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
...
...
@@ -674,7 +985,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#
Operating
Company>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#
Parent
Company>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
...
...
@@ -709,172 +1020,240 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 000
07 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility
rdfs:
comment
"""STEP 000
10 Record the Facility that has the flows - kind is \"licence\"
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
terminal
"
^^
xsd:
string
[
sp:
varName
"
licence
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
terminal
Label"
^^
xsd:
string
[
sp:
varName
"
licence
Label"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
terminal
>
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_
licence
>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"
terminal
Name"
^^
xsd:
string
[
sp:
varName
"
licence
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/
ep/schema/facility#SurfaceFixedFacility
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/
np/schema/npd#Licence
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
terminal
"
^^
xsd:
string
[
sp:
varName
"
licence
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
terminal
Name"
^^
xsd:
string
[
sp:
varName
"
licence
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
terminal
"
^^
xsd:
string
[
sp:
varName
"
licence
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
terminal
Id"
^^
xsd:
string
[
sp:
varName
"
licence
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
terminal
"
^^
xsd:
string
[
sp:
varName
"
livence
"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"
terminal
-"
;
sp:
arg2
[
sp:
varName
"
terminal
Id"
^^
xsd:
string
sp:
arg1
"
licence
-"
;
sp:
arg2
[
sp:
varName
"
licence
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
terminal
Label"
^^
xsd:
string
[
sp:
varName
"
licence
Label"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 0000
4 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility
rdfs:
comment
"""STEP 0000
1 Record the Facility that has the flows - kind is \"field\", etc.
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
platform
"
^^
xsd:
string
[
sp:
varName
"
field
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
platform
Label"
^^
xsd:
string
[
sp:
varName
"
field
Label"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_platform>
;
sp:
where
([
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field-part>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field-group>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_field-area>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"
platform
Name"
^^
xsd:
string
[
sp:
varName
"
field
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#
MoveableFacility
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#
Field
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
platform
"
^^
xsd:
string
[
sp:
varName
"
field
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
platform
Name"
^^
xsd:
string
[
sp:
varName
"
field
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
platform
"
^^
xsd:
string
[
sp:
varName
"
field
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
platform
Id"
^^
xsd:
string
[
sp:
varName
"
field
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
platform
"
^^
xsd:
string
[
sp:
varName
"
field
"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"
platform
-"
;
sp:
arg2
[
sp:
varName
"
platform
Id"
^^
xsd:
string
sp:
arg1
"
field
-"
;
sp:
arg2
[
sp:
varName
"
field
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
platform
Label"
^^
xsd:
string
[
sp:
varName
"
field
Label"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
rdfs:
comment
"""STEP 00013 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
Naming system supplied
now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) ."""
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#Facility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2
]
[
sp:
object
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2
]
[
sp:
object
[
sp:
varName
"facilityNameWithContext"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
_:
b2
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"platform"
^^
xsd:
string
]
sp:
subject
_:
b2
]
[
sp:
object
[
sp:
varName
"
platform
Label"
^^
xsd:
string
[
sp:
varName
"
facility
Label"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_platform>
;
sp:
where
([
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
]
[
sp:
object
[
sp:
varName
"
platform
Name"
^^
xsd:
string
[
sp:
varName
"
facility
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"platform"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"platformName
"
^^
xsd:
string
[
sp:
varName
"namingSystem
"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"platform"
^^
xsd:
string
[
sp:
varName
"something"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
selectReportingFacilityType
;
sp:
arg1
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"platformId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"platform"
^^
xsd:
string
sp:
variable
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
])
;
sp:
graphNameNode
<http://www.reportinghub.no/np/data/npd>
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"platform-"
;
sp:
arg2
[
sp:
varName
"platformId"
^^
xsd:
string
sp:
arg1
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
arg2
"$"
;
sp:
arg3
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"platformLabel"
^^
xsd:
string
[
sp:
varName
"facilityNameWithContext"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
]
;
sp:
arg2
"-"
;
sp:
arg3
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
]
;
sp:
variable
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"reportingFacilityType"
^^
xsd:
string
]
;
sp:
arg2
rdfs:
label
]
]
;
sp:
variable
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
;
sp:
arg2
"-"
;
sp:
arg3
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
])
]
.
...
...
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0.ttl
View file @
19f834d
This diff could not be displayed because it is too large.
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0.ttl
View file @
19f834d
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment