What is the meaning of an owl:hasValue
restriction, and how is it different from owl:allValuesFrom
and owl:someValuesFrom
?
In an ontology, I want to write an axiom that says, “Every body that has a diploma is literate.” How can I write this?
What is the meaning of an owl:hasValue
restriction, and how is it different from owl:allValuesFrom
and owl:someValuesFrom
?
In an ontology, I want to write an axiom that says, “Every body that has a diploma is literate.” How can I write this?
Different types of restriction classes
Consider an individual x, a class C, a property P, and another individual y. Then there are a few class expressions that it sounds like you're concerned with:
someValuesFrom
An individual x is an element of the class ∃P.C if some individual y such that P(x,y) is an element of C. In Manchester syntax, ∃P.C is written as “P some C”.
allValuesFrom
An individual x is an element of the class ∀P.C if every every individual y such that P(x,y) is an element of C. In Manchester syntax ∀P.C is written as “P only C”.
hasValue
An individual x is an element of the class =P.y if it's the case that P(x,y). In Manchester syntax =P.y is written as “P value y”.
A version for datatype properties and object properies
In OWL, there are object properties that relate individuals to individuals, and datatype properties that relate individuals to literals. As a result, OWL actually has two types of restrictions for each of the constructions listed above: one for object properties and one for data properties. The meaning of each of these is laid out formally in 2.2.3 Class Expressions of the OWL 2 Web Ontology Language Direct Semantics (Second Edition) recommendation.
The diploma axiom
To write an OWL axiom expressing “every person that has a diploma is literate,” you'd need:
The axiom would be
This says that if an individual is a person, and has some diploma, then they are literate. In the RDF serialization of OWL (which is where you'd start to see the restriction classes like you mentioned), this looks like in the Protégé OWL editor, and in RDF/XML: