Let's say we have the following declarations:
Declaration(ObjectProperty(:likes))
Declaration( NamedIndividual(:John))
Declaration( NamedIndividual(:George) )
Declaration( NamedIndividual(:Fishing))
And the following assertion:
ObjectPropertyAssertion(:likes :John :Fishing)
Is there a way to assert that George doesn't like whatever John likes?
I thought of the following:
NegativeObjectPropertyAssertion(
:likes
:George
ObjectHasValue(
ObjectInverseOf(:likes)
:John
)
)
But I cannot load the above ontology in Protege so I assume the syntax is not correct.
ObjectPropertyAssertions (respectively NegativeObjectPropertyAssertions) can only make assertions about the existence (respectively none existence) of relations between 2 individuals. What you are trying to do is define a relation between an individual and a class using property assertions. This is not possible.
However, you can define the class of things that
johnlikes as follows:Note that if you want the activities that is liked by
johnto be listed, you have to give a name to the classObjectSomeValuesFrom(ObjectInverseOf(likes>) ObjectOneOf(john))- in this caseJohnLikes. This is because the reasoner only gives inferences for named classes not anonymous classes.Then the activities that
georgelikes will be those thatjohndoes not like (i.e.not JohnLikes).Here is an example ontology that defines some known activities as well as activities liked and not liked by
john: