I’m working on semantic webs and I’m wondering: is there any difference in a semanitc of writing a restriction like:
:Person
a owl:Class ;
rdfs:subClassOf
[ a owl:Restriction ;
owl:onProperty :hasParent ;
owl:allValuesFrom :Person
] .
and writing a range restriction like:
:hasParent rdfs:range :Person.
It seems to me that it means the same: a parent has to have a type of Person. Isn’t there any difference?
The first snippet means that a
:Personwho has a parent necessarily have a:Person-parent. However, a:Dogmay have a parent who is not a:Person, for instance. The second snippet says that anything who has a parent necessarily has a:Person-parent, regardless of what this thing is.Edit after krajol’s comment:
The
allValuesFromrestriction of the first snippet is not equivalent to:In the case of the
allValuesFromrestriction, it is still possible that there are parents that are not persons. In the case of therdfs:domain/rdfs:rangecombination, it is not possible. WithallValuesFromrestrictions, it’s possible to say that persons have person-parents and that dogs have dog-parents, etc. With domain/range, you cannot.