Quick Reference Guide

From OWL
Revision as of 21:22, 27 November 2008 by IanHorrocks (Talk | contribs)

Jump to: navigation, search

__NUMBEREDHEADINGS__

[Hide Review Comments]

Document title:
OWL 2 Web Ontology Language
Quick Reference Guide (Second Edition)
Authors
Jie Bao, Rensselaer Polytechnic Institute
Elisa F. Kendall, Sandpiper Software, Inc.
Deborah L. McGuinness, Rensselaer Polytechnic Institute
Evan K. Wallace, NIST
Contributors
Li Ding, Rensselaer Polytechnic Institute
Ankesh Khandelwal, Rensselaer Polytechnic Institute
Peter F. Patel-Schneider, Bell Labs Research, Alcatel-Lucent
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 is intended to provide a quick reference to the OWL 2 language, similar to what was provided in the Language Synopsis section of the OWL Web Ontology Language Overview. Inspiration for this effort includes work by the ebiquity Research Group at the University of Maryland Baltimore County (UMBC) on earlier versions of a Reference Card for the Semantic Web.
A draft printable version is available [1], but it is obsolete with respect to the current wiki version.
Status of this Document
This is an editors' draft. The intended final status of this document has not yet been determined; since it may become a Recommendation, it should be considered a Recommendation-Track document for now.
The Quick Reference Guide complements the OWL 2 Primer, an updated version of which will be published in due course.
The OWL Working Group solicits feedback on how to improve and update this document.

Copyright © 2008-2009 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.


Editor's Note: To do list:

1 OWL/OWL 2 Vocabulary

Shaded constructs are only available in OWL 2.

  • OWL Classes
all OWL individuals owl:Thing
empty class owl:Nothing


Connectives and Enumeration
intersection IntersectionOf(C1 … Cn) x owl:intersectionOf [ C1 … Cn ]. Cj an OWL class
union UnionOf(C1 … Cn) x owl:unionOf [ C1 … Cn ]. Cj an OWL class
complement ComplementOf(C) x owl:complementOf C. C an OWL class
enumeration OneOf(i1 … in) x owl:oneOf [ i1 … in ]. ij an OWL individual


Restrictions Using Object Properties owl:Restriction
Every owl:Restriction is an owl:Class.
universal AllValuesFrom(P C) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:allValuesFrom C
P an object property. C an OWL class
existential SomeValuesFrom(P C) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:someValuesFrom C
P an object property. C an OWL class
individual value HasValue(P i) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:hasValue i.
P an object property. i an individual
self ExistsSelf(P) x rdf:type owl:SelfRestriction.
x owl:onProperty P.
P an object property
Cardinality Restrictions
exact cardinality ExactCardinality(n P) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:cardinality n.
P an object property. n a nonNegativeInteger
maximum cardinality MaxCardinality(n P) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:maxCardinality n.
P an object property. n a nonNegativeInteger
minimum cardinality MinCardinality(n P) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:minCardinality n.
P an object property. n a nonNegativeInteger
Qualified Cardinality Restrictions
exact cardinality ExactCardinality(n P C) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:qualifiedCardinality n.
x owl:onClass C.
P an object property. n a nonNegativeInteger . C an OWL class
maximum cardinality MaxCardinality(n P C) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:minQualifiedCardinality n.
x owl:onClass C.
P an object property. n a nonNegativeInteger; C an OWL class
minimum cardinality MinCardinality(n P C) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:maxQualifiedCardinality n.
x owl:onClass C.
P an object property. n a nonNegativeInteger . C an OWL class


Restrictions Using Data Properties owl:Restriction
Every owl:Restriction is an owl:Class.
universal AllValuesFrom(P D) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:allValuesFrom D.
P a data property. D a datatype
existential SomeValuesFrom(P D) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:someValuesFrom D.
P a data property. D a datatype
n-ary universal AllValuesFrom(P1 … Pn D) x rdf:type owl:Restriction.
x owl:onProperties [ P1 … Pn ].
x owl:allValuesFrom D.
Pi a data property. D an n-ary datatype
n-ary existential SomeValuesFrom(P1 … Pn D) x rdf:type owl:Restriction.
x owl:onProperties [ P1 … Pn].
x owl:someValuesFrom D.
Pi a data property. D an n-ary datatype
individual value HasValue(P v) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:hasValue v.
P an object property. v a literal
Cardinality Restrictions
exact cardinality ExactCardinality(n P) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:cardinality n.
P a data property. n a nonNegativeInteger
maximum cardinality MaxCardinality(n P) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:maxCardinality n.
P a data property. n a nonNegativeInteger
minimum cardinality MinCardinality(n P) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:minCardinality n.
P a data property. n a nonNegativeInteger
Qualified Cardinality Restrictions
exact cardinality ExactCardinality(n P D) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:qualifiedCardinality n.
x owl:onDataRange D.
P a data property. n a nonNegativeInteger . D a datatype
maximum cardinality MaxCardinality(n P D) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:maxQualifiedCardinality n.
x owl:onDataRange D.
P a data property. n a nonNegativeInteger . D a datatype
minimum cardinality MinCardinality(n P D) x rdf:type owl:Restriction.
x owl:onProperty P.
x owl:minQualifiedCardinality n.
x owl:onDataRange D.
P a data property. n a nonNegativeInteger . D a datatype


  • Class Axioms
subclasses SubClassOf(C1 C2) C1 rdfs:subClassOf C2. Ci an OWL class
equivalent classes EquivalentClasses(C1 C2) C1 owl:equivalentClass C2. Ci an OWL class
disjoint classes DisjointClasses(C1 C2) C1 owl:disjointWith C2. Ci an OWL class
pairwise disjoint classes DisjointClasses(C1 … Cn) x rdf:type owl:AllDisjointClasses.
x owl:members [ C1 … Cn ].
Ci an OWL class
disjoint union DisjointUnionOf(C C1 … Cn) C owl:disjointUnionOf [ C1 … Cn ]. C an OWL class. Ci an OWL class


  • Data Types rdfs:Datatype
datatype complement ComplementOf(D) x owl:datatypeComplementOf D. D a datatype
enumeration OneOf(v1 … vn) x owl:oneOf [ v1 … vn ]. vj a literal
datatype restriction DatatypeRestriction(D f1 v1 … fn vn) x owl:onDatatype D.
x owl:withRestrictions [y1 ... yn].
y1 f1 v1.
...
yn fn vn.
fj a constraining facet,
vj a restriction value


universal object property owl:topObjectProperty = owl:Thing × owl:Thing
bottom object property owl:bottomObjectProperty empty binary relation
property chain PropertyChain(P1 … Pn) x owl:propertyChain [P1 … Pn]. Pi an object property


  • Object Property Axioms
subproperty SubPropertyOf(P Q) P rdfs:subPropertyOf Q. P,Q object properties
complex subproperty SubPropertyOf(PropertyChain(P1 … Pn) Q) x rdfs:subPropertyOf Q.
x owl:propertyChain [P1 … Pn].
Pi and Q object properties
property domain PropertyDomain(P C) P rdfs:domain C. P an object property, C an OWL class
property range PropertyRange(P C) P rdfs:range C. P an object property, C an OWL class
equivalent properties EquivalentProperties(P Q) P owl:equivalentProperty Q. P,Q object properties
disjoint properties DisjointProperties(P Q) P owl:propertyDisjointWith Q. P,Q object properties
pairwise disjoint properties DisjointProperties(P1 … Pn) x rdf:type owl:AllDisjointProperties.
x owl:members [ P1 … Pn ].
Pi an object property
inverse properties InverseProperties(P Q) P owl:inverseOf Q. P,Q object properties
functional property FunctionalProperty(P) P rdf:type owl:FunctionalProperty. P an object property

s P,o1. s P o2 => o1=o2

inverse functional property InverseFunctionalProperty(P) P rdf:type owl:InverseFunctionalProperty. P an object property

s1 P,o. s2 P o => s1=s2

reflexive property ReflexiveProperty(P) P rdf:type owl:ReflexiveProperty. P an object property

for all individual i, i P i

irreflexive property IrreflexiveProperty(P) P rdf:type owl:IrreflexiveProperty. P an object property

i1 p i2 => i1≠i2

symmetric property SymmetricProperty(P) P rdf:type owl:SymmetricProperty. P an object property

s p o => o p s

asymmetric property AsymmetricProperty(P) P rdf:type owl:AsymmetricProperty. P an object property
s P o => not o P s
transitive property TransitiveProperty(P) P rdf:type owl:TransitiveProperty. P an object property
i1 P i2. i2 P i3 => i1 P i3


  • Datatype Properties owl:DatatypeProperty
universal datatype property owl:topDataProperty = owl:Thing × rdfs:Literal
bottom datatype property owl:bottomDataProperty empty binary relation


  • Datatype Property Axioms
subproperty SubPropertyOf(P Q) P rdfs:subPropertyOf Q. P,Q datatype properties
property domain PropertyDomain(P C) P rdfs:domain C. P a datatype property, C an OWL class
property range PropertyRange(P C) P rdfs:range C. P a datatype property, C a datatype
equivalent properties EquivalentProperties(P Q) P owl:equivalentProperty Q. P,Q datatype properties
disjoint properties DisjointProperties(P Q) P owl:propertyDisjointWith Q. P,Q datatype properties
pairwise disjoint properties DisjointProperties(P1 … Pn) x rdf:type owl:AllDisjointProperties.
x owl:members [ P1 … Pn ].
Pi a datatype property
functional property FunctionalProperty(P) P rdf:type owl:FunctionalProperty. P a datatype property

s P,v1. s P v2 => v1=v2


  • Keys
Keys HasKey(C P1 … Pn) C owl:hasKey [P1 … Pn]. C an OWL class, Pi an object property or datatype property

x Pi zi. y Pi zi, for i => x=y


  • Assertions
individual equality SameIndividual(a1,a2) a1 owl:sameAs a2. a1,a2 individuals
individual equality SameIndividual(a1 … an) ai owl:sameAs ai+1.
i=1…n-1
ai an individual
individual inequality DifferentIndividuals(a1 a2) a1 owl:differentFrom a2. a1,a2 individuals
pairwise individual inequality DifferentIndividuals(a1 … an) x rdf:type owl:AllDifferent.
x owl:members [a1 … an].
ai an individual
class assertion ClassAssertion(C a) a rdf:type C. a an individual, C an OWL class
positive object property assertion PropertyAssertion( P a1 a2 ) a1 P a2. P an object property, ai an individual
negative object property assertion NegativePropertyAssertion(P a1 a2 ) x rdf:type owl:NegativePropertyAssertion.
x owl:sourceIndividual a1.
x owl:assertionProperty P.
x owl:targetIndividual a2
P an object property, ai an individual
negative datatype property assertion NegativePropertyAssertion(P a1 a2 ) x rdf:type owl:NegativePropertyAssertion.
x owl:sourceIndividual a1.
x owl:assertionProperty P.
x owl:targetValue a2
P a datatype property, a1 an individual, a2 a literal


  • Lists rdf:List (an RDF feature)
Note: in everywhere else of the document, we use only the concise N3 syntax.
concise N3 syntax [a1 … an]
triple-based N3 syntax x1 rdf:type rdf:List.
x1 rdf:first a1.
x1 rdf:rest x2.

xn rdf:type rdf:List.
xn rdf:first an.
xn rdf:rest rdf:nil.


  • Declarations
class Declaration( Class( x ) ) x rdf:type owl:Class.
datatype Declaration( Datatype( x ) ) x rdf:type rdfs:Datatype.
object property Declaration( ObjectProperty( x ) ) x rdf:type owl:ObjectProperty.
datatype property Declaration( DataProperty( x ) ) x rdf:type owl:DatatypeProperty.
annotation property Declaration( AnnotationProperty( x ) ) x rdf:type owl:AnnotationProperty.
named individual Declaration( NamedIndividual( x ) ) x rdf:type owl:NamedIndividual.


  • Reification
If an axiom, when removed of all annotations, can be translated in a single RDF triple s p o, it can also be mapped to the following reificated form
axioms s p o x rdf:type owl:Axiom.
x owl:subject s.
x owl:predicate p.
x owl:object o.
s the subject, p the predicate, o the object of the triple.


  • Annotations
annotations Annotation( P v) x rdf:type owl:Annotation.
x owl:subject y.
x owl:predicate P.
x owl:object v.
y the annotated resource
P annotation property
v a resource.
annotations Annotation( P v) y P v. y the annotated resource
P annotation property
v a resource
Note: an annotated resource can be an ontology, an ontology entity, an axiom, an anonymous individual, or even another annotation.


Annotation Properties owl:AnnotationProperty
human-readable name Label rdfs:label
human-readable description Comment rdfs:comment
additional information rdfs:seeAlso
defining agent rdfs:isDefinedBy
deprecation Deprecated owl:deprecated


Annotation Property Axioms
annotation subproperties SubPropertyOf(P Q) P rdfs:subPropertyOf Q. P,Q annotation properties
annotation property domain PropertyDomain(P U) P rdfs:domain U. P an annotation property, U a URI
annotation property range PropertyRange(P U) P rdfs:range U. P an annotation property, U a URI


Deprecation
deprecated class C Deprecated C rdf:type owl:DeprecatedClass. C an OWL class or a datatype
deprecated property P Deprecated P rdf:type owl:DeprecatedProperty. P an object property, datatype property or annotation property.
Note: "Deprecated" is the short for owl:deprecated "true"^^xsd:boolean


OWL ontology Ontology (O V) O rdf:type owl:Ontology.
O owl:versionInfo V.
O a URI; V a URI (optional)
Ontology Properties owl:OntologyProperty
importing O Import(U) O owl:imports U. O an ontology, U an ontology URI
backwards compatibility O owl:backwardCompatibleWith U. O an ontology, U an ontology URI
incompatibility O owl:incompatibleWith U. O an ontology, U an ontology URI
prior version O owl:priorVersion U. O an ontology, U an ontology URI


  • Deprecated Vocabulary in OWL 2
owl:DataRange replaced by rdfs:Datatype
owl:distinctMembers replaced by owl:members


2 Built-in Datatypes and Facets

2.1 Built-in Datatypes

The value space is a set determining the set of values of the datatype. A literal value "abc" of the datatype DT can be given in the form "abc"^^DT.
  • Numeric DataTypes
owl:realPlus and owl:real: (base datatype for other numeric datatypes, should not be directly instantiated)
owl:realPlus the set of all real numbers plus
+INF(positive infinity), -INF(negative infinity),
-0(negative zero), NaN (not-a-number)
owl:real the set of all real numbers
Other numeric Datatypes
xsd:double xsd:nonNegativeInteger xsd:long xsd:unsignedLong
xsd:float xsd:nonPositiveInteger xsd:int xsd:unsignedInt
xsd:decimal xsd:positiveInteger xsd:short xsd:unsignedShort
xsd:integer xsd:negativeInteger xsd:byte xsd:unsignedByte
  • Strings: value space is of the form <"abc", tag>
Strings with a Language Tag: tag is either an empty string or a lowercase language tag
rdf:text internationalized strings
Strings without a Language Tag: tag is an empty string
xsd:string xsd:NCName
xsd:normalizedString xsd:NMTOKEN
xsd:token xsd:language
xsd:Name
  • Boolean Values
xsd:Boolean value space has only two values: true and false
  • Binary Data
xsd:base64Binary
xsd:hexBinary
  • URIs
xsd:anyURI
  • Time Instants
OWL 2 datatype
owl:dateTime value space is set of numbers that represent difference

between the time instant and the first time instant of the 1st
of January 1 AD in the proleptic Gregorian calendar, in seconds

XSD datatypes
xsd:date xsd:gDay xsd:gYear
xsd:dateTime xsd:gMonth xsd:gYearMonth
xsd:duration xsd:gMonthDay xsd:time
  • XML Fragment
rdf:XMLLiteral

2.2 Facets

The facet space is a set of pairs of the form < f v >, where f is a URI called a constraining facet, and v is a value. Each such pair is mapped to a subset of the value space of the datatype.

Notations:

  • Numeric Datatype, String Datatype and Binary datatype refer to a set of datatypes based on the classification done in the prior section.


Facet f Datatype Value v Explanation
xsd:minInclusive,
xsd:maxInclusive,
xsd:minExclusive,
xsd:maxExclusive
Numeric Datatype DT,
owl:dateTime DT
Literal in DT Restricts the value-space to greater than (equal to)
or lesser than (equal to) a value
xsd:minLength,
xsd:maxLength,
xsd:length
String Datatype,
Binary Datatype,
xsd:anyURI
Nonnegative integer Restricts the value-space based on the
lengths of the literals
xsd:pattern String Datatype,
xsd:anyURI
xsd:string literal whose value is a regular expression Restricts the value space to literals that
match the regular expression
rdf:langPattern rdf:text xsd:string literal whose value is a regular expression Restricts the value space to literals with
language tags that match the regular expression


3 Name Spaces

Standard Namespaces and Prefixes used in OWL 2

Prefix URI
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#
ox http://www.w3.org/2006/12/owl2-xml#