Reputation: 944
as a beginner in OWL I find the difference of rdfs:range and Restrictions with owl:allValuesFrom a bit hard to grasp.
In "Semantic Web for the Working Ontologist" (2nd Edition) chapter 11, page 228f. a questionnaire is modeled somewhat like so:
q:Answer a owl:Class .
q:Question a owl:Class .
q:optionOf a owl:ObjectProperty ;
rdfs:domain q:Answer ;
rdfs:range q:Question ;
owl:inverseOf q:hasOption .
q:hasSelectedOption a owl:ObjectProperty ;
rdfs:subPropertyOf q:hasOption ;
rdfs:range q:SelectedAnswer.
q:AnsweredQuestion owl:equivalentClass
[a owl:Restriction
owl:onProperty q:hasSelectedOption
owl:someValuesFrom q:Answer] .
q:SelectedAnswer a owl:Class ;
rdfs:subClassOf q:Answer ;
rdfs:subclassOf
[a owl:Restriction ;
owl:onProperty q:enablesCandidate ;
owl:allValuesFrom q:EnabledQuestion ] .
q:EnabledQuestion a owl:Class .
q:enablesCandidate a owl:ObjectProperty ;
rdfs:domain q:Answer ;
rdfs:range q:Question .
Now the basic idea is that if an answer is selected, a new triple along q:hasSelectedOption is added to the triple store; this allows the inference that the selected answer is a q:SelectedAnswer (via rdfs:range).
Since members of q:SelectedAnswer are also members of the asserted Restriction (subClassOf), it can also be inferred that any ?object along q:enablesCandidate is of type q:EnabledQuestion ('universal inference').
With 'universal inference' I mean, that given
[a owl:Restriction ;
owl:onProperty P ;
owl:allValuesFrom C] .
it is entailed that for any individual that is a member of an owl:allValuesFrom restriction, any object asserted along predicate P must of type C.
I think somewhere in the Pizza tutorial it says that domain/range are for inferencing, whereas axioms are for 'data integrity constraints' (?), but isn't the the subClassOf-allValuesFrom-construct in q:SelectedAnswer also used for inferencing here?
And why not just assert q:enablesCandidate rdfs:range q:EnabledQuestion
?
Sorry, I think this duplicates owl:allValuesFrom and rdfs:range difference.
Upvotes: 0
Views: 68