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
Holger Knublauch
2012-03-08 17:38:45 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5e0d985ddc33efc2646e6935089e4f8ce784308e
5e0d985d
1 parent
5865ee47
Got rid of reused SPIN bnodes
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
158 additions
and
128 deletions
www.reportinghub.no/spin/SPIN-RH-v1.0.spin.ttl
www.reportinghub.no/spin/SPIN-RH-v1.0.spin.ttl
View file @
5e0d985
...
...
@@ -122,12 +122,15 @@ arg:wellName
rdfs:
subClassOf
spl:
MiscFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b1
)
;
sp:
resultVariables
([
sp:
varName
"subject"
^^
xsd:
string
])
;
sp:
where
([
sp:
object
spin:
_arg1
;
sp:
predicate
[
sp:
varName
"predicate"
^^
xsd:
string
]
;
sp:
subject
_:
b1
sp:
subject
[
sp:
varName
"subject"
^^
xsd:
string
]
])
]
;
spin:
constraint
...
...
@@ -494,20 +497,33 @@ rhspin:GetWellBoresOfWell
rdfs:
subClassOf
spin:
SelectTemplates
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
orderBy
(
_:
b2
)
;
sp:
resultVariables
(
_:
b3
_:
b2
)
;
sp:
orderBy
([
sp:
varName
"wellBoreName"
^^
xsd:
string
])
;
sp:
resultVariables
([
sp:
varName
"wellBoreId"
^^
xsd:
string
]
[
sp:
varName
"wellBoreName"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
[
sp:
varName
"well"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#partOfWell>
;
sp:
subject
_:
b4
]
[
sp:
object
_:
b2
;
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
_:
b4
]
[
sp:
object
_:
b3
;
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
_:
b4
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
])
;
sp:
graphNameNode
npdata:
npd
])
...
...
@@ -527,29 +543,50 @@ rhspin:GetWellsOfCompanyName
spin:
body
[
rdf:
type
sp:
Select
;
sp:
distinct
"true"
^^
xsd:
boolean
;
sp:
orderBy
(
_:
b5
)
;
sp:
resultVariables
(
_:
b6
_:
b5
)
;
sp:
orderBy
([
sp:
varName
"wellName"
^^
xsd:
string
])
;
sp:
resultVariables
([
sp:
varName
"well"
^^
xsd:
string
]
[
sp:
varName
"wellName"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
[
sp:
varName
"companyName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
_:
b7
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/np/schema/npd#OperatingCompany>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b7
]
[
sp:
object
_:
b8
;
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellBore"
^^
xsd:
string
]
;
sp:
predicate
rhspin:
companyHasLicenceForWellBore
;
sp:
subject
_:
b7
]
[
sp:
object
_:
b6
;
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"well"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#partOfWell>
;
sp:
subject
_:
b8
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/well#Well>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b6
]
[
sp:
object
_:
b5
;
sp:
subject
[
sp:
varName
"well"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"wellName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
_:
b6
sp:
subject
[
sp:
varName
"well"
^^
xsd:
string
]
])
;
sp:
graphNameNode
npdata:
npd
])
...
...
@@ -920,16 +957,21 @@ rhspin:companyWithName
rdfs:
subClassOf
spin:
Functions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b9
)
;
sp:
resultVariables
([
sp:
varName
"company"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
[
sp:
varName
"name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
_:
b9
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/np/schema/npd#OperatingCompany>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b9
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
])
;
sp:
graphNameNode
npdata:
npd
])
...
...
@@ -994,33 +1036,47 @@ rhspin:currentUserHasAccessToWellBoreWithId
sp:
expression
[
rdf:
type
rhspin:
companyName
]
;
sp:
variable
_:
b10
sp:
variable
[
sp:
varName
"companyName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyWithName
;
arg:
name
_:
b10
arg:
name
[
sp:
varName
"companyName"
^^
xsd:
string
]
]
;
sp:
variable
_:
b11
sp:
variable
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreById
;
arg:
id
[
sp:
varName
"id"
^^
xsd:
string
]
]
;
sp:
variable
_:
b12
sp:
variable
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
and
;
sp:
arg1
[
rdf:
type
sp:
bound
;
sp:
arg1
_:
b12
sp:
arg1
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
;
sp:
arg2
[
rdf:
type
sp:
bound
;
sp:
arg1
_:
b11
sp:
arg1
[
sp:
varName
"company"
^^
xsd:
string
]
]
]
[
sp:
object
_:
b12
;
]
]
[
sp:
object
[
sp:
varName
"wellBore"
^^
xsd:
string
]
;
sp:
predicate
rhspin:
companyHasLicenceForWellBore
;
sp:
subject
_:
b11
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
])
]
;
spin:
constraint
...
...
@@ -1398,13 +1454,20 @@ rhspin:dtypeValue
rdfs:
subClassOf
spl:
OntologyFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b13
)
;
sp:
where
([
sp:
object
_:
b14
;
sp:
resultVariables
([
sp:
varName
"value"
^^
xsd:
string
])
;
sp:
where
([
sp:
object
[
sp:
varName
"reif"
^^
xsd:
string
]
;
sp:
predicate
spin:
_arg2
;
sp:
subject
spin:
_arg1
]
[
sp:
object
_:
b13
;
]
[
sp:
object
[
sp:
varName
"value"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
_:
b14
sp:
subject
[
sp:
varName
"reif"
^^
xsd:
string
]
])
]
;
spin:
constraint
...
...
@@ -1758,9 +1821,12 @@ rhspin:licenceForWellBore
rdfs:
subClassOf
spin:
Functions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b15
)
;
sp:
resultVariables
([
sp:
varName
"licence"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
_:
b15
;
sp:
elements
([
sp:
object
[
sp:
varName
"licence"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence>
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
...
...
@@ -1784,7 +1850,8 @@ rhspin:normalizeString
rdfs:
subClassOf
spl:
StringFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b16
)
;
sp:
resultVariables
([
sp:
varName
"normalizedStr"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
...
...
@@ -1792,67 +1859,93 @@ rhspin:normalizeString
sp:
arg2
"\\((.*)\\)"
;
sp:
arg3
""
]
;
sp:
variable
_:
b17
sp:
variable
[
sp:
varName
"s1"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
trim
;
sp:
arg1
_:
b17
sp:
arg1
[
sp:
varName
"s1"
^^
xsd:
string
]
]
;
sp:
variable
_:
b18
sp:
variable
[
sp:
varName
"s2"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
encodeURL
;
sp:
arg1
_:
b18
sp:
arg1
[
sp:
varName
"s2"
^^
xsd:
string
]
]
;
sp:
variable
_:
b19
sp:
variable
[
sp:
varName
"t0a"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b19
;
sp:
arg1
[
sp:
varName
"t0a"
^^
xsd:
string
]
;
sp:
arg2
"%2F"
;
sp:
arg3
"_"
]
;
sp:
variable
_:
b20
sp:
variable
[
sp:
varName
"t0b"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b20
;
sp:
arg1
[
sp:
varName
"t0b"
^^
xsd:
string
]
;
sp:
arg2
"%[0-9A-F][0-9A-F]"
;
sp:
arg3
""
]
;
sp:
variable
_:
b21
sp:
variable
[
sp:
varName
"t1"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b21
;
sp:
arg1
[
sp:
varName
"t1"
^^
xsd:
string
]
;
sp:
arg2
"\\+"
;
sp:
arg3
"_"
]
;
sp:
variable
_:
b22
sp:
variable
[
sp:
varName
"t2"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b22
;
sp:
arg1
[
sp:
varName
"t2"
^^
xsd:
string
]
;
sp:
arg2
"_+"
;
sp:
arg3
"_"
]
;
sp:
variable
_:
b23
sp:
variable
[
sp:
varName
"t3"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b23
;
sp:
arg1
[
sp:
varName
"t3"
^^
xsd:
string
]
;
sp:
arg2
"\\*"
;
sp:
arg3
""
]
;
sp:
variable
_:
b24
sp:
variable
[
sp:
varName
"t4"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
xsd:
string
;
sp:
arg1
[
rdf:
type
spif:
upperCase
;
sp:
arg1
_:
b24
sp:
arg1
[
sp:
varName
"t4"
^^
xsd:
string
]
]
]
;
sp:
variable
_:
b16
sp:
variable
[
sp:
varName
"normalizedStr"
^^
xsd:
string
]
])
]
;
spin:
constraint
...
...
@@ -2085,9 +2178,12 @@ rhspin:npdId
rdfs:
subClassOf
spl:
StringFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b25
)
;
sp:
resultVariables
([
sp:
varName
"id"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
_:
b25
;
sp:
elements
([
sp:
object
[
sp:
varName
"id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"resource"
^^
xsd:
string
...
...
@@ -2260,9 +2356,12 @@ rhspin:npdName
rdfs:
subClassOf
spl:
StringFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b26
)
;
sp:
resultVariables
([
sp:
varName
"name"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
_:
b26
;
sp:
elements
([
sp:
object
[
sp:
varName
"name"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"resource"
^^
xsd:
string
...
...
@@ -2654,72 +2753,3 @@ rhspin:wellByName
spl:
valueType
xsd:
string
]
;
spin:
returnType
<http://www.reportinghub.no/ep/schema/well#Well>
.
_:
b11
sp:
varName
"company"
^^
xsd:
string
.
_:
b7
sp:
varName
"company"
^^
xsd:
string
.
_:
b9
sp:
varName
"company"
^^
xsd:
string
.
_:
b10
sp:
varName
"companyName"
^^
xsd:
string
.
_:
b25
sp:
varName
"id"
^^
xsd:
string
.
_:
b15
sp:
varName
"licence"
^^
xsd:
string
.
_:
b26
sp:
varName
"name"
^^
xsd:
string
.
_:
b16
sp:
varName
"normalizedStr"
^^
xsd:
string
.
_:
b14
sp:
varName
"reif"
^^
xsd:
string
.
_:
b17
sp:
varName
"s1"
^^
xsd:
string
.
_:
b18
sp:
varName
"s2"
^^
xsd:
string
.
_:
b1
sp:
varName
"subject"
^^
xsd:
string
.
_:
b19
sp:
varName
"t0a"
^^
xsd:
string
.
_:
b20
sp:
varName
"t0b"
^^
xsd:
string
.
_:
b21
sp:
varName
"t1"
^^
xsd:
string
.
_:
b22
sp:
varName
"t2"
^^
xsd:
string
.
_:
b23
sp:
varName
"t3"
^^
xsd:
string
.
_:
b24
sp:
varName
"t4"
^^
xsd:
string
.
_:
b13
sp:
varName
"value"
^^
xsd:
string
.
_:
b6
sp:
varName
"well"
^^
xsd:
string
.
_:
b12
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b8
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b4
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b3
sp:
varName
"wellBoreId"
^^
xsd:
string
.
_:
b2
sp:
varName
"wellBoreName"
^^
xsd:
string
.
_:
b5
sp:
varName
"wellName"
^^
xsd:
string
.
...
...
Please
register
or
login
to post a comment