Holger Knublauch

Removed nameWell constraint for good

...@@ -27,56 +27,22 @@ ...@@ -27,56 +27,22 @@
27 27
28 ddr:Obj_drillReport 28 ddr:Obj_drillReport
29 spin:constraint 29 spin:constraint
30 - [ rdf:type sp:Construct ; 30 + [ rdf:type sp:Ask ;
31 - sp:templates ([ sp:object spin:ConstraintViolation ; 31 + rdfs:comment "DDRs can only be submitted if a user is logged in"^^xsd:string ;
32 - sp:predicate rdf:type ; 32 + sp:where ([ rdf:type sp:Bind ;
33 - sp:subject _:b1
34 - ] [ sp:object spin:_this ;
35 - sp:predicate spin:violationRoot ;
36 - sp:subject _:b1
37 - ] [ sp:object ddr:nameWell ;
38 - sp:predicate spin:violationPath ;
39 - sp:subject _:b1
40 - ] [ sp:object
41 - [ sp:varName "message"^^xsd:string
42 - ] ;
43 - sp:predicate rdfs:label ;
44 - sp:subject _:b1
45 - ]) ;
46 - sp:where ([ sp:object
47 - [ sp:varName "wellName"^^xsd:string
48 - ] ;
49 - sp:predicate <http://www.reportinghub.no/ep/spin/lib#nameWell> ;
50 - sp:subject spin:_this
51 - ] [ rdf:type sp:Bind ;
52 sp:expression 33 sp:expression
53 - [ rdf:type rhspin:wellByName ; 34 + [ rdf:type rhspin:companyName
54 - arg:wellName
55 - [ sp:varName "wellName"^^xsd:string
56 - ]
57 ] ; 35 ] ;
58 sp:variable 36 sp:variable
59 - [ sp:varName "well"^^xsd:string 37 + [ sp:varName "companyName"^^xsd:string
60 ] 38 ]
61 ] [ rdf:type sp:Filter ; 39 ] [ rdf:type sp:Filter ;
62 sp:expression 40 sp:expression
63 [ rdf:type sp:not ; 41 [ rdf:type sp:not ;
64 - sp:arg1 [ rdf:type rhspin:npdTripleExists ; 42 + sp:arg1 [ rdf:type sp:bound ;
65 - sp:arg1 [ sp:varName "well"^^xsd:string 43 + sp:arg1 [ sp:varName "companyName"^^xsd:string
66 - ] ;
67 - sp:arg2 rdf:type ;
68 - sp:arg3 <http://www.reportinghub.no/ep/schema/well#Well>
69 ] 44 ]
70 ] 45 ]
71 - ] [ rdf:type sp:Bind ;
72 - sp:expression
73 - [ rdf:type fn:concat ;
74 - sp:arg1 "Unregistered well name " ;
75 - sp:arg2 [ sp:varName "wellName"^^xsd:string
76 - ]
77 - ] ;
78 - sp:variable
79 - [ sp:varName "message"^^xsd:string
80 ] 46 ]
81 ]) 47 ])
82 ] ; 48 ] ;
...@@ -84,18 +50,18 @@ ddr:Obj_drillReport ...@@ -84,18 +50,18 @@ ddr:Obj_drillReport
84 [ rdf:type sp:Construct ; 50 [ rdf:type sp:Construct ;
85 sp:templates ([ sp:object spin:ConstraintViolation ; 51 sp:templates ([ sp:object spin:ConstraintViolation ;
86 sp:predicate rdf:type ; 52 sp:predicate rdf:type ;
87 - sp:subject _:b2 53 + sp:subject _:b1
88 ] [ sp:object spin:_this ; 54 ] [ sp:object spin:_this ;
89 sp:predicate spin:violationRoot ; 55 sp:predicate spin:violationRoot ;
90 - sp:subject _:b2 56 + sp:subject _:b1
91 ] [ sp:object ddr:nameWellbore ; 57 ] [ sp:object ddr:nameWellbore ;
92 sp:predicate spin:violationPath ; 58 sp:predicate spin:violationPath ;
93 - sp:subject _:b2 59 + sp:subject _:b1
94 ] [ sp:object 60 ] [ sp:object
95 [ sp:varName "message"^^xsd:string 61 [ sp:varName "message"^^xsd:string
96 ] ; 62 ] ;
97 sp:predicate rdfs:label ; 63 sp:predicate rdfs:label ;
98 - sp:subject _:b2 64 + sp:subject _:b1
99 ]) ; 65 ]) ;
100 sp:where ([ sp:object 66 sp:where ([ sp:object
101 [ sp:varName "wellBoreName"^^xsd:string 67 [ sp:varName "wellBoreName"^^xsd:string
...@@ -131,24 +97,4 @@ ddr:Obj_drillReport ...@@ -131,24 +97,4 @@ ddr:Obj_drillReport
131 [ sp:varName "message"^^xsd:string 97 [ sp:varName "message"^^xsd:string
132 ] 98 ]
133 ]) 99 ])
134 - ] ;
135 - spin:constraint
136 - [ rdf:type sp:Ask ;
137 - rdfs:comment "DDRs can only be submitted if a user is logged in"^^xsd:string ;
138 - sp:where ([ rdf:type sp:Bind ;
139 - sp:expression
140 - [ rdf:type rhspin:companyName
141 - ] ;
142 - sp:variable
143 - [ sp:varName "companyName"^^xsd:string
144 - ]
145 - ] [ rdf:type sp:Filter ;
146 - sp:expression
147 - [ rdf:type sp:not ;
148 - sp:arg1 [ rdf:type sp:bound ;
149 - sp:arg1 [ sp:varName "companyName"^^xsd:string
150 - ]
151 - ]
152 - ]
153 - ])
154 ] . 100 ] .
......