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-09-27 16:29:01 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6b5c438f3e19f895c0e9fa1b880cee6d0688761f
6b5c438f
1 parent
c110e6a7
Added helper magic property to get all graphs that a given company has
access to
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
122 additions
and
52 deletions
www.reportinghub.no/spin/SPIN-RH-v1.0.spin.ttl
www.reportinghub.no/spin/SPIN-RH-v1.0.spin.ttl
View file @
6b5c438
...
...
@@ -367,6 +367,76 @@ rhspin:companyName
rdfs:
subClassOf
spin:
Functions
;
spin:
returnType
xsd:
string
.
rhspin:
companyNameHasLicenceForGraph
rdf:
type
spin:
MagicProperty
;
rdfs:
comment
"Finds all graphs (storing DDRs etc per licence) for a company with a given name (left side)."
^^
xsd:
string
;
rdfs:
label
"company name has licence for graph"
^^
xsd:
string
;
rdfs:
subClassOf
spin:
MagicProperties
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
distinct
"true"
^^
xsd:
boolean
;
sp:
resultVariables
([
sp:
varName
"uri"
^^
xsd:
string
])
;
sp:
where
([
rdf:
type
sp:
NamedGraph
;
sp:
elements
([
sp:
object
spin:
_arg1
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/np/schema/npd#OperatingCompany>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"company"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#shareHolder>
;
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
[
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
[
sp:
varName
"licence"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"id"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#id>
;
sp:
subject
[
sp:
varName
"licence"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
sp:
iri
;
sp:
arg1
[
rdf:
type
fn:
concat
;
sp:
arg1
"https://www.reportinghub.no/ep/graph/licence-"
;
sp:
arg2
[
sp:
varName
"id"
^^
xsd:
string
]
]
]
;
sp:
variable
[
sp:
varName
"uri"
^^
xsd:
string
]
])
;
sp:
graphNameNode
npdata:
npd
])
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The name of the company to get the graphs of."
^^
xsd:
string
;
spl:
predicate
sp:
arg1
;
spl:
valueType
xsd:
string
]
.
rhspin:
companyWithName
rdf:
type
spin:
Function
;
rdfs:
comment
"Gets a Company with a given name from the NPD graph."
^^
xsd:
string
;
...
...
@@ -1319,89 +1389,89 @@ rhspin:wellByName
]
;
spin:
returnType
<http://www.reportinghub.no/ep/schema/well#Well>
.
_:
b32
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b1
sp:
varName
"subject"
^^
xsd:
string
.
_:
b31
sp:
varName
"name"
^^
xsd:
string
.
_:
b2
sp:
varName
"wellBoreName"
^^
xsd:
string
.
_:
b30
sp:
varName
"id"
^^
xsd:
string
.
_:
b3
sp:
varName
"wellBoreId"
^^
xsd:
string
.
_:
b29
sp:
varName
"t4"
^^
xsd:
string
.
_:
b4
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b28
sp:
varName
"t3"
^^
xsd:
string
.
_:
b5
sp:
varName
"wellName"
^^
xsd:
string
.
_:
b27
sp:
varName
"t2"
^^
xsd:
string
.
_:
b6
sp:
varName
"well"
^^
xsd:
string
.
_:
b26
sp:
varName
"t1"
^^
xsd:
string
.
_:
b7
sp:
varName
"company"
^^
xsd:
string
.
_:
b25
sp:
varName
"t0b"
^^
xsd:
string
.
_:
b8
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b24
sp:
varName
"t0a"
^^
xsd:
string
.
_:
b9
sp:
varName
"licence"
^^
xsd:
string
.
_:
b
23
sp:
varName
"s
2
"
^^
xsd:
string
.
_:
b
10
sp:
varName
"s
hare
"
^^
xsd:
string
.
_:
b
22
sp:
varName
"
s1
"
^^
xsd:
string
.
_:
b
11
sp:
varName
"
wellBore
"
^^
xsd:
string
.
_:
b
21
sp:
varName
"
normalizedStr
"
^^
xsd:
string
.
_:
b
12
sp:
varName
"
share
"
^^
xsd:
string
.
_:
b
20
_:
b
13
sp:
varName
"licence"
^^
xsd:
string
.
_:
b19
sp:
varName
"reif"
^^
xsd:
string
.
_:
b18
sp:
varName
"value"
^^
xsd:
string
.
_:
b17
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b16
_:
b14
sp:
varName
"company"
^^
xsd:
string
.
_:
b15
sp:
varName
"companyName"
^^
xsd:
string
.
_:
b1
4
_:
b1
6
sp:
varName
"company"
^^
xsd:
string
.
_:
b13
_:
b17
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b18
sp:
varName
"value"
^^
xsd:
string
.
_:
b19
sp:
varName
"reif"
^^
xsd:
string
.
_:
b20
sp:
varName
"licence"
^^
xsd:
string
.
_:
b
12
sp:
varName
"
share
"
^^
xsd:
string
.
_:
b
21
sp:
varName
"
normalizedStr
"
^^
xsd:
string
.
_:
b
11
sp:
varName
"
wellBore
"
^^
xsd:
string
.
_:
b
22
sp:
varName
"
s1
"
^^
xsd:
string
.
_:
b
10
sp:
varName
"s
hare
"
^^
xsd:
string
.
_:
b
23
sp:
varName
"s
2
"
^^
xsd:
string
.
_:
b9
sp:
varName
"licence"
^^
xsd:
string
.
_:
b24
sp:
varName
"t0a"
^^
xsd:
string
.
_:
b8
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b25
sp:
varName
"t0b"
^^
xsd:
string
.
_:
b7
sp:
varName
"company"
^^
xsd:
string
.
_:
b26
sp:
varName
"t1"
^^
xsd:
string
.
_:
b6
sp:
varName
"well"
^^
xsd:
string
.
_:
b27
sp:
varName
"t2"
^^
xsd:
string
.
_:
b5
sp:
varName
"wellName"
^^
xsd:
string
.
_:
b28
sp:
varName
"t3"
^^
xsd:
string
.
_:
b4
sp:
varName
"wellBore"
^^
xsd:
string
.
_:
b29
sp:
varName
"t4"
^^
xsd:
string
.
_:
b3
sp:
varName
"wellBoreId"
^^
xsd:
string
.
_:
b30
sp:
varName
"id"
^^
xsd:
string
.
_:
b2
sp:
varName
"wellBoreName"
^^
xsd:
string
.
_:
b31
sp:
varName
"name"
^^
xsd:
string
.
_:
b1
sp:
varName
"subject"
^^
xsd:
string
.
_:
b32
sp:
varName
"wellBore"
^^
xsd:
string
.
...
...
Please
register
or
login
to post a comment