自宅にユーザーがいないときにオフになっているすべてのアクチュエーターを抽出する方法。Jena ルールを記述しようとしましたが、適切な出力を取得できません。私が望む望ましい結果を追加しました。ルールを書くのに助けが必要です。
[rule1: noValue(:users :hasLocation :home) ->
(:actuators :hasLocation :home)
(:actuators :state "OFF"^^xsd:boolean)]
[rule2: noValue(:users :hasLocation :home) ->
(?x rdf:type :actuators)
(?x :hasLocation :home)
(?x :state "OFF"^^xsd:boolean)]
{ rulex: [noValue(:subject1 :hasPropertyP2 :Object1) ->
(:subject2 :hasProperty1 :Object2)
(:subject2 :hasPropertyP3 Object3)] }
Ontology:
class:user
Individual user_1 -> user
Individual user_2 -> user
.
.
class: actuators
subclass: ac -> actuators
subclass: light -> actuators
subclass: other -> actuators
Individual central_ac -> ac
Individual room_lighting -> light
Individual tv -> other
Individual refridgration -> other
Individual heater -> other
result for rule1 [:actuators :state "OFF"^^xsd:boolean]
result for rule2 [:4e62503a:14b01762f42:-7eea :state "OFF"^^xsd:boolean]
desired result:
[central_ac :state "OFF"^^xsd:boolean]
[room_lighting :state "OFF"^^xsd:boolean]
[tv :state "OFF"^^xsd:boolean]
.
.