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
2011-11-10 11:06:50 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2a67e468b26079461090fe913491fdcfec256d7d
2a67e468
1 parent
9dc492c2
Licence checks now also use npd:endDate
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
198 additions
and
109 deletions
www.reportinghub.no/spin/SPIN-RH-v1.0.spin.ttl
www.reportinghub.no/spin/SPIN-RH-v1.0.spin.ttl
View file @
2a67e46
...
...
@@ -69,6 +69,11 @@ arg:resource
rdfs:
label
"resource"
^^
xsd:
string
;
rdfs:
subPropertyOf
sp:
arg
.
arg:
share
rdf:
type
rdf:
Property
;
rdfs:
label
"share"
^^
xsd:
string
;
rdfs:
subPropertyOf
sp:
arg
.
arg:
startDate
rdf:
type
rdf:
Property
;
rdfs:
label
"start date"
^^
xsd:
string
;
...
...
@@ -481,14 +486,28 @@ rhspin:companyHasLicence
spin:
body
[
rdf:
type
sp:
Select
;
sp:
distinct
"true"
^^
xsd:
boolean
;
sp:
resultVariables
(
_:
b9
)
;
sp:
resultVariables
([
sp:
varName
"licence"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
spin:
_arg1
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#shareHolder>
;
sp:
subject
_:
b10
]
[
sp:
object
_:
b9
;
sp:
subject
[
sp:
varName
"share"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"licence"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#licenceShared>
;
sp:
subject
_:
b10
sp:
subject
[
sp:
varName
"share"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
rhspin:
shareIsValid
;
arg:
share
[
sp:
varName
"share"
^^
xsd:
string
]
]
])
;
sp:
graphNameNode
npdata:
npd
])
...
...
@@ -509,20 +528,40 @@ rhspin:companyHasLicenceForWellBore
spin:
body
[
rdf:
type
sp:
Select
;
sp:
distinct
"true"
^^
xsd:
boolean
;
sp:
resultVariables
(
_:
b11
)
;
sp:
resultVariables
([
sp:
varName
"wellBore"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
spin:
_arg1
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#shareHolder>
;
sp:
subject
_:
b12
]
[
sp:
object
_:
b13
;
sp:
subject
[
sp:
varName
"share"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"licence"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#licenceShared>
;
sp:
subject
_:
b12
sp:
subject
[
sp:
varName
"share"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/np/schema/npd#LS_Active>
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#licenceStatus>
;
sp:
subject
_:
b13
]
[
sp:
object
_:
b13
;
sp:
subject
[
sp:
varName
"licence"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"licence"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence>
;
sp:
subject
_:
b11
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
rhspin:
shareIsValid
;
arg:
share
[
sp:
varName
"share"
^^
xsd:
string
]
]
])
;
sp:
graphNameNode
npdata:
npd
])
...
...
@@ -546,20 +585,25 @@ rhspin:companyHasLicenceOrBAA
sp:
resultVariables
([
sp:
varName
"owner"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
spin:
_arg1
;
sp:
elements
([
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
spin:
_arg1
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#shareHolder>
;
sp:
subject
[
sp:
varName
"share"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Union
;
sp:
elements
(([
sp:
object
]
[
sp:
object
[
sp:
varName
"owner"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#licenceShared>
;
sp:
subject
[
sp:
varName
"share"
^^
xsd:
string
]
])
([
sp:
object
])
([
sp:
object
spin:
_arg1
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#shareHolder>
;
sp:
subject
[
sp:
varName
"share"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"owner"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#baaShared>
;
...
...
@@ -567,6 +611,13 @@ rhspin:companyHasLicenceOrBAA
[
sp:
varName
"share"
^^
xsd:
string
]
]))
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
rhspin:
shareIsValid
;
arg:
share
[
sp:
varName
"share"
^^
xsd:
string
]
]
])
;
sp:
graphNameNode
npdata:
npd
])
...
...
@@ -626,6 +677,13 @@ rhspin:companyNameHasLicenceForGraph
sp:
subject
[
sp:
varName
"licence"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
rhspin:
shareIsValid
;
arg:
share
[
sp:
varName
"share"
^^
xsd:
string
]
]
]
[
sp:
object
[
sp:
varName
"id"
^^
xsd:
string
]
;
...
...
@@ -663,16 +721,16 @@ rhspin:companyWithName
rdfs:
subClassOf
spin:
Functions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b
14
)
;
sp:
resultVariables
(
_:
b
9
)
;
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
_:
b
14
sp:
subject
_:
b
9
]
[
sp:
object
<http://www.reportinghub.no/np/schema/npd#OperatingCompany>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b
14
sp:
subject
_:
b
9
])
;
sp:
graphNameNode
npdata:
npd
])
...
...
@@ -737,33 +795,33 @@ rhspin:currentUserHasAccessToWellBoreWithId
sp:
expression
[
rdf:
type
rhspin:
companyName
]
;
sp:
variable
_:
b1
5
sp:
variable
_:
b1
0
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyWithName
;
arg:
name
_:
b1
5
arg:
name
_:
b1
0
]
;
sp:
variable
_:
b1
6
sp:
variable
_:
b1
1
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreById
;
arg:
id
[
sp:
varName
"id"
^^
xsd:
string
]
]
;
sp:
variable
_:
b1
7
sp:
variable
_:
b1
2
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
and
;
sp:
arg1
[
rdf:
type
sp:
bound
;
sp:
arg1
_:
b1
7
sp:
arg1
_:
b1
2
]
;
sp:
arg2
[
rdf:
type
sp:
bound
;
sp:
arg1
_:
b1
6
sp:
arg1
_:
b1
1
]
]
]
[
sp:
object
_:
b1
7
;
]
[
sp:
object
_:
b1
2
;
sp:
predicate
rhspin:
companyHasLicenceForWellBore
;
sp:
subject
_:
b1
6
sp:
subject
_:
b1
1
])
]
;
spin:
constraint
...
...
@@ -961,13 +1019,13 @@ rhspin:dtypeValue
rdfs:
subClassOf
spl:
OntologyFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b1
8
)
;
sp:
where
([
sp:
object
_:
b1
9
;
sp:
resultVariables
(
_:
b1
3
)
;
sp:
where
([
sp:
object
_:
b1
4
;
sp:
predicate
spin:
_arg2
;
sp:
subject
spin:
_arg1
]
[
sp:
object
_:
b1
8
;
]
[
sp:
object
_:
b1
3
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
_:
b1
9
sp:
subject
_:
b1
4
])
]
;
spin:
constraint
...
...
@@ -1219,9 +1277,9 @@ rhspin:licenceForWellBore
rdfs:
subClassOf
spin:
Functions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b
20
)
;
sp:
resultVariables
(
_:
b
15
)
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
_:
b
20
;
sp:
elements
([
sp:
object
_:
b
15
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence>
;
sp:
subject
[
sp:
varName
"wellBore"
^^
xsd:
string
...
...
@@ -1245,7 +1303,7 @@ rhspin:normalizeString
rdfs:
subClassOf
spl:
StringFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b
21
)
;
sp:
resultVariables
(
_:
b
16
)
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
...
...
@@ -1253,67 +1311,67 @@ rhspin:normalizeString
sp:
arg2
"\\((.*)\\)"
;
sp:
arg3
""
]
;
sp:
variable
_:
b
22
sp:
variable
_:
b
17
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
trim
;
sp:
arg1
_:
b
22
sp:
arg1
_:
b
17
]
;
sp:
variable
_:
b
23
sp:
variable
_:
b
18
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
encodeURL
;
sp:
arg1
_:
b
23
sp:
arg1
_:
b
18
]
;
sp:
variable
_:
b
24
sp:
variable
_:
b
19
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b
24
;
sp:
arg1
_:
b
19
;
sp:
arg2
"%2F"
;
sp:
arg3
"_"
]
;
sp:
variable
_:
b2
5
sp:
variable
_:
b2
0
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b2
5
;
sp:
arg1
_:
b2
0
;
sp:
arg2
"%[0-9A-F][0-9A-F]"
;
sp:
arg3
""
]
;
sp:
variable
_:
b2
6
sp:
variable
_:
b2
1
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b2
6
;
sp:
arg1
_:
b2
1
;
sp:
arg2
"\\+"
;
sp:
arg3
"_"
]
;
sp:
variable
_:
b2
7
sp:
variable
_:
b2
2
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b2
7
;
sp:
arg1
_:
b2
2
;
sp:
arg2
"_+"
;
sp:
arg3
"_"
]
;
sp:
variable
_:
b2
8
sp:
variable
_:
b2
3
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spif:
regex
;
sp:
arg1
_:
b2
8
;
sp:
arg1
_:
b2
3
;
sp:
arg2
"\\*"
;
sp:
arg3
""
]
;
sp:
variable
_:
b2
9
sp:
variable
_:
b2
4
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
xsd:
string
;
sp:
arg1
[
rdf:
type
spif:
upperCase
;
sp:
arg1
_:
b2
9
sp:
arg1
_:
b2
4
]
]
;
sp:
variable
_:
b
21
sp:
variable
_:
b
16
])
]
;
spin:
constraint
...
...
@@ -1543,9 +1601,9 @@ rhspin:npdId
rdfs:
subClassOf
spl:
StringFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b
30
)
;
sp:
resultVariables
(
_:
b
25
)
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
_:
b
30
;
sp:
elements
([
sp:
object
_:
b
25
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"resource"
^^
xsd:
string
...
...
@@ -1718,9 +1776,9 @@ rhspin:npdName
rdfs:
subClassOf
spl:
StringFunctions
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
(
_:
b
31
)
;
sp:
resultVariables
(
_:
b
26
)
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
_:
b
31
;
sp:
elements
([
sp:
object
_:
b
26
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"resource"
^^
xsd:
string
...
...
@@ -1797,6 +1855,52 @@ rhspin:parentCompanyByName
]
;
spin:
returnType
<http://www.reportinghub.no/ep/schema/well#WellBore>
.
rhspin:
shareIsValid
rdf:
type
spin:
Function
;
rdfs:
comment
"Tests whether a Share is still active, i.e. its end date must either be empty or after the current date."
^^
xsd:
string
;
rdfs:
label
"share is valid"
^^
xsd:
string
;
rdfs:
subClassOf
spin:
Functions
;
spin:
body
[
rdf:
type
sp:
Ask
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"share"
^^
xsd:
string
]
;
sp:
arg2
<http://www.reportinghub.no/np/schema/npd#endDate>
]
;
sp:
variable
[
sp:
varName
"endDate"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
or
;
sp:
arg1
[
rdf:
type
sp:
not
;
sp:
arg1
[
rdf:
type
sp:
bound
;
sp:
arg1
[
sp:
varName
"endDate"
^^
xsd:
string
]
]
]
;
sp:
arg2
[
rdf:
type
sp:
ge
;
sp:
arg1
[
sp:
varName
"endDate"
^^
xsd:
string
]
;
sp:
arg2
[
rdf:
type
xsd:
date
;
sp:
arg1
[
rdf:
type
sp:
now
]
]
]
]
])
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The Share to test."
^^
xsd:
string
;
spl:
predicate
arg:
share
;
spl:
valueType
<http://www.reportinghub.no/np/schema/npd#Share>
]
;
spin:
private
"true"
^^
xsd:
boolean
;
spin:
returnType
xsd:
boolean
.
rhspin:
tableHeaders
rdf:
type
owl:
ObjectProperty
;
rdfs:
comment
"Points to an rdf:List of xsd:string literals, one for each result column of the associated template."
^^
xsd:
string
;
...
...
@@ -1949,86 +2053,71 @@ rhspin:wellByName
]
;
spin:
returnType
<http://www.reportinghub.no/ep/schema/well#Well>
.
_:
b31
sp:
varName
"name"
^^
xsd:
string
.
_:
b30
sp:
varName
"id"
^^
xsd:
string
.
_:
b29
sp:
varName
"t4"
^^
xsd:
string
.
_:
b28
sp:
varName
"t3"
^^
xsd:
string
.
_:
b1
sp:
varName
"subject"
^^
xsd:
string
.
_:
b27
sp:
varName
"t2"
^^
xsd:
string
.
_:
b2
sp:
varName
"wellBoreName"
^^
xsd:
string
.
_:
b26
sp:
varName
"t1"
^^
xsd:
string
.
_:
b3
sp:
varName
"wellBoreId"
^^
xsd:
string
.
_:
b25
sp:
varName
"t0b"
^^
xsd:
string
.
_:
b4
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b24
sp:
varName
"t0a"
^^
xsd:
string
.
_:
b5
sp:
varName
"wellName"
^^
xsd:
string
.
_:
b23
sp:
varName
"s2"
^^
xsd:
string
.
_:
b6
sp:
varName
"well"
^^
xsd:
string
.
_:
b22
sp:
varName
"s1"
^^
xsd:
string
.
_:
b7
sp:
varName
"company"
^^
xsd:
string
.
_:
b21
sp:
varName
"normalizedStr"
^^
xsd:
string
.
_:
b8
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b20
sp:
varName
"licence"
^^
xsd:
string
.
_:
b9
sp:
varName
"company"
^^
xsd:
string
.
_:
b1
9
sp:
varName
"
reif
"
^^
xsd:
string
.
_:
b1
0
sp:
varName
"
companyName
"
^^
xsd:
string
.
_:
b1
8
sp:
varName
"
value
"
^^
xsd:
string
.
_:
b1
1
sp:
varName
"
company
"
^^
xsd:
string
.
_:
b1
7
_:
b1
2
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b16
sp:
varName
"company"
^^
xsd:
string
.
_:
b15
sp:
varName
"companyName"
^^
xsd:
string
.
_:
b13
sp:
varName
"value"
^^
xsd:
string
.
_:
b14
sp:
varName
"
company
"
^^
xsd:
string
.
sp:
varName
"
reif
"
^^
xsd:
string
.
_:
b1
3
_:
b1
5
sp:
varName
"licence"
^^
xsd:
string
.
_:
b12
sp:
varName
"share"
^^
xsd:
string
.
_:
b11
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b16
sp:
varName
"normalizedStr"
^^
xsd:
string
.
_:
b1
0
sp:
varName
"s
hare
"
^^
xsd:
string
.
_:
b1
7
sp:
varName
"s
1
"
^^
xsd:
string
.
_:
b9
sp:
varName
"licence"
^^
xsd:
string
.
_:
b18
sp:
varName
"s2"
^^
xsd:
string
.
_:
b8
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b19
sp:
varName
"t0a"
^^
xsd:
string
.
_:
b7
sp:
varName
"company"
^^
xsd:
string
.
_:
b20
sp:
varName
"t0b"
^^
xsd:
string
.
_:
b6
sp:
varName
"well"
^^
xsd:
string
.
_:
b21
sp:
varName
"t1"
^^
xsd:
string
.
_:
b5
sp:
varName
"wellName"
^^
xsd:
string
.
_:
b22
sp:
varName
"t2"
^^
xsd:
string
.
_:
b4
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b23
sp:
varName
"t3"
^^
xsd:
string
.
_:
b3
sp:
varName
"wellBoreId"
^^
xsd:
string
.
_:
b24
sp:
varName
"t4"
^^
xsd:
string
.
_:
b2
sp:
varName
"wellBoreName"
^^
xsd:
string
.
_:
b25
sp:
varName
"id"
^^
xsd:
string
.
_:
b1
sp:
varName
"subject"
^^
xsd:
string
.
_:
b26
sp:
varName
"name"
^^
xsd:
string
.
...
...
Please
register
or
login
to post a comment