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-01-31 11:52:34 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
820fd7bada5df1ce2fe463e9c50980de0f147d41
820fd7ba
1 parent
d5610548
NPD test data working, minor tweak to an error message
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
93 deletions
www.reportinghub.no/ep/spin/SPIN_EP-DDR-constraints.spin.ttl
www.reportinghub.no/system/npd-test.ttl
www.reportinghub.no/ep/spin/SPIN_EP-DDR-constraints.spin.ttl
View file @
820fd7b
...
...
@@ -124,54 +124,52 @@ ddr:Cs_drillReportWellboreInfo
ddr:
Obj_drillReport
spin:
constraint
[
rdf:
type
sp:
Construct
;
sp:
templates
([
sp:
object
spin:
ConstraintViolation
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2
]
[
sp:
object
spin:
_this
;
sp:
predicate
spin:
violationRoot
;
sp:
subject
_:
b2
]
[
sp:
object
ddr:
nameWellbore
;
sp:
predicate
spin:
violationPath
;
sp:
subject
_:
b2
]
[
sp:
object
[
sp:
varName
"message"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
_:
b2
])
;
sp:
where
([
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/spin/lib#nameWellbore>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
Bind
;
[
rdf:
type
sp:
Ask
;
rdfs:
comment
"DDRs can only be submitted if a user is logged in"
^^
xsd:
string
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreByName
;
arg:
wellBoreName
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
[
rdf:
type
rhspin:
companyName
]
;
sp:
variable
[
sp:
varName
"
wellBor
e"
^^
xsd:
string
[
sp:
varName
"
companyNam
e"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
not
;
sp:
arg1
[
rdf:
type
sp:
bound
;
sp:
arg1
[
sp:
varName
"wellBore"
^^
xsd:
string
sp:
arg1
[
sp:
varName
"companyName"
^^
xsd:
string
]
]
]
])
]
;
spin:
constraint
[
rdf:
type
sp:
Ask
;
rdfs:
comment
"DDRs can only be submitted if the logged-in user is from a registered company"
^^
xsd:
string
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyName
]
;
sp:
variable
[
sp:
varName
"companyName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"Unregistered well bore name "
;
sp:
arg2
[
sp:
varName
"wellBore
Name"
^^
xsd:
string
[
rdf:
type
rhspin:
companyWithName
;
arg:
name
[
sp:
varName
"company
Name"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"message"
^^
xsd:
string
[
sp:
varName
"company"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
not
;
sp:
arg1
[
rdf:
type
sp:
bound
;
sp:
arg1
[
sp:
varName
"company"
^^
xsd:
string
]
]
]
])
]
;
...
...
@@ -179,18 +177,18 @@ ddr:Obj_drillReport
[
rdf:
type
sp:
Construct
;
sp:
templates
([
sp:
object
spin:
ConstraintViolation
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b
3
sp:
subject
_:
b
2
]
[
sp:
object
spin:
_this
;
sp:
predicate
spin:
violationRoot
;
sp:
subject
_:
b
3
sp:
subject
_:
b
2
]
[
sp:
object
ddr:
nameWellbore
;
sp:
predicate
spin:
violationPath
;
sp:
subject
_:
b
3
sp:
subject
_:
b
2
]
[
sp:
object
[
sp:
varName
"message"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
_:
b
3
sp:
subject
_:
b
2
])
;
sp:
where
([
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
...
...
@@ -235,7 +233,7 @@ ddr:Obj_drillReport
sp:
arg1
"Well bore number "
;
sp:
arg2
[
sp:
varName
"wellBoreNumber"
^^
xsd:
string
]
;
sp:
arg3
"mismatches well bore name "
;
sp:
arg3
"
mismatches well bore name "
;
sp:
arg4
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
]
;
...
...
@@ -245,52 +243,54 @@ ddr:Obj_drillReport
])
]
;
spin:
constraint
[
rdf:
type
sp:
Ask
;
rdfs:
comment
"DDRs can only be submitted if the logged-in user is from a registered company"
^^
xsd:
string
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyName
[
rdf:
type
sp:
Construct
;
sp:
templates
([
sp:
object
spin:
ConstraintViolation
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b3
]
[
sp:
object
spin:
_this
;
sp:
predicate
spin:
violationRoot
;
sp:
subject
_:
b3
]
[
sp:
object
ddr:
nameWellbore
;
sp:
predicate
spin:
violationPath
;
sp:
subject
_:
b3
]
[
sp:
object
[
sp:
varName
"message"
^^
xsd:
string
]
;
sp:
variable
[
sp:
varName
"companyName"
^^
xsd:
string
]
sp:
predicate
rdfs:
label
;
sp:
subject
_:
b3
])
;
sp:
where
([
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/spin/lib#nameWellbore>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyWith
Name
;
arg:
n
ame
[
sp:
varName
"
company
Name"
^^
xsd:
string
[
rdf:
type
rhspin:
wellBoreBy
Name
;
arg:
wellBoreN
ame
[
sp:
varName
"
wellBore
Name"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
company
"
^^
xsd:
string
[
sp:
varName
"
wellBore
"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
not
;
sp:
arg1
[
rdf:
type
sp:
bound
;
sp:
arg1
[
sp:
varName
"
company
"
^^
xsd:
string
sp:
arg1
[
sp:
varName
"
wellBore
"
^^
xsd:
string
]
]
]
])
]
;
spin:
constraint
[
rdf:
type
sp:
Ask
;
rdfs:
comment
"DDRs can only be submitted if a user is logged in"
^^
xsd:
string
;
sp:
where
([
rdf:
type
sp:
Bind
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyName
[
rdf:
type
fn:
concat
;
sp:
arg1
"Unregistered well bore name "
;
sp:
arg2
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"companyName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
not
;
sp:
arg1
[
rdf:
type
sp:
bound
;
sp:
arg1
[
sp:
varName
"companyName"
^^
xsd:
string
]
]
[
sp:
varName
"message"
^^
xsd:
string
]
])
]
.
...
...
www.reportinghub.no/system/npd-test.ttl
View file @
820fd7b
...
...
@@ -5,6 +5,7 @@
@prefix
ep-well:
<http://www.reportinghub.no/ep/schema/well#>
.
@prefix
npd:
<http://www.reportinghub.no/np/schema/npd#>
.
@prefix
npd-test:
<http://www.reportinghub.no/np/data/npd-test#>
.
@prefix
npdi:
<http://www.reportinghub.no/np/data/npd/>
.
@prefix
owl:
<http://www.w3.org/2002/07/owl#>
.
@prefix
rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
.
@prefix
rdfs:
<http://www.w3.org/2000/01/rdf-schema#>
.
...
...
@@ -15,55 +16,70 @@
rdfs:
comment
"These triples will be added to the NPD Fact Pages automatically. They contain additional test companies, well bores etc that allows the developers and admins to upload and download dummy data."
^^
xsd:
string
;
owl:
imports
<http://www.reportinghub.no/np/schema/1.0/npd>
.
npd-test:
BA_ERH_TEST
npd-test:
ShareOfBAA_1
rdf:
type
npd:
ShareOfBAA
;
npd:
baaShared
npdi:
BAA-2222222222
;
npd:
shareHolder
npdi:
Company-5555555555
.
npd-test:
ShareOfLicence_1
rdf:
type
npd:
ShareOfLicence
;
npd:
licenceShared
npdi:
Licence-3333333333
;
npd:
shareHolder
npdi:
Company-5555555555
.
npdi:
BAA-2222222222
rdf:
type
npd:
BusinessArrangementArea
;
npd:
baaOperator
npdi:
Company-5555555555
;
npd:
id
"2222222222"
^^
xsd:
string
;
npd:
name
"BA_ERH_TEST"
^^
xsd:
string
.
npd
-test:
EPIM
npd
i:
Company-5555555555
rdf:
type
npd:
OperatingCompany
;
npd:
companyShortName
"EPIM"
^^
xsd:
string
;
npd:
id
"5555555555"
^^
xsd:
string
;
npd:
name
"EPIM"
^^
xsd:
string
.
npd-test:
ERH-TEST-WELL-01
npdi:
Field-1111111111
rdf:
type
ep-fac:
Field
;
npd:
fieldOwner
npdi:
BAA-2222222222
;
npd:
id
"1111111111"
^^
xsd:
string
;
npd:
name
"ERH_TEST_FIELD_01"
^^
xsd:
string
.
npdi:
Field-1222222222
rdf:
type
ep-fac:
Field
;
npd:
fieldOwner
npdi:
Licence-3333333333
;
npd:
id
"1222222222"
^^
xsd:
string
;
npd:
name
"ERH_TEST_FIELD_02"
^^
xsd:
string
.
npdi:
Licence-3333333333
rdf:
type
npd:
Licence
;
npd:
id
"3333333333"
^^
xsd:
string
;
npd:
licenceOperator
npdi:
Company-5555555555
;
npd:
licenceStatus
npd:
LS_Active
;
npd:
name
"PL_ERH_TEST"
^^
xsd:
string
.
npdi:
Well-ERH-TEST-WELL-01
rdf:
type
ep-well:
Well
;
npd:
name
"ERH-TEST-WELL-01"
^^
xsd:
string
;
npd:
wellPartOfField
npd
-test:
ERH_TEST_FIELD_0
1
.
npd:
wellPartOfField
npd
i:
Field-111111111
1
.
npd
-test:
ERH-TEST-WELL-02
npd
i:
Well-
ERH-TEST-WELL-02
rdf:
type
ep-well:
Well
;
npd:
name
"ERH-TEST-WELL-02"
^^
xsd:
string
;
npd:
wellPartOfField
npd
-test:
ERH_TEST_FIELD_0
2
.
npd:
wellPartOfField
npd
i:
Field-122222222
2
.
npd
-test:
ERH-TEST-WELLBORE-0
1
npd
i:
WellBore-411111111
1
rdf:
type
ep-well:
WellBore
;
npd:
drilledInProductionLicence
npdi:
Licence-3333333333
;
npd:
id
"4111111111"
^^
xsd:
string
;
npd:
name
"ERH-TEST-WELLBORE-01"
^^
xsd:
string
;
npd:
partOfWell
npd
-test:
ERH-TEST-WELL-01
;
npd:
partOfWell
npd
i:
Well-
ERH-TEST-WELL-01
;
npd:
wellBoreType
"DEVELOPMENT"
^^
xsd:
string
.
npd
-test:
ERH-TEST-WELLBORE-0
2
npd
i:
WellBore-422222222
2
rdf:
type
ep-well:
WellBore
;
npd:
id
"4222222222"
^^
xsd:
string
;
npd:
name
"ERH-TEST-WELLBORE-02"
^^
xsd:
string
;
npd:
partOfWell
npd
-test:
ERH-TEST-WELL-02
;
npd:
partOfWell
npd
i:
Well-
ERH-TEST-WELL-02
;
npd:
wellBoreType
"DEVELOPMENT"
^^
xsd:
string
.
npd-test:
ERH_TEST_FIELD_01
rdf:
type
ep-fac:
Field
;
npd:
fieldOwner
npd-test:
BA_ERH_TEST
;
npd:
id
"1111111111"
^^
xsd:
string
;
npd:
name
"ERH_TEST_FIELD_01"
^^
xsd:
string
.
npd-test:
ERH_TEST_FIELD_02
rdf:
type
ep-fac:
Field
;
npd:
fieldOwner
npd-test:
PL_ERH_TEST
;
npd:
id
"1222222222"
^^
xsd:
string
;
npd:
name
"ERH_TEST_FIELD_02"
^^
xsd:
string
.
npd-test:
PL_ERH_TEST
rdf:
type
npd:
Licence
;
npd:
id
"3333333333"
^^
xsd:
string
;
npd:
name
"PL_ERH_TEST"
^^
xsd:
string
.
...
...
Please
register
or
login
to post a comment