SPIN_EP-DDR-constraints.spin.ttl
6.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# baseURI: http://www.reportinghub.no/ep/spin/ddr-constraints
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/ddr
# imports: http://www.reportinghub.no/ep/schema/1.0/equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/facility
# imports: http://www.reportinghub.no/ep/schema/1.0/organization
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# imports: http://www.reportinghub.no/ep/schema/1.0/well
# imports: http://www.reportinghub.no/np/schema/1.0/npd
@prefix : <http://www.reportinghub.no/ep/spin/ddr-constraints#> .
@prefix ddr: <http://www.reportinghub.no/ep/schema/ddr#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@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#> .
@prefix rhspin: <http://www.reportinghub.no/spin/rh#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
ddr:Obj_drillReport
spin:constraint
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object spin:_this ;
sp:predicate spin:violationRoot ;
sp:subject _:b1
] [ sp:object ddr:nameWell ;
sp:predicate spin:violationPath ;
sp:subject _:b1
] [ sp:object _:b2 ;
sp:predicate rdfs:label ;
sp:subject _:b1
]) ;
sp:where ([ sp:object _:b3 ;
sp:predicate ddr:nameWell ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ rdf:type sp:NotExists ;
sp:elements ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:wellByName ;
sp:arg1 _:b3
] ;
sp:variable _:b4
] [ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
sp:predicate rdf:type ;
sp:subject _:b4
])
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "Unregistered well name " ;
sp:arg2 _:b3
] ;
sp:variable _:b2
])
] ;
spin:constraint
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object spin:_this ;
sp:predicate spin:violationRoot ;
sp:subject _:b5
] [ sp:object ddr:nameWellbore ;
sp:predicate spin:violationPath ;
sp:subject _:b5
] [ sp:object _:b6 ;
sp:predicate rdfs:label ;
sp:subject _:b5
]) ;
sp:where ([ sp:object _:b7 ;
sp:predicate ddr:nameWellbore ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:wellBoreByName ;
sp:arg1 _:b7
] ;
sp:variable _:b8
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:not ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 _:b8
]
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "Unregistered well bore name " ;
sp:arg2 _:b7
] ;
sp:variable _:b6
])
] .
<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://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/ddr> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://spinrdf.org/spin> ;
owl:versionInfo "0.1.0"^^xsd:string .
_:b2 sp:varName "message"^^xsd:string .
_:b4 sp:varName "well"^^xsd:string .
_:b3 sp:varName "nameWell"^^xsd:string .
_:b6 sp:varName "message"^^xsd:string .
_:b8 sp:varName "wellBore"^^xsd:string .
_:b7 sp:varName "nameWellbore"^^xsd:string .