RDFS can say "a cat is a mammal". OWL can say how a property behaves, and what conditions put something in a class.
| Declaration | Meaning | What follows |
|---|---|---|
| owl:inverseOf | The relation reversed | Minji keeps Nabi → Nabi is kept by Minji |
| owl:TransitiveProperty | Can be chained | A finger is part of a hand, a hand part of an arm → a finger is part of an arm |
| owl:SymmetricProperty | Holds both ways | Minji is a friend of Junho → Junho is a friend of Minji |
| owl:FunctionalProperty | At most one value | Two birth dates are concluded to be the same value |
| owl:disjointWith | Classes that never overlap | Something that is both a cat and a dog is a contradiction |
| owl:equivalentClass | Classes that mean the same | A member of one is a member of the other |
ex:keeps owl:inverseOf ex:keptBy . # holds in reverse
ex:partOf a owl:TransitiveProperty . # holds when chained
ex:friendOf a owl:SymmetricProperty . # both directions
ex:birthDate a owl:FunctionalProperty . # at most one value
ex:Cat owl:disjointWith ex:Dog . # never both at once
ex:CatOwner owl:equivalentClass [ # a class made by definition
owl:intersectionOf ( ex:Person
[ a owl:Restriction ; owl:onProperty ex:keeps ; owl:someValuesFrom ex:Cat ] )
] .Defining a class by a condition
The last statement above is a definition: a cat owner is a person who keeps at least one cat. With that written, a reasoner classifies anyone who keeps a cat as a cat owner without being told. In reverse, someone only stated to be a cat owner is taken to keep some cat, unnamed.
Still inference, not validation
Two values on a functional property are not an error; they are inferred to be equal. A contradiction arises only when something you declared impossible, such as disjoint classes, is violated. To check value counts, use SHACL in the next lesson.
Profiles: trading expressiveness for speed
| Profile | Good fit |
|---|---|
| OWL 2 EL | Classifying large terminologies with hundreds of thousands of classes; common in the life sciences |
| OWL 2 QL | Answering queries by rewriting them to SQL; pairs with the virtual knowledge graphs of the previous lesson |
| OWL 2 RL | Implementing inference with a rule engine |
More OWL is not better. Decide which inferences you need and use that much. Most reusable vocabularies are RDFS plus a handful of OWL declarations.