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?
Domain and Range are a source of confusion for newcomers to OWL. Domain and range are not constraints to be checked. They are axioms which are used by the reasoner to make inferences. 'Violating' a domain or range constraint does not necessarily mean that the ontology is inconsistent or contains errors.
owl:equivalentClass is a built-in property that links a class description to another class description. The meaning of such a class axiom is that the two class descriptions involved have the same class extension (i.e., both class extensions contain exactly the same set of individuals).
owl:Thing is about what your are trying to represent and model. It's the concept that seats in the top of all other concepts and it has to be present on the top by definition.
The first snippet means that a :Person
who has a parent necessarily have a :Person
-parent. However, a :Dog
may 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 allValuesFrom
restriction of the first snippet is not equivalent to:
:hasParent rdfs:domain :Person;
rdfs:range :Person .
In the case of the allValuesFrom
restriction, it is still possible that there are parents that are not persons. In the case of the rdfs:domain
/rdfs:range
combination, it is not possible. With allValuesFrom
restrictions, it's possible to say that persons have person-parents and that dogs have dog-parents, etc. With domain/range, you cannot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With