Reputation: 19
I have an ontology wishing Protege and now I would like to implement rules.
I have an individual that has a literal PANEL = "R1-2B"
. I like to formulate a rule that if this value is "R1-2" then this individual has the object property "isGiveWaySign".
I have tried some things, but I SWRL does is not like supposed. I get just man new classes instead of setting just an object property.
My approaches look like:
PANEL(?a, ?b) ^ swrlb:substring(?b, "R1-2") -> isGiveWaySign(?a)
did I miss something?
Upvotes: 0
Views: 579
Reputation: 19
correction to the solution above that worked for me better:
Panel(?s, ?gws) ^ swrlb:contains(?gws, "R1-2") ^ Sign(?s) -> GiveWaySign(?s)
Upvotes: 1
Reputation: 19
I figured it out using the excellent blood pressure example here at stack overflow. I have simplified my ontology and could determine the solution for my problem:
Panel(?s, ?gws) ^ swrlb:contains(?gws, "R1-2") ^ Sign(?bs) -> GiveWaySign(?bs)
Upvotes: 0