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
2013-03-08 11:07:13 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
572baee08b15d81b6d46ee08ff0a0c6dafcd0a0d
572baee0
1 parent
86feb10d
Minor update to flow processing
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
480 additions
and
488 deletions
www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1.ttl
www.reportinghub.no/test/flow_facts/example_flow_facts.ttl
www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1.ttl
View file @
572baee
...
...
@@ -21,63 +21,58 @@
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
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 OperatingCompan
y
rdfs:
comment
"""STEP 0000
7 Record the Facility that has the flows - kind is \"terminal\" - 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
"
terminal
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
company
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
([
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_company>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_commercialentity>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
sp:
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
"
company
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#OperatingCompan
y>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/
ep/schema/facility#SurfaceFixedFacilit
y>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
company
"
^^
xsd:
string
[
sp:
varName
"
terminal
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
company
Name"
^^
xsd:
string
[
sp:
varName
"
terminal
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
company
"
^^
xsd:
string
[
sp:
varName
"
terminal
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
company
Id"
^^
xsd:
string
[
sp:
varName
"
terminal
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
company
"
^^
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
"
company
-"
;
sp:
arg2
[
sp:
varName
"
company
Id"
^^
xsd:
string
sp:
arg1
"
terminal
-"
;
sp:
arg2
[
sp:
varName
"
terminal
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
company
Label"
^^
xsd:
string
[
sp:
varName
"
terminal
Label"
^^
xsd:
string
]
])
]
;
...
...
@@ -140,190 +135,120 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 000
01 Record the Facility that has the flows - kind is \"field\", etc.
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
"
field
"
^^
xsd:
string
[
sp:
varName
"
licence
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
field
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
([
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:
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
"
field
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#Field
>
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/
np/schema/npd#Licence
>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
field
"
^^
xsd:
string
[
sp:
varName
"
licence
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
field
Name"
^^
xsd:
string
[
sp:
varName
"
licence
Name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"
field
"
^^
xsd:
string
[
sp:
varName
"
licence
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
field
Id"
^^
xsd:
string
[
sp:
varName
"
licence
Id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"
field
"
^^
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
"
field
-"
;
sp:
arg2
[
sp:
varName
"
field
Id"
^^
xsd:
string
sp:
arg1
"
licence
-"
;
sp:
arg2
[
sp:
varName
"
licence
Id"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
field
Label"
^^
xsd:
string
[
sp:
varName
"
licence
Label"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 000
11 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
N
aming system supplied
"""
^^
xsd:
string
;
rdfs:
comment
"""STEP 000
08 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
N
othing 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
"
facilit
y"
^^
xsd:
string
[
sp:
varName
"
compan
y"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
facilit
yLabel"
^^
xsd:
string
[
sp:
varName
"
compan
yLabel"
^^
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:
where
([
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_company>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_commercialentity>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"
facilit
yName"
^^
xsd:
string
[
sp:
varName
"
compan
yName"
^^
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>
;
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#OperatingCompany>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
something
"
^^
xsd:
string
[
sp:
varName
"
company
"
^^
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
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
]
]
[
sp:
object
[
sp:
varName
"companyName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"companyId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
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
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
;
sp:
arg2
"-"
;
sp:
arg3
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
sp:
arg1
"company-"
;
sp:
arg2
[
sp:
varName
"companyId"
^^
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
[
sp:
varName
"companyLabel"
^^
xsd:
string
]
])
]
;
...
...
@@ -386,50 +311,151 @@ Nothing is done with the namingSystem!"""^^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 00011 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
_:
b1
]
[
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
_:
b1
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
[
sp:
varName
"facilityName
WithContext
"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
_:
b1
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
_:
b1
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
([
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:
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
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
sp:
subject
spin:
_this
])
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 00012d 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
_:
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
"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>
;
...
...
@@ -545,8 +571,8 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 0001
1
a Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Naming system
not
supplied"""
^^
xsd:
string
;
rdfs:
comment
"""STEP 0001
2
a 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
...
...
@@ -570,13 +596,11 @@ Naming system not supplied"""^^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
])
]
[
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>
;
...
...
@@ -595,12 +619,31 @@ Naming system not supplied"""^^xsd:string ;
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
[
rdf:
type
fn:
concat
;
sp:
arg1
[
sp:
varName
"namingSystem"
^^
xsd:
string
]
;
sp:
arg2
"$"
;
sp:
arg3
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"normalizedfacilityName"
^^
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
...
...
@@ -620,7 +663,7 @@ Naming system not supplied"""^^xsd:string ;
sp:
arg1
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
;
sp:
arg2
"-"
;
sp:
arg3
[
sp:
varName
"normalizedFacilityName"
^^
xsd:
string
sp:
arg3
[
sp:
varName
"normalizedFacilityName
WithContext
"
^^
xsd:
string
]
]
;
sp:
variable
...
...
@@ -649,50 +692,247 @@ Naming system not supplied"""^^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
Naming system 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
;
rdfs:
comment
"""STEP 00001 Record the Facility that has the flows - kind is \"field\", etc.
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
terminal
"
^^
xsd:
string
[
sp:
varName
"
field
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"f
acilityName
"
^^
xsd:
string
[
sp:
varName
"f
ieldLabel
"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
[
sp:
varName
"terminal"
^^
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:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"fieldName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/facility#Field>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"field"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"fieldName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"field"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"fieldId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
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
"field-"
;
sp:
arg2
[
sp:
varName
"fieldId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"fieldLabel"
^^
xsd:
string
]
]
[
sp:
object
spin:
_this
;
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00002 Record the Facility that has the flows - kind is \"wellbore\"
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"
terminal
"
^^
xsd:
string
[
sp:
varName
"
wellBore
"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
facility
Label"
^^
xsd:
string
[
sp:
varName
"
wellBore
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_
wellbore
>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"
facility
Name"
^^
xsd:
string
[
sp:
varName
"
wellBore
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#WellBore>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
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 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
"
namingSystem
"
^^
xsd:
string
[
sp:
varName
"
tufLabel
"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#namingSystem>
;
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:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_plant-processing>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"tufName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#TUF>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"tuf"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"tufName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"tuf"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"tufId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
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
"tuf-"
;
sp:
arg2
[
sp:
varName
"tufId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"tufLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00012b 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
...
...
@@ -701,51 +941,65 @@ Naming system supplied"""^^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
[
rdf:
type
ep-mpr-spin-lib:
selectReportingFacilityType
;
sp:
arg1
[
sp:
varName
"facilityKind"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
facilityNameWithContext
"
^^
xsd:
string
[
sp:
varName
"
reportingFacilityType
"
^^
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
]
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
[
sp:
varName
"facilityName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"normalized
FacilityNameWithContext
"
^^
xsd:
string
[
sp:
varName
"normalized
facilityName
"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-dpr-spin-lib:
buildTerminalURI
;
sp:
arg1
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
[
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
"
termina
l"
^^
xsd:
string
[
sp:
varName
"
normalizedReportingFacilityTypeLabe
l"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"terminal-"
;
sp:
arg2
[
sp:
varName
"normalizedFacilityNameWithContext"
^^
xsd:
string
sp:
arg1
[
sp:
varName
"normalizedReportingFacilityTypeLabel"
^^
xsd:
string
]
;
sp:
arg2
"-"
;
sp:
arg3
[
sp:
varName
"normalizedFacilityName"
^^
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
...
...
@@ -807,64 +1061,7 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00010 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
"licence"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"licenceLabel"
^^
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:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"licenceName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#Licence>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"licence"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"licenceName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"licence"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"licenceId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
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
"licence-"
;
sp:
arg2
[
sp:
varName
"licenceId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"licenceLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00012a Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
rdfs:
comment
"""STEP 00011a 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
;
...
...
@@ -948,147 +1145,7 @@ Naming system not supplied"""^^xsd:string ;
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00007 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
"terminal"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"terminalLabel"
^^
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
"terminalName"
^^
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
"terminal"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"terminalName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"terminal"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"terminalId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
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
"terminal-"
;
sp:
arg2
[
sp:
varName
"terminalId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"terminalLabel"
^^
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_terminal>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_pipeline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_flowline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_installation>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_plant>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_processingfacility>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_trunkline>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_storage>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
])
([
sp:
object
<http://www.epim.no/schemas/mprml/1#RF_plant-processing>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]))
]
[
sp:
object
[
sp:
varName
"tufName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/np/schema/npd#TUF>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"tuf"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"tufName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"tuf"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"tufId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
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
"tuf-"
;
sp:
arg2
[
sp:
varName
"tufId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"tufLabel"
^^
xsd:
string
]
])
]
;
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
rdfs:
comment
"""STEP 00012c 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) .
now context not in name"""
^^
xsd:
string
;
...
...
@@ -1101,7 +1158,7 @@ now context not in name"""^^xsd:string ;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2
]
[
sp:
object
[
sp:
varName
"facilityName"
^^
xsd:
string
[
sp:
varName
"facilityName
WithContext
"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
_:
b2
...
...
@@ -1200,66 +1257,9 @@ now context not in name"""^^xsd:string ;
[
sp:
varName
"facilityLabel"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"""STEP 00002 Record the Facility that has the flows - kind is \"wellbore\"
Nothing is done with the namingSystem!"""
^^
xsd:
string
;
sp:
templates
([
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom>
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellBoreLabel"
^^
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_wellbore>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kindRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
<http://www.reportinghub.no/ep/schema/well#WellBore>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
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
]
])
]
.
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-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/mpr/spin/1.1/lib>
,
<http://www.reportinghub.no/ep/dpr/spin/1.1/lib>
,
<http://www.reportinghub.no/ep/transform/transform-helper-schema
>
;
owl:
imports
<http://
www.reportinghub.no/ep/transform/transform-helper-schema>
,
<http://www.reportinghub.no/ep/dpr/spin/1.1/lib>
,
<http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
,
<http://www.epim.no/schemas/mprml/1>
,
<http://spinrdf.org/spin
>
;
owl:
versionInfo
"Created with TopBraid Composer"
^^
xsd:
string
.
...
...
www.reportinghub.no/test/flow_facts/example_flow_facts.ttl
View file @
572baee
...
...
@@ -61,11 +61,3 @@
<http://www.reportinghub.no/np/data/npd/Field-5506919>
;
flowFacts:
possibleTemporalPartName
"OSL MEG TANK1 CONS MEAS CHEM"
^^
xsd:
string
,
"OSL MEG TANK2 CONS MEAS CHEM"
^^
xsd:
string
.
<https://www.reportinghub.no/ep/data/tank/DONG$TK0420>
rdf:
type
ep-eqt:
Tank
;
ep-core:
name
"TK0420"
^^
xsd:
string
.
<https://www.reportinghub.no/ep/data/tank/DONG$TK0421>
rdf:
type
ep-eqt:
Tank
;
ep-core:
name
"TK0421"
^^
xsd:
string
.
...
...
Please
register
or
login
to post a comment