Listing 4.ConstructWarnNurseAction query running on the Local Reasoning Service (LRS) component. |
-
1
CONSTRUCT {
-
2
_:f rdf:type ?t1 ; General:hasId [ General:hasID ?id ] ;
-
3
sosa:madeBySensor ?sen ;
-
4
SSNiot:hasSolution [
-
5
rdf:type SSNiot:Solution ;
-
6
SSNiot:requiresAction [
-
7
rdf:type NurseCall:WarnNurseAction ;
-
8
DUL:hasContext ?p1 ; General:hasStatus TaskAccio:New ] ] .
-
9
}
-
10
WHERE {
-
11
{
-
12
?f1 rdf:type ?t1 ; General:hasId ?idobj ; sosa:madeBySensor ?sen .
-
13
?idobj General:hasID ?id . ?sen SSNiot:isSubsystemOf ?sys .
-
14
?t1 rdfs:subClassOf SSNiot:DetectedFault .
-
15
-
16
?ble_ob1 rdf:type NurseCall:NursePresentObservation ;
-
17
sosa:hasResult ?ble_r1 .
-
18
?ble_r1 SAREFiot:observedDevice ?ble_b1 .
-
19
?p1 SAREFiot:ownsDevice ?ble_b1 .
-
20
}
-
21
-
22
FILTER NOT EXISTS {
-
23
?f3 SSNiot:hasSolution ?s1 ; General:hasId ?f3_idobj .
-
24
?f3_idobj General:hasID ?id .
-
25
}
-
26
-
27
FILTER NOT EXISTS {
-
28
{
-
29
?f2 rdf:type ?t1 ; SSNiot:hasSolution ?s2 .
-
30
?s2 SSNiot:requiresAction ?a2 .
-
31
?a2 rdf:type NurseCall:WarnNurseAction,
-
32
TaskAccio:NewOrActiveOrAssignedAction ;
-
33
DUL:hasContext ?p1
-
34
}
-
35
FILTER (?f1 != ?f2)
-
36
}
-
37
}
|