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-06-07 10:39:40 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1990febede39f4de8a4deac44e393ffc3003a315
1990febe
1 parent
3339c209
Updates to SPIN constraints error codes etc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
396 additions
and
293 deletions
www.reportinghub.no/ep/spin/SPIN_EP-DDR-constraints.spin.ttl
www.reportinghub.no/ep/spin/SPIN_EP-DDR-constraints.spin.ttl
View file @
1990feb
# baseURI: http://www.reportinghub.no/ep/spin/ddr-constraints
# imports: http://spinrdf.org/spin
# imports: http://topbraid.org/sxml
# imports: http://www.reportinghub.no/np/schema/1.0/npd
# imports: http://www.reportinghub.no/spin/rh
# imports: http://www.witsml.org/schemas/1series
@prefix
:
<http://www.reportinghub.no/ep/spin/ddr-constraints#>
.
@prefix
arg:
<http://spinrdf.org/arg
#>
.
@prefix
ddr:
<http://www.witsml.org/schemas/1series
#>
.
@prefix
fn:
<http://www.w3.org/2005/xpath-function
s#>
.
@prefix
normalization:
<http://www.reportinghub.no/ep/transform/1.1/normalization
#>
.
@prefix
owl:
<http://www.w3.org/2002/07/owl
#>
.
@prefix
rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns
#>
.
@prefix
rdf
s:
<http://www.w3.org/2000/01/rdf-schema
#>
.
@prefix
r
hspin:
<http://www.reportinghub.no/spin/rh
#>
.
@prefix
sp:
<http://spinrdf.org/sp
#>
.
@prefix
sp
if:
<http://spinrdf.org/spif
#>
.
@prefix
spi
n:
<http://spinrdf.org/spin
#>
.
@prefix
sp
l:
<http://spinrdf.org/spl
#>
.
@prefix
xsd:
<http://www.w3.org/2001/XMLSchema
#>
.
# baseURI: http://www.reportinghub.no/ep/spin/ddr-constraints
# imports: http://spinrdf.org/spin
# imports: http://topbraid.org/sxml
# imports: http://www.reportinghub.no/np/schema/1.0/npd
# imports: http://www.reportinghub.no/spin/rh
# imports: http://www.witsml.org/schemas/1series
# c14n-version: 3
@prefix
:
<http://www.reportinghub.no/ep/spin/ddr-constraints
#>
.
@prefix
arg:
<http://spinrdf.org/arg
#>
.
@prefix
ddr:
<http://www.witsml.org/schemas/1serie
s#>
.
@prefix
fn:
<http://www.w3.org/2005/xpath-functions
#>
.
@prefix
normalization:
<http://www.reportinghub.no/ep/transform/1.1/normalization
#>
.
@prefix
owl:
<http://www.w3.org/2002/07/owl
#>
.
@prefix
rdf
:
<http://www.w3.org/1999/02/22-rdf-syntax-ns
#>
.
@prefix
r
dfs:
<http://www.w3.org/2000/01/rdf-schema
#>
.
@prefix
rhspin:
<http://www.reportinghub.no/spin/rh
#>
.
@prefix
sp
:
<http://spinrdf.org/sp
#>
.
@prefix
spi
f:
<http://spinrdf.org/spif
#>
.
@prefix
sp
in:
<http://spinrdf.org/spin
#>
.
@prefix
spl:
<http://spinrdf.org/spl
#>
.
@prefix
xsd:
<http://www.w3.org/2001/XMLSchema#>
.
<http://www.reportinghub.no/ep/spin/ddr-constraints>
rdf:
type
owl:
Ontology
;
rdfs:
comment
"Constraints that need to be executed immediately after SXML import, i.e. not on the inferred triples."
^^
xsd:
string
;
owl:
imports
<http://spinrdf.org/spin>
,
<http://topbraid.org/sxml>
,
<http://www.reportinghub.no/np/schema/1.0/npd>
,
<http://www.reportinghub.no/spin/rh>
,
<http://www.witsml.org/schemas/1series>
;
owl:
versionInfo
"0.2.0"
^^
xsd:
string
.
rdf:
type
owl:
Ontology
;
rdfs:
comment
"Constraints that need to be executed immediately after SXML import, i.e. not on the inferred triples."
^^
xsd:
string
;
owl:
imports
<http://spinrdf.org/spin>
;
owl:
imports
<http://topbraid.org/sxml>
;
owl:
imports
<http://www.reportinghub.no/np/schema/1.0/npd>
;
owl:
imports
<http://www.reportinghub.no/spin/rh>
;
owl:
imports
<http://www.witsml.org/schemas/1series>
;
owl:
versionInfo
"0.2.0"
^^
xsd:
string
;
.
ddr:
Cs_drillReportWellboreInfo
spin:
constraint
[
rdf:
type
sp:
Construct
;
sp:
templates
([
sp:
object
spin:
ConstraintViolation
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"message"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
_:
b1
])
;
sp:
where
([
sp:
object
[
sp:
varName
"nameRef"
^^
xsd:
string
]
;
sp:
predicate
ddr:
rigAliasRef
;
sp:
subject
spin:
_this
]
[
sp:
object
"NPD Name"
;
sp:
predicate
ddr:
namingSystem
;
sp:
subject
[
sp:
varName
"nameRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"name"
^^
xsd:
string
]
;
sp:
predicate
ddr:
name
;
sp:
subject
[
sp:
varName
"nameRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"codeRef"
^^
xsd:
string
]
;
sp:
predicate
ddr:
rigAliasRef
;
sp:
subject
spin:
_this
]
[
sp:
object
"NPD code"
;
sp:
predicate
ddr:
namingSystem
;
sp:
subject
[
sp:
varName
"codeRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"code"
^^
xsd:
string
]
;
sp:
predicate
ddr:
name
;
sp:
subject
[
sp:
varName
"codeRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
facilityById
;
arg:
id
[
sp:
varName
"code"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"facility"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
npdName
;
arg:
resource
[
sp:
varName
"facility"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"npdName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
ne
;
sp:
arg1
[
rdf:
type
spif:
lowerCase
;
sp:
arg1
[
sp:
varName
"npdName"
^^
xsd:
string
]
]
;
sp:
arg2
[
rdf:
type
spif:
lowerCase
;
sp:
arg1
[
sp:
varName
"name"
^^
xsd:
string
]
]
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"[RH-19] Mismatch for rig code "
;
sp:
arg2
[
sp:
varName
"code"
^^
xsd:
string
]
;
sp:
arg3
": The NPD name is "
;
sp:
arg4
[
sp:
varName
"npdName"
^^
xsd:
string
]
;
sp:
arg5
" not "
;
sp:
arg6
[
sp:
varName
"name"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"message"
^^
xsd:
string
]
])
]
.
spin:
constraint
[
rdf:
type
sp:
Construct
;
sp:
templates
(
[
sp:
object
spin:
ConstraintViolation
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b5160
;
]
[
sp:
object
[
sp:
varName
"message"
^^
xsd:
string
;
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
_:
b5160
;
]
)
;
sp:
where
(
[
sp:
object
[
sp:
varName
"nameRef"
^^
xsd:
string
;
]
;
sp:
predicate
ddr:
rigAliasRef
;
sp:
subject
spin:
_this
;
]
[
sp:
object
"NPD Name"
;
sp:
predicate
ddr:
namingSystem
;
sp:
subject
[
sp:
varName
"nameRef"
^^
xsd:
string
;
]
;
]
[
sp:
object
[
sp:
varName
"name"
^^
xsd:
string
;
]
;
sp:
predicate
ddr:
name
;
sp:
subject
[
sp:
varName
"nameRef"
^^
xsd:
string
;
]
;
]
[
sp:
object
[
sp:
varName
"codeRef"
^^
xsd:
string
;
]
;
sp:
predicate
ddr:
rigAliasRef
;
sp:
subject
spin:
_this
;
]
[
sp:
object
"NPD code"
;
sp:
predicate
ddr:
namingSystem
;
sp:
subject
[
sp:
varName
"codeRef"
^^
xsd:
string
;
]
;
]
[
sp:
object
[
sp:
varName
"code"
^^
xsd:
string
;
]
;
sp:
predicate
ddr:
name
;
sp:
subject
[
sp:
varName
"codeRef"
^^
xsd:
string
;
]
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
facilityById
;
arg:
id
[
sp:
varName
"code"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
sp:
varName
"facility"
^^
xsd:
string
;
]
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
npdName
;
arg:
resource
[
sp:
varName
"facility"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
sp:
varName
"npdName"
^^
xsd:
string
;
]
;
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
ne
;
sp:
arg1
[
rdf:
type
spif:
lowerCase
;
sp:
arg1
[
sp:
varName
"npdName"
^^
xsd:
string
;
]
;
]
;
sp:
arg2
[
rdf:
type
spif:
lowerCase
;
sp:
arg1
[
sp:
varName
"name"
^^
xsd:
string
;
]
;
]
;
]
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"[RH-19] Fact Pages validation of the XML file failed with the following error: Mismatch for rig code "
;
sp:
arg2
[
sp:
varName
"code"
^^
xsd:
string
;
]
;
sp:
arg3
": The NPD name is "
;
sp:
arg4
[
sp:
varName
"npdName"
^^
xsd:
string
;
]
;
sp:
arg5
" not "
;
sp:
arg6
[
sp:
varName
"name"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
sp:
varName
"message"
^^
xsd:
string
;
]
;
]
)
;
]
;
.
ddr:
Obj_drillReport
spin:
constraint
[
rdf:
type
sp:
Ask
;
rdfs:
comment
"[RH-10] DDRs can only be submitted if a user is logged in"
^^
xsd:
string
;
sp:
where
([
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyName
]
;
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
]
]
]
])
]
;
spin:
constraint
[
rdf:
type
sp:
Ask
;
rdfs:
comment
"[RH-10] 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
rhspin:
companyWithName
;
arg:
name
[
sp:
varName
"companyName"
^^
xsd:
string
]
]
;
sp:
variable
[
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
]
]
]
])
]
;
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
]
[
sp:
object
[
sp:
varName
"wellBoreNumber"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/spin/lib#numberWellbore>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreByName
;
arg:
wellBoreName
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreById
;
arg:
id
[
sp:
varName
"wellBoreNumber"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"wellBore2"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
ne
;
sp:
arg1
[
sp:
varName
"wellBore"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"wellBore2"
^^
xsd:
string
]
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"[RH-19] Well bore number "
;
sp:
arg2
[
sp:
varName
"wellBoreNumber"
^^
xsd:
string
]
;
sp:
arg3
" mismatches well bore name "
;
sp:
arg4
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"message"
^^
xsd:
string
]
])
]
;
spin:
constraint
[
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:
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:
wellBoreByName
;
arg:
wellBoreName
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
]
;
sp:
variable
[
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
"wellBore"
^^
xsd:
string
]
]
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"[RH-21] Unregistered well bore name "
;
sp:
arg2
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"message"
^^
xsd:
string
]
])
]
.
spin:
constraint
[
rdf:
type
sp:
Ask
;
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
rhspin:
companyWithName
;
arg:
name
[
sp:
varName
"companyName"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
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
;
]
;
]
;
]
;
]
)
;
rdfs:
comment
"[RH-04] Permission denied: User does not have permission(s) required to access the requested service"
^^
xsd:
string
;
]
;
spin:
constraint
[
rdf:
type
sp:
Ask
;
sp:
where
(
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
companyName
;
]
;
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
;
]
;
]
;
]
;
]
)
;
rdfs:
comment
"[RH-10] Invalid username or password: User authentication failed"
^^
xsd:
string
;
]
;
spin:
constraint
[
rdf:
type
sp:
Construct
;
sp:
templates
(
[
sp:
object
spin:
ConstraintViolation
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b1688
;
]
[
sp:
object
spin:
_this
;
sp:
predicate
spin:
violationRoot
;
sp:
subject
_:
b1688
;
]
[
sp:
object
ddr:
nameWellbore
;
sp:
predicate
spin:
violationPath
;
sp:
subject
_:
b1688
;
]
[
sp:
object
[
sp:
varName
"message"
^^
xsd:
string
;
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
_:
b1688
;
]
)
;
sp:
where
(
[
sp:
object
[
sp:
varName
"wellBoreName"
^^
xsd:
string
;
]
;
sp:
predicate
<http://www.reportinghub.no/ep/spin/lib#nameWellbore>
;
sp:
subject
spin:
_this
;
]
[
sp:
object
[
sp:
varName
"wellBoreNumber"
^^
xsd:
string
;
]
;
sp:
predicate
<http://www.reportinghub.no/ep/spin/lib#numberWellbore>
;
sp:
subject
spin:
_this
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreByName
;
arg:
wellBoreName
[
sp:
varName
"wellBoreName"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
sp:
varName
"wellBore"
^^
xsd:
string
;
]
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreById
;
arg:
id
[
sp:
varName
"wellBoreNumber"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
sp:
varName
"wellBore2"
^^
xsd:
string
;
]
;
]
[
rdf:
type
sp:
Filter
;
sp:
expression
[
rdf:
type
sp:
ne
;
sp:
arg1
[
sp:
varName
"wellBore"
^^
xsd:
string
;
]
;
sp:
arg2
[
sp:
varName
"wellBore2"
^^
xsd:
string
;
]
;
]
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"[RH-19] Fact Pages validation of the XML file failed with the following error: Well bore number "
;
sp:
arg2
[
sp:
varName
"wellBoreNumber"
^^
xsd:
string
;
]
;
sp:
arg3
" mismatches well bore name "
;
sp:
arg4
[
sp:
varName
"wellBoreName"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
sp:
varName
"message"
^^
xsd:
string
;
]
;
]
)
;
]
;
spin:
constraint
[
rdf:
type
sp:
Construct
;
sp:
templates
(
[
sp:
object
spin:
ConstraintViolation
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2058
;
]
[
sp:
object
spin:
_this
;
sp:
predicate
spin:
violationRoot
;
sp:
subject
_:
b2058
;
]
[
sp:
object
ddr:
nameWellbore
;
sp:
predicate
spin:
violationPath
;
sp:
subject
_:
b2058
;
]
[
sp:
object
[
sp:
varName
"message"
^^
xsd:
string
;
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
_:
b2058
;
]
)
;
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:
wellBoreByName
;
arg:
wellBoreName
[
sp:
varName
"wellBoreName"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
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
"wellBore"
^^
xsd:
string
;
]
;
]
;
]
;
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
fn:
concat
;
sp:
arg1
"[RH-19] Fact Pages validation of the XML file failed with the following error: Unregistered well bore name "
;
sp:
arg2
[
sp:
varName
"wellBoreName"
^^
xsd:
string
;
]
;
]
;
sp:
variable
[
sp:
varName
"message"
^^
xsd:
string
;
]
;
]
)
;
]
;
.
...
...
Please
register
or
login
to post a comment