W3C

OWL 2 Web Ontology Language
Quick Reference Guide (Second Edition)

W3C Recommendation 11 December 2012

This version:
http://www.w3.org/TR/2012/REC-owl2-quick-reference-20121211/
Latest version (series 2):
http://www.w3.org/TR/owl2-quick-reference/
Latest Recommendation:
http://www.w3.org/TR/owl-quick-reference
Previous version:
http://www.w3.org/TR/2012/PER-owl2-quick-reference-20121018/
Editors:
Jie Bao, formerly at Rensselaer Polytechnic Institute
Elisa F. Kendall, Sandpiper Software, Inc.
Deborah L. McGuinness, Rensselaer Polytechnic Institute
Peter F. Patel-Schneider, Nuance Communications
Contributors:
Li Ding, formerly at Rensselaer Polytechnic Institute
Ankesh Khandelwal, Rensselaer Polytechnic Institute

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

A color-coded version of this document showing changes made since the previous version is also available.

This document is also available in these non-normative formats: PDF version, Reference Card.

See also translations.


Abstract

The OWL 2 Web Ontology Language, informally 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. The OWL 2 Document Overview describes the overall state of OWL 2, and should be read before other OWL 2 documents.

This document provides a non-normative quick reference guide to the OWL 2 language. It also provides links to other documents, including the OWL 2 Primer for language introduction and examples, the OWL 2 Structural Specification and Functional Syntax document for more details of the functional syntax, and the OWL 2 New Features and Rationale document for new feature descriptions.

Status of this Document

May Be Superseded

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

Summary of Changes

There have been no substantive changes since the previous version. For details on the minor changes see the change log and color-coded diff.

Please Send Comments

Please send any comments to [email protected] (public archive). Although work on this document by the OWL Working Group is complete, comments may be addressed in the errata or in future revisions. Open discussion among developers is welcome at [email protected] (public archive).

Endorsed By W3C

This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

Patents

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. This document is informative only. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent.


Table of Contents


1 Names, Prefixes, and Notation

Names in OWL 2 are IRIs, often written in a shorthand prefix:localname, where prefix: is a prefix name that expands to an IRI, and localname is the remainder of the name. The standard prefix names in OWL 2 are:

Prefix NameExpansion
rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs:http://www.w3.org/2000/01/rdf-schema#
owl:http://www.w3.org/2002/07/owl#
xsd:http://www.w3.org/2001/XMLSchema#

We use notation conventions in the following tables*:

LettersMeaningLettersMeaningLettersMeaningLettersMeaning
Cclass expressionCNclass nameDdata rangeDNdatatype name
Pobject property expressionPNobject property nameRdata propertyAannotation property
aindividualaNindividual name_:aanonymous individual (a blank node label)vliteral
nnon-negative integer**ffacetONontology nameUIRI
sIRI or anonymous individualtIRI, anonymous individual, or literalpprefix name_:xblank node
(a1 … an)RDF list

* All of the above can have subscripts. ** as a shorthand for "n"^^xsd:nonNegativeInteger

2 OWL 2 constructs and axioms

For an OWL 2 DL ontology, there are some global restrictions on axioms.

In the following tables the first column provides links to the Primer (if applicable), the second column provides links to the Functional Syntax, and the third column gives RDF triples in the Turtle syntax.

2.1 Class Expressions

Predefined and Named Classes

Language FeatureFunctional SyntaxRDF Syntax
named classCNCN
universal classowl:Thingowl:Thing
empty classowl:Nothingowl:Nothing

Boolean Connectives and Enumeration of Individuals

Language FeatureFunctional SyntaxRDF Syntax
intersectionObjectIntersectionOf(C1 … Cn)_:x rdf:type owl:Class.
_:x owl:intersectionOf ( C1 … Cn ).
unionObjectUnionOf(C1 … Cn)_:x rdf:type owl:Class.
_:x owl:unionOf ( C1 … Cn ).
complementObjectComplementOf(C)_:x rdf:type owl:Class.
_:x owl:complementOf C.
enumerationObjectOneOf(a1 … an)_:x rdf:type owl:Class.
_:x owl:oneOf ( a1 … an ).

Object Property Restrictions

Language FeatureFunctional SyntaxRDF Syntax
universalObjectAllValuesFrom(P C)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:allValuesFrom C
existentialObjectSomeValuesFrom(P C)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:someValuesFrom C
individual valueObjectHasValue(P a)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:hasValue a.
local reflexivityObjectHasSelf(P)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:hasSelf "true"^^xsd:boolean.
exact cardinalityObjectExactCardinality(n P)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:cardinality n.
qualified exact cardinalityObjectExactCardinality(n P C)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:qualifiedCardinality n.
_:x owl:onClass C.
maximum cardinalityObjectMaxCardinality(n P)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:maxCardinality n.
qualified maximum cardinalityObjectMaxCardinality(n P C)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:maxQualifiedCardinality n.
_:x owl:onClass C.
minimum cardinalityObjectMinCardinality(n P)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:minCardinality n.
qualified minimum cardinalityObjectMinCardinality(n P C)_:x rdf:type owl:Restriction.
_:x owl:onProperty P.
_:x owl:minQualifiedCardinality n.
_:x owl:onClass C.

Data Property Restrictions

Language FeatureFunctional SyntaxRDF Syntax
universalDataAllValuesFrom(R D)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:allValuesFrom D.
existentialDataSomeValuesFrom(R D)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:someValuesFrom D.
literal valueDataHasValue(R v)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:hasValue v.
exact cardinalityDataExactCardinality(n R)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:cardinality n.
qualified exact cardinalityDataExactCardinality(n R D)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:qualifiedCardinality n.
_:x owl:onDataRange D.
maximum cardinalityDataMaxCardinality(n R)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:maxCardinality n.
qualified maximum cardinalityDataMaxCardinality(n R D)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:maxQualifiedCardinality n.
_:x owl:onDataRange D.
minimum cardinalityDataMinCardinality(n R)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:minCardinality n.
qualified minimum cardinalityDataMinCardinality(n R D)_:x rdf:type owl:Restriction.
_:x owl:onProperty R.
_:x owl:minQualifiedCardinality n.
_:x owl:onDataRange D.

Restrictions Using n-ary Data Range

In the following table 'Dn' is an n-ary data range.

Language FeatureFunctional SyntaxRDF Syntax
n-ary universalDataAllValuesFrom(R1 … Rn Dn)_:x rdf:type owl:Restriction.
_:x owl:onProperties ( R1 … Rn ).
_:x owl:allValuesFrom Dn.
n-ary existentialDataSomeValuesFrom(R1 … Rn Dn)_:x rdf:type owl:Restriction.
_:x owl:onProperties ( R1 … Rn).
_:x owl:someValuesFrom Dn.

2.2 Properties

Object Property Expressions

Language FeatureFunctional SyntaxRDF Syntax
named object propertyPNPN
universal object propertyowl:topObjectPropertyowl:topObjectProperty
empty object propertyowl:bottomObjectPropertyowl:bottomObjectProperty
inverse propertyObjectInverseOf(PN)_:x owl:inverseOf PN

Data Property Expressions

Language FeatureFunctional SyntaxRDF Syntax
named data propertyRR
universal data propertyowl:topDataPropertyowl:topDataProperty
empty data propertyowl:bottomDataPropertyowl:bottomDataProperty

2.3 Individuals & Literals

Language FeatureFunctional SyntaxRDF Syntax
named individualaNaN
anonymous individual_:a_:a
literal (datatype value)"abc"^^DN"abc"^^DN

2.4 Data Ranges

Data Range Expressions

Language FeatureFunctional SyntaxRDF Syntax
named datatypeDNDN
data range complementDataComplementOf(D)_:x rdf:type rdfs:Datatype.
_:x owl:datatypeComplementOf D.
data range intersectionDataIntersectionOf(D1…Dn)_:x rdf:type rdfs:Datatype.
_:x owl:intersectionOf (D1…Dn).
data range unionDataUnionOf(D1…Dn)_:x rdf:type rdfs:Datatype.
_:x owl:unionOf (D1…Dn).
literal enumerationDataOneOf(v1 … vn)_:x rdf:type rdfs:Datatype.
_:x owl:oneOf ( v1 … vn ).
datatype restrictionDatatypeRestriction(DN f1 v1 … fn vn)_:x rdf:type rdfs:Datatype.
_:x owl:onDatatype DN.
_:x owl:withRestrictions (_:x1 ... _:xn).
_:xj fj vj.      j=1…n

2.5 Axioms

Class Expression Axioms

Language FeatureFunctional SyntaxRDF Syntax
subclassSubClassOf(C1 C2)C1 rdfs:subClassOf C2.
equivalent classesEquivalentClasses(C1 … Cn)Cj owl:equivalentClass Cj+1. j=1…n-1
disjoint classesDisjointClasses(C1 C2)C1 owl:disjointWith C2.
pairwise disjoint classesDisjointClasses(C1 … Cn)_:x rdf:type owl:AllDisjointClasses.
_:x owl:members ( C1 … Cn ).
disjoint unionDisjointUnionOf(CN C1 … Cn)CN owl:disjointUnionOf ( C1 … Cn ).

Object Property Axioms

Language FeatureFunctional SyntaxRDF Syntax
subpropertySubObjectPropertyOf(P1 P2)P1 rdfs:subPropertyOf P2.
property chain inclusionSubObjectPropertyOf(ObjectPropertyChain(P1 … Pn) P)P owl:propertyChainAxiom (P1 … Pn).
property domainObjectPropertyDomain(P C)P rdfs:domain C.
property rangeObjectPropertyRange(P C)P rdfs:range C.
equivalent propertiesEquivalentObjectProperties(P1 … Pn)Pj owl:equivalentProperty Pj+1. j=1…n-1
disjoint propertiesDisjointObjectProperties(P1 P2)P1 owl:propertyDisjointWith P2.
pairwise disjoint propertiesDisjointObjectProperties(P1 … Pn)_:x rdf:type owl:AllDisjointProperties.
_:x owl:members ( P1 … Pn ).
inverse propertiesInverseObjectProperties(P1 P2)P1 owl:inverseOf P2.
functional propertyFunctionalObjectProperty(P)P rdf:type owl:FunctionalProperty.
inverse functional propertyInverseFunctionalObjectProperty(P)P rdf:type owl:InverseFunctionalProperty.
reflexive propertyReflexiveObjectProperty(P)P rdf:type owl:ReflexiveProperty.
irreflexive propertyIrreflexiveObjectProperty(P)P rdf:type owl:IrreflexiveProperty.
symmetric propertySymmetricObjectProperty(P)P rdf:type owl:SymmetricProperty.
asymmetric propertyAsymmetricObjectProperty(P)P rdf:type owl:AsymmetricProperty.
transitive propertyTransitiveObjectProperty(P)P rdf:type owl:TransitiveProperty.

Data Property Axioms

Language FeatureFunctional SyntaxRDF Syntax
subpropertySubDataPropertyOf(R1 R2)R1 rdfs:subPropertyOf R2.
property domainDataPropertyDomain(R C)R rdfs:domain C.
property rangeDataPropertyRange(R D)R rdfs:range D.
equivalent propertiesEquivalentDataProperties(R1 … Rn)Rj owl:equivalentProperty Rj+1. j=1…n-1
disjoint propertiesDisjointDataProperties(R1 R2)R1 owl:propertyDisjointWith R2.
pairwise disjoint propertiesDisjointDataProperties(R1 … Rn)_:x rdf:type owl:AllDisjointProperties.
_:x owl:members ( R1 … Rn ).
functional propertyFunctionalDataProperty(R)R rdf:type owl:FunctionalProperty.

Datatype Definitions

Language FeatureFunctional SyntaxRDF Syntax
datatype definitionDatatypeDefinition(DN D)DN owl:equivalentClass D.

Assertions

Language FeatureFunctional SyntaxRDF Syntax
individual equalitySameIndividual(a1 … an)aj owl:sameAs aj+1. j=1…n-1
individual inequalityDifferentIndividuals(a1 a2)a1 owl:differentFrom a2.
pairwise individual inequalityDifferentIndividuals(a1 … an)_:x rdf:type owl:AllDifferent.
_:x owl:members (a1 … an).
class assertionClassAssertion(C a)a rdf:type C.
positive object property assertionObjectPropertyAssertion( PN a1 a2 )a1 PN a2.
positive data property assertionDataPropertyAssertion( R a v )a R v.
negative object property assertionNegativeObjectPropertyAssertion(P a1 a2 )_:x rdf:type owl:NegativePropertyAssertion.
_:x owl:sourceIndividual a1.
_:x owl:assertionProperty P.
_:x owl:targetIndividual a2.
negative data property assertionNegativeDataPropertyAssertion(R a v )_:x rdf:type owl:NegativePropertyAssertion.
_:x owl:sourceIndividual a.
_:x owl:assertionProperty R.
_:x owl:targetValue v.

Keys

Language FeatureFunctional SyntaxRDF Syntax
KeyHasKey(C (P1 … Pm) (R1 … Rn) )C owl:hasKey (P1 … Pm R1 … Rn).
m+n>0


2.6 Declarations

Language FeatureFunctional SyntaxRDF Syntax
classDeclaration( Class( CN ) )CN rdf:type owl:Class.
datatypeDeclaration( Datatype( DN ) )DN rdf:type rdfs:Datatype.
object propertyDeclaration( ObjectProperty( PN ) )PN rdf:type owl:ObjectProperty.
data propertyDeclaration( DataProperty( R ) )R rdf:type owl:DatatypeProperty.
annotation propertyDeclaration( AnnotationProperty( A ) )A rdf:type owl:AnnotationProperty.
named individualDeclaration( NamedIndividual( aN ) )aN rdf:type owl:NamedIndividual.

2.7 Annotations

Annotations

Language FeatureFunctional SyntaxRDF Syntax
annotation assertionAnnotationAssertion(A s t)s A t.
annotation of an axiom
where the axiom in RDF is one or more triples of the form si U ti, i.e., with the same predicate U.
AXIOM(Annotation(A t) …)_:xi A t.
si U ti.

_:xi rdf:type owl:Axiom.
_:xi owl:annotatedSource si.
_:xi owl:annotatedProperty U.
_:xi owl:annotatedTarget ti.
annotation of an axiom
where the axiom in RDF is _:x U t1
AXIOM(Annotation(A t) … )
_:x A t.
_:x U t1.
annotation of another annotation
(the other annotation in RDF starts with s1)
Annotation(Annotation(A t) … A1 t1)_:x A t.
s1 A1 t1.

_:x rdf:type owl:Annotation.
_:x owl:annotatedSource s1.
_:x owl:annotatedProperty A1.
_:x owl:annotatedTarget t1.

Annotation Properties

Language FeatureFunctional SyntaxRDF Syntax
named annotation propertyAA
human-readable namerdfs:labelrdfs:label
human-readable commentrdfs:commentrdfs:comment
additional informationrdfs:seeAlsordfs:seeAlso
defining agentrdfs:isDefinedByrdfs:isDefinedBy
version informationowl:versionInfoowl:versionInfo
deprecationowl:deprecatedowl:deprecated
backwards compatibilityowl:backwardCompatibleWithowl:backwardCompatibleWith
incompatibilityowl:incompatibleWithowl:incompatibleWith
prior versionowl:priorVersionowl:priorVersion

Annotation Axioms

Language FeatureFunctional SyntaxRDF Syntax
annotation subpropertiesSubAnnotationPropertyOf(A1 A2)A1 rdfs:subPropertyOf A2.
annotation property domainAnnotationPropertyDomain(A U)A rdfs:domain U.
annotation property rangeAnnotationPropertyRange(A U)A rdfs:range U.

2.8 Ontologies

Ontologies

Language FeatureFunctional SyntaxRDF Syntax
OWL ontology
(importing)1 2

Ontology([ON [U]]
  Import(ON1)...
  Annotation(A t)
  ...
)
ON rdf:type owl:Ontology.
[ON owl:versionIRI U.]
ON owl:imports ON1. ...
ON A t.
...
prefix declaration3Prefix(p=U)@prefix p U.
  1. [ ] represents optional constructs
  2. In the RDF syntax _:x is used in place of ON if there is no ontology name.
  3. RDF syntax is in Turtle, other RDF serializations may vary.


3 Built-in Datatypes and Facets

3.1 Built-in Datatypes

Universal Datatyperdfs:Literal
Numbersowl:rationalowl:real
xsd:doublexsd:floatxsd:decimalxsd:integer
xsd:longxsd:intxsd:shortxsd:byte
xsd:nonNegativeIntegerxsd:nonPositiveInteger
xsd:positiveIntegerxsd:negativeInteger
xsd:unsignedLongxsd:unsignedInt
xsd:unsignedShortxsd:unsignedByte
Stringsrdf:PlainLiteral (RDF plain literals)
xsd:stringxsd:NCNamexsd:Namexsd:NMTOKEN
xsd:tokenxsd:languagexsd:normalizedString
Boolean Valuesxsd:boolean (value space: true and false)
Binary Dataxsd:base64Binaryxsd:hexBinary
IRIsxsd:anyURI
Time Instantsxsd:dateTime (optional time zone offset)
xsd:dateTimeStamp (required time zone offset)
XML Literalsrdf:XMLLiteral

3.2 Facets

FacetValueApplicable DatatypesExplanation
xsd:minInclusive
xsd:maxInclusive
xsd:minExclusive
xsd:maxExclusive
literal in the corresponding datatypeNumbers,
Time Instants
Restricts the value-space to greater than (equal to) or lesser than (equal to) a value
xsd:minLength
xsd:maxLength
xsd:length
Non-negative integerStrings,
Binary Data,
IRIs
Restricts the value-space based on the
lengths of the literals
xsd:patternxsd:string literal as a regular expressionStrings,
IRIs
Restricts the value space to literals that> match the regular expression
rdf:langRangexsd:string literal as a regular expressionrdf:PlainLiteralRestricts the value space to literals with language tags that match the regular expression

4 Appendix

4.1 New Features in OWL 2

Class Expressions
Class Axioms
Property Expressions
Property Axioms
Data Ranges
Assertions
Annotation
Extra Built-in Datatypes
  • owl:rational, owl:real, xsd:dateTimeStamp, rdf:PlainLiteral
Others

4.2 Additional Vocabulary in OWL 2 RDF Syntax

FeatureVocabularyNote
data rangeowl:DataRangedeprecated in OWL 2, replaced by rdfs:Datatype
membership of a set of pairwise different individualsowl:distinctMemberscan alternatively use owl:members
ontology propertyowl:OntologyProperty
deprecationowl:DeprecatedClass,
owl:DeprecatedProperty
alternative RDF syntax:
s rdf:type owl:DeprecatedClass . or
s rdf:type owl:DeprecatedProperty .
can be replaced by

s owl:deprecated "true"^^xsd:boolean .

5 Appendix: Change Log (Informative)

5.1 Changes Since Recommendation

This section summarizes the changes to this document since the Recommendation of 27 October, 2009.

5.2 Changes Since Proposed Recommendation

This section summarizes the changes to this document since the Proposed Recommendation of 22 September, 2009.

5.3 Changes Since Candidate Recommendation

This section summarizes the changes to this document since the Candidate Recommendation of 11 June, 2009.

6 Acknowledgments

The starting point for the development of OWL 2 was the OWL1.1 member submission, itself a result of user and developer feedback, and in particular of information gathered during the OWL Experiences and Directions (OWLED) Workshop series. The working group also considered postponed issues from the WebOnt Working Group.

This document has been produced by the OWL Working Group (see below), and its contents reflect extensive discussions within the Working Group as a whole. The editors extend special thanks to Bernardo Cuenca Grau (Oxford University), Christine Golbreich (Université de Versailles St-Quentin and LIRMM), Ivan Herman (W3C/ERCIM), and Bijan Parsia (University of Manchester) for their thorough reviews.

The regular attendees at meetings of the OWL Working Group at the time of publication of this document were: Jie Bao (RPI), Diego Calvanese (Free University of Bozen-Bolzano), Bernardo Cuenca Grau (Oxford University Computing Laboratory), Martin Dzbor (Open University), Achille Fokoue (IBM Corporation), Christine Golbreich (Université de Versailles St-Quentin and LIRMM), Sandro Hawke (W3C/MIT), Ivan Herman (W3C/ERCIM), Rinke Hoekstra (University of Amsterdam), Ian Horrocks (Oxford University Computing Laboratory), Elisa Kendall (Sandpiper Software), Markus Krötzsch (FZI), Carsten Lutz (Universität Bremen), Deborah L. McGuinness (RPI), Boris Motik (Oxford University Computing Laboratory), Jeff Pan (University of Aberdeen), Bijan Parsia (University of Manchester), Peter F. Patel-Schneider (Bell Labs Research, Alcatel-Lucent), Sebastian Rudolph (FZI), Alan Ruttenberg (Science Commons), Uli Sattler (University of Manchester), Michael Schneider (FZI), Mike Smith (Clark & Parsia), Evan Wallace (NIST), Zhe Wu (Oracle Corporation), and Antoine Zimmermann (DERI Galway). We would also like to thank past members of the working group: Jeremy Carroll, Jim Hendler, and Vipul Kashyap.