OWL Web Ontology Language
Semantics and Abstract Syntax
Appendix B. Examples (Informative)

Editors:
Peter F. Patel-Schneider, Bell Labs Research, Lucent Technologies
Ian Horrocks, Department of Computer Science, University of Manchester

Please refer to the errata for this document, which may include some normative corrections.

See also translations.


Contents


Appendix B. Examples (Informative)

This appendix gives examples of the concepts developed in the rest of the document.

B.1 Examples of Mapping from Abstract Syntax to RDF Graphs

The transformation rules in Section 4 can transform the ontology

Ontology(ex:ontology
  DatatypeProperty(ex:name)
  ObjectProperty(ex:author)
  Class(ex:Book)
  Class(ex:Person)

  Individual(type(ex:Book) 
        value(ex:author Individual(type(ex:Person) value(ex:name "Fred"^^xsd:string)))))

to

  ex:ontology rdf:type owl:Ontology .
  ex:name rdf:type owl:DatatypeProperty .
  ex:author rdf:type owl:ObjectProperty .
  ex:Book rdf:type owl:Class .
  ex:Person rdf:type owl:Class .

  _:x rdf:type ex:Book .
  _:x ex:author _:x1 .
  _:x1 rdf:type ex:Person .
  _:x1 ex:name "Fred"^^xsd:string .

and

Ontology(ex:ontology2
  Class(ex:Person)
  Class(ex:Student)
  ObjectProperty(ex:enrolledIn)
  Class(ex:Student complete ex:Person
                   restriction(ex:enrolledIn allValuesFrom(ex:School) minCardinality(1))))

can be transformed to

  ex:ontology2 rdf:type owl:Ontology .
  ex:enrolledIn rdf:type owl:ObjectProperty .
  ex:Person rdf:type owl:Class .
  ex:School rdf:type owl:Class .

  ex:Student rdf:type owl:Class .
  ex:Student owl:equivalentClass _:x .

  _:x owl:intersectionOf _:l1 .
  _:l1 rdf:first  ex:Person .
  _:l1 rdf:rest _:l2 .
  _:l2 rdf:first  _:lr .
  _:l2 rdf:rest rdf:nil .

  _:lr owl:intersectionOf _:lr1 .
  _:lr1 rdf:first _:r1 .
  _:lr1 rdf:rest _:lr2 .
  _:lr2 rdf:first _:r2 .
  _:lr2 rdf:rest rdf:nil .

  _:r1 rdf:type owl:Restriction .
  _:r1 owl:onProperty ex:enrolledIn .
  _:r1 owl:allValuesFrom ex:School .

  _:r2 rdf:type owl:Restriction .
  _:r2 owl:onProperty ex:enrolledIn .
  _:r2 owl:minCardinality "1"^^xsd:nonNegativeInteger .

B.2 Examples of Entailments in OWL DL and OWL Full

OWL DL supports the entailments that one would expect, as long as the vocabulary can be shown to belong to the appropriate piece of the domain of discourse. For example,

John friend Susan .

does not OWL DL entail

John rdf:type owl:Thing .
Susan rdf:type owl:Thing .
friend rdf:type owl:ObjectProperty .

The above three triples would have to be added before the following restriction could be concluded

John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:minCardinality "1"^^xsd:nonNegativeInteger .

However, once this extra information is added, all natural entailments follow, except for those that involve descriptions with loops. For example,

John rdf:type owl:Thing .
friend rdf:type owl:ObjectProperty .
John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:maxCardinality "0"^^xsd:nonNegativeInteger .

does not entail

John rdf:type _:y .
_:y owl:onProperty friend .
_:y owl:allValuesFrom _:y .

because there are no comprehension principles for such looping descriptions. It is precisely the lack of such comprehension principles that prevent the formation of paradoxes in OWL DL while still retaining natural entailments.

In OWL DL one can repair missing localizations in any separated-syntax KB by adding a particular set of localizing assertions consisting of all triples of the form

<individual> rdf:type owl:Thing .
<class> rdf:type owl:Class .
<oproperty> rdf:type owl:ObjectProperty .
<dtproperty> rdf:type owl:DatatypeProperty .

Call the result of adding all such assertions to a OWL DL KB the localization of the KB.

OWL Full supports the entailments that one would expect, and there is no need to provide typing information for the vocabulary. For example,

John friend Susan .

does OWL Full entail

John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:minCardinality "1"^^xsd:nonNegativeInteger .