The OWL 2 Web Ontology Language (OWL 2) is an ontology language for the Semantic Web with formally defined meaning. OWL 2 ontologies provide classes, properties, individuals, and data values and are stored as Semantic Web documents. OWL 2 ontologies can be used along with information written in RDF, and OWL 2 ontologies themselves are primarily exchanged as RDF documents.
In an OWL 2 DL ontology, as in OWL 1, the sets of object properties, datatype properties, annotation properties and ontology properties must be mutually disjoint. In other words, no IRI I is declared in Ax (set of axioms in ontology) as being of more than one type of property; that is, no I is declared in Ax to be both object and data, object and annotation, or data and annotation property. Hence, dc:creator cannot be at the same time a datatype property and an annotation property.
In OWL2 DL a resource cannot be a class, property, or instance at the same time - they may share the same name (this is called “punning”) but will always be treated as distinct things by the underlying logic. With punning, an IRI may denote different entity-types (e.g. both an individual and a class) at the same time. For instance, in OWL 2 it is possible to use the same IRI as a name for both a class and an individual, but with the understanding that the class and the individual are two different views on the same IRI, i.e. they are interpreted semantically as if they were distinct.
Ontologies that are not in OWL 2 DL are often said to belong to OWL 2 Full, and can only be interpreted under RDF-Based Semantics. OWL 2 Full is used to refer to RDF graphs considered as OWL 2 ontologies and interpreted using the RDF-Based Semantics. OWL 2 DL is a syntactically restricted version of OWL 2 Full where the restrictions are designed to make life easier for implementors (OWL 2 Full is undecidable while with OWL 2 DL reasoners can be written in principle to return yes/no answers), and the most straightforward extension of RDFS. The two main differences are that under the Direct Semantics annotations have no formal meaning and under the RDF-Based Semantics there are some extra inferences that arise from the RDF view of the universe. Some characteristics under the OWL 2 RDF-Based Semantics (OWL 2 full) include
- For annotations properties, annotations are not "semantic-free". As every other triple or set of triples occurring in an RDF graph, an annotation is assigned a truth value by any given OWL 2 RDF-Based interpretation.
- Individuals may play different "roles". For example, an individual can be both a data property and an annotation property, since the different parts of the universe of an OWL 2 RDF-Based interpretation are not required to be mutually disjoint, or an individual can be both a class and a property by associating both a class extension and a property extension with it.
- There is usually no need to provide localizing information (e.g., by means of "typing triples") for the IRIs occurring in an ontology. As for the RDF Semantics, the OWL 2 RDF-Based semantic conditions have been designed to ensure that the denotation of any IRI will be in the appropriate part of the universe. For example, the RDF triple "C owl:disjointWith D" is sufficient to deduce that the denotations of the IRIs C and D are actually classes. It is not necessary to explicitly add additional typing triples "C rdf:type rdfs:Class" and "D rdf:type rdfs:Class" to the ontology.
- Every class represents a specific set of individuals, called the class extension of the class: an individual a is an instance of a class C, if a is a member of the class extension ICEXT(C). Since a class is itself an individual under the OWL 2 RDF-Based Semantics, classes are distinguished from their respective class extensions. This distinction allows, for example, that a class may be an instance of itself by being a member of its own class extension. Also, two classes may be equivalent by sharing the same class extension, although being different individuals, e.g., they do not need to share the same properties. Similarly, every property has an associated property extension that consists of pairs of individuals: an individual a1 has a relationship to an individual a2 with respect to a property p if the pair ( a1 , a2 ) is a member of the property extension IEXT(p). Again, properties are distinguished from their property extensions