rdfs:comment"Checks if the currently logged in user works for a company that is the operator of a given well bore. If the well bore is part of a field that is managed by a BAA, then the company must be the operator of the BAA. Otherwise it will check the operator of the production licence attached to the well bore. This function is used to verify whether the current user can upload DDRs for the given well bore."^^xsd:string;
rdfs:label"current user is operator of well bore"^^xsd:string;
rdfs:subClassOfspin:Functions;
spin:body
[rdf:typesp:Ask;
sp:where([rdf:typesp:Bind;
sp:expression
[rdf:typesp:coalesce;
sp:arg1[rdf:typerhspin:wellBoreBAAOperator;
arg:wellBore
[sp:varName"wellBore"^^xsd:string
]
];
sp:arg2[rdf:typerhspin:wellBoreLicenceOperator;
arg:wellBore
[sp:varName"wellBore"^^xsd:string
]
]
];
sp:variable
[sp:varName"operator"^^xsd:string
]
][rdf:typesp:Filter;
sp:expression
[rdf:typesp:bound;
sp:arg1[sp:varName"operator"^^xsd:string
]
]
][rdf:typesp:Bind;
sp:expression
[rdf:typerhspin:companyName
];
sp:variable
[sp:varName"companyName"^^xsd:string
]
][rdf:typesp:Bind;
sp:expression
[rdf:typerhspin:companyWithName;
arg:name
[sp:varName"companyName"^^xsd:string
]
];
sp:variable
[sp:varName"company"^^xsd:string
]
][rdf:typesp:Filter;
sp:expression
[rdf:typesp:eq;
sp:arg1[sp:varName"company"^^xsd:string
];
sp:arg2[sp:varName"operator"^^xsd:string
]
]
])
];
spin:constraint
[rdf:typespl:Argument;
rdfs:comment"The well bore to check."^^xsd:string;
rdfs:comment"Gets the declared start time of the activity in a DDR, as an xsd:date literal."^^xsd:string;
...
...
@@ -2149,6 +2213,57 @@ rhspin:userName
rdfs:subClassOfspin:Functions;
spin:returnTypexsd:string.
rhspin:wellBoreBAAOperator
rdf:typespin:Function;
rdfs:comment"If a given well bore is part of a field that has a BAA as its owner, then this function returns the company operating the BAA. Otherwise returns nothing."^^xsd:string;