David Price

added constraint on wellname to well test

......@@ -85,16 +85,6 @@ arg:kindRef
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Platform>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckId ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
] ;
spin:constraint
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
......@@ -105,44 +95,28 @@ arg:kindRef
sp:predicate rdfs:label ;
sp:subject _:b2
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
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:bound ;
sp:arg1 [ sp:varName "wellBore"^^xsd:string
]
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:not ;
sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfWellBore ;
arg:wellBore
[ sp:varName "wellBore"^^xsd:string
sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfFieldWithName ;
arg:fieldName
[ sp:varName "fieldName"^^xsd:string
]
]
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "Your company is not the operator of well bore with name " ;
sp:arg2 [ sp:varName "wellBoreName"^^xsd:string
sp:arg1 "Your company is not the operator of field with name " ;
sp:arg2 [ sp:varName "fieldName"^^xsd:string
]
] ;
sp:variable
......@@ -161,28 +135,44 @@ arg:kindRef
sp:predicate rdfs:label ;
sp:subject _:b3
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
[ sp:varName "wellBoreName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
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:bound ;
sp:arg1 [ sp:varName "wellBore"^^xsd:string
]
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:not ;
sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfFieldWithName ;
arg:fieldName
[ sp:varName "fieldName"^^xsd:string
sp:arg1 [ rdf:type rhspin:currentUserIsOperatorOfWellBore ;
arg:wellBore
[ sp:varName "wellBore"^^xsd:string
]
]
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "Your company is not the operator of field with name " ;
sp:arg2 [ sp:varName "fieldName"^^xsd:string
sp:arg1 "Your company is not the operator of well bore with name " ;
sp:arg2 [ sp:varName "wellBoreName"^^xsd:string
]
] ;
sp:variable
......@@ -192,31 +182,31 @@ arg:kindRef
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckId ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_field> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckName ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckId ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckName ;
[ rdf:type mpr-proxy-constraints:CheckId ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_field> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckId ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckName ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckName ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
] ;
......@@ -226,17 +216,27 @@ arg:kindRef
arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckName ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Facility>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckId ;
[ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_field> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Field>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_platform> ;
arg:type <http://www.reportinghub.no/ep/schema/facility#Platform>
] ;
spin:constraint
[ rdf:type mpr-proxy-constraints:CheckIdAndNameMatch ;
arg:kindRef <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
arg:type <http://www.reportinghub.no/ep/schema/well#WellBore>
] .
......@@ -294,6 +294,46 @@ arg:kindRef
])
] .
<http://www.epim.no/schemas/mprml/1#Obj_wellTest>
spin:constraint
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "message"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b5
]) ;
sp:where ([ sp:object
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#nameWell> ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:not ;
sp:arg1 [ rdf:type rhspin:npdIndividualByName ;
arg:name
[ sp:varName "wellName"^^xsd:string
] ;
arg:type <http://www.reportinghub.no/ep/schema/well#Well>
]
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "[RH-19] Invalid well name : " ;
sp:arg2 [ sp:varName "wellName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "message"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/spin/mpr-proxy-constraints>
rdf:type owl:Ontology ;
rdfs:comment "Collection of constraints that are executed on the SXML proxy ontology for MPR schema based reports."^^xsd:string ;
......@@ -308,12 +348,12 @@ mpr-proxy-constraints:CheckId
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
sp:subject _:b5
sp:subject _:b6
] [ sp:object
[ sp:varName "message"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b5
sp:subject _:b6
]) ;
sp:where ([ sp:object
[ sp:varName "kindRef"^^xsd:string
......@@ -375,12 +415,12 @@ mpr-proxy-constraints:CheckIdAndNameMatch
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
sp:subject _:b6
sp:subject _:b7
] [ sp:object
[ sp:varName "message"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b6
sp:subject _:b7
]) ;
sp:where ([ sp:object
[ sp:varName "kindRef"^^xsd:string
......@@ -475,12 +515,12 @@ mpr-proxy-constraints:CheckName
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
sp:subject _:b7
sp:subject _:b8
] [ sp:object
[ sp:varName "message"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b7
sp:subject _:b8
]) ;
sp:where ([ sp:object
[ sp:varName "kindRef"^^xsd:string
......