Copyright © 2003 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
The exchange syntax for OWL is RDF/XML [RDF Syntax], as specified in the OWL Reference Description [OWL Reference]. Further, the meaning of an OWL ontology in RDF/XML is determined only from the RDF graph [RDF Concepts] that results from the RDF parsing of the RDF/XML document. Thus one way of translating an OWL ontology in abstract syntax form into the exchange syntax is by giving a transformation of each directive into a collection of triples. As all OWL Lite constructs are special cases of constructs in the full abstract syntax, transformations are only provided for the OWL DL versions.
The syntax for triples used here is the one used in the RDF Model Theory [RDF MT]. In this variant, qualified names are allowed. As detailed in the RDF Model Theory, to turn this syntax into the standard one just expand the qualified names into URI references in the standard RDF manner by concatenating the namespace name with the local name, using the standard OWL namespaces.
The Transformation Table gives transformation rules that transform the abstract syntax to the OWL exchange syntax. In a few cases, notably for the DifferentIndividuals construct, there are different transformation rules. In such cases either rule can be chosen, resulting in a non-deterministic translation. In a few other cases, notably for class and property axioms, there are triples that may or may not be generated. These triples are indicated by flagging them with [opt]. In a couple of cases one of two triples must be generated. This is indicated by separating the triples with OR. These non-determinisms allow the generation of more RDF Graphs.
The left column of the table gives a piece of syntax (S), the center column gives its transformation (T(S)), and the right column gives an identifier for the main node of the transformation (M(T(S))), but only for syntactic constructs that can occur as pieces of directives. Repeating components are listed using ellipses, as in description1; … descriptionn, this form allows easy specification of the transformation for all values of n allowed in the syntax. Optional portions of the abstract syntax (enclosed in square brackets) are optional portions of the transformation (signified by square brackets). As well, for any of the built-in OWL datatypes, rdfs:Literal, built-in OWL classes, built-in OWL annotation properties, and built-in OWL ontology properties the first rdf:type triple in the translation of it or any axiom for it is optional.
Some transformations in the table are for directives. Other transformations are for parts of directives. The last transformation is for sequences, which are not part of the abstract syntax per se. This last transformation is used to make some of the other transformations more compact and easier to read.
For many directives these transformation rules call for the transformation of components of the directive using other transformation rules. When the transformation of a component is used as the subject or object of a triple, even an optional triple, the transformation of the construct is part of the production (but only once per production) and the main node of that transformation should be used for that node of the triple.
Bnode identifiers here must be taken as local to each transformation, i.e., different identifiers should be used for each invocation of a transformation rule. Ontologies without a name are given a bnode as their main node; ontologies with a name use that name as their main node; this node is referred to as O below.
This transformation is not injective, as several OWL abstract ontologies that do not use the above reserved vocabulary can map into equal RDF graphs. However, the only cases where this can happen is with constructs that have the same meaning, such as several DisjointClasses axioms having the same effect as one larger one. It would be possible to define a canonical inverse transformation, if desired.
When considering OWL Lite and DL ontologies in RDF graph form, care must be taken to prevent the use of certain vocabulary as OWL classes, properties, or individuals. If this is not done the built-in definitions or use of this vocabulary (in the RDF or OWL specification) would augment the information in the OWL ontology. Only some of the RDF vocabulary fits in this category, as some of the RDF vocabulary, such as rdf:subject, is given little or no meaning by the RDF specifications and its use does not present problems, as long as the use is consistent with any meaning given by the RDF specifications.
Definition: The disallowed vocabulary from RDF is rdf:type, rdf:Property, rdf:nil, rdf:List, rdf:XMLLiteral, rdf:first, rdf:rest, rdfs:domain, rdfs:range, rdfs:Resource, rdfs:Datatype, rdfs:Class, rdfs:subClassOf, rdfs:subPropertyOf, rdfs:member, rdfs:Container and rdfs:ContainerMembershipProperty. The disallowed vocabulary from OWL is owl:AllDifferent, owl:allValuesFrom, owl:AnnotationProperty, owl:cardinality, owl:Class, owl:complementOf, owl:DataRange, owl:DatatypeProperty, owl:DeprecatedClass, owl:DeprecatedProperty, owl:differentFrom, owl:disjointWith, owl:distinctMembers, owl:equivalentClass, owl:equivalentProperty, owl:FunctionalProperty, owl:hasValue, owl:intersectionOf, owl:InverseFunctionalProperty, owl:inverseOf, owl:maxCardinality, owl:minCardinality, owl:ObjectProperty, owl:oneOf, owl:onProperty, owl:Ontology, owl:Property, owl:Restriction, owl:sameAs, owl:sameIndividualAs, owl:someValuesFrom, owl:SymmetricProperty, owl:TransitiveProperty, and owl:unionOf. The disallowed vocabulary is the union of the disallowed vocabulary from RDF and the disallowed vocabulary from OWL.
Definition: The class-only vocabulary is rdf:Statement, rdf:Seq, rdf:Bag, and rdf:Alt. The datatype-only vocabulary is the built-in OWL datatypes and rdfs:Literal. The property-only vocabulary is rdf:subject, rdf:predicate, rdf:object, and all the container membership properties, i.e., rdf:_1, rdf:_2, ….
Definition: A collection of OWL DL ontologies in abstract syntax form, O, has a separated vocabulary if
Definition: An RDF graph is an OWL DL ontology in RDF graph form if it is equal (see below for a slight relaxation) to a result of the transformation to triples above of a collection of OWL DL ontologies in abstract syntax form that has a separated vocabulary. For the purposes of determining whether an RDF graph is an OWL DL ontology in RDF graph form, cardinality restrictions are explicitly allowed to use constructions like "1"^^xsd:decimal so long as the data value so encoded is a non-negative integer.
Definition: An RDF graph is an OWL Lite ontology in RDF graph form if it is as above except that the ontologies in O are OWL Lite ontologies in abstract syntax form.
rdfs:Literal
,
built-in OWL classes,
built-in OWL
annotation properties, or the
built-in OWL
ontology properties.
rdf:type
,
and with object other than
rdf:Property
,
rdfs:Class
,
owl:FunctionalProperty
,
owl:DeprecatedProperty
,
owl:DeprecatedClass
.
The objects of such triples are known as the explicit
types of the subject.
rdf:List
or [DL only] owl:DataRange
is the object of exactly one triple.
rdfs:Literal
is assigned to the category datatypeID.
Any uriref which is a
built-in OWL class
or in the
class-only vocabulary
is assigned to the
category classID.
Any uriref which is a
built-in OWL
annotation property is assigned to the category annotationPropID.
Any uriref which is a
built-in OWL
ontology property is assigned to the category ontologyPropertyID.
Any uriref which is in the
property-only vocabulary
is assigned to one of the categories
annotationPropID,
dataPropID
objectPropID or
transitivePropID.
Every uriref in the disallowed vocabulary is assigned to itself.
owl:disjointWith
or owl:equivalentClass
.Such an RDF graph which does not use any of the cases marked as DL only, is in OWL Lite.
A directed cycle of blank nodes is
a sequence of triples
t0
,
t1
,
...
tn
,
in which tn = t0
,
and in which the subjects and objects of all
the triples are blank, and in which the object
of ti
is the subject
of ti+1
, for i
from 0
to n-1
.
Subject | Predicate | Object |
---|---|---|
annotationPropID or classID or dataPropID or datatypeID or individualID or objectPropID or ontologyID or transitivePropID or unnamedIndividual | annotationPropID | annotationPropID or classID or dataPropID or datatypeID or individualID or literal or objectPropID or ontologyID or ontologyPropertyID or transitivePropID or unnamedIndividual |
individualID or unnamedIndividual | objectPropID or transitivePropID | individualID or unnamedIndividual |
objectPropID or transitivePropID | rdf:type | owl:DeprecatedProperty orowl:ObjectProperty orowl:SymmetricProperty orrdf:Property |
classID | owl:equivalentClass orrdfs:subClassOf | classID or restriction |
individualID or unnamedIndividual | rdf:type | classID or restriction |
objectPropID or transitivePropID | rdfs:domain orrdfs:range | classID |
annotationPropID | rdf:type | owl:AnnotationProperty |
annotationPropID | rdf:type | rdf:Property |
classID | owl:intersectionOf | listOfDescription |
classID | owl:intersectionOf | rdf:nil |
classID | rdf:type | owl:Class |
classID | rdf:type | owl:DeprecatedClass |
classID | rdf:type | rdfs:Class |
dataPropID | owl:equivalentProperty | dataPropID |
dataPropID | rdf:type | owl:DatatypeProperty |
dataPropID | rdf:type | owl:DeprecatedProperty |
dataPropID | rdf:type | owl:FunctionalProperty |
dataPropID | rdf:type | rdf:Property |
dataPropID | rdfs:domain | classID |
dataPropID | rdfs:range | datatypeID |
dataPropID | rdfs:subPropertyOf | dataPropID |
datatypeID | rdf:type | rdfs:Datatype |
individualID | dataPropID | literal |
individualID | owl:differentFrom | individualID |
individualID | owl:sameIndividualAs | individualID |
objectPropID | owl:equivalentProperty | objectPropID |
objectPropID | owl:inverseOf | objectPropID |
objectPropID | rdf:type | owl:FunctionalProperty |
objectPropID | rdf:type | owl:InverseFunctionalProperty |
objectPropID | rdfs:subPropertyOf | objectPropID |
objectPropID | rdfs:subPropertyOf | transitivePropID |
ontologyID | ontologyPropertyID | ontologyID |
ontologyID | rdf:type | owl:Ontology |
restriction | rdf:type | rdfs:Class |
transitivePropID | owl:equivalentProperty | transitivePropID |
transitivePropID | owl:inverseOf | transitivePropID |
transitivePropID | rdf:type | owl:TransitiveProperty |
transitivePropID | rdfs:subPropertyOf | transitivePropID |
unnamedIndividual | dataPropID | literal |
Subject | Predicate | Object |
---|---|---|
description or restriction | owl:disjointWith orowl:equivalentClass orrdfs:subClassOf | classID or description or restriction |
objectPropID or transitivePropID | rdfs:domain orrdfs:range | description or restriction |
classID | owl:complementOf orowl:disjointWith | classID or description or restriction |
classID | owl:equivalentClass | description |
classID | owl:oneOf | listOfIndividualID |
classID | owl:oneOf | rdf:nil |
classID | owl:unionOf | listOfDescription |
classID | owl:unionOf | rdf:nil |
classID | rdfs:subClassOf | description |
dataPropID | rdfs:domain | description |
dataPropID | rdfs:domain | restriction |
dataPropID | rdfs:range | unnamedDataRange |
description | rdf:type | rdfs:Class |
individualID | rdf:type | description |
unnamedDataRange | rdf:type | rdfs:Class |
unnamedIndividual | rdf:type | description |
Every node of category allDifferent must fit the following pattern. For each such node, exactly one instance of each triple in the pattern must be present in the graph. There are no other triples in the graph in which such nodes are subjects.
Subject | Predicate | Object |
---|---|---|
allDifferent | rdf:type | owl:AllDifferent |
allDifferent | owl:distinctMembers | listOfIndividualID orrdf:nil |
Every node of category listOfDescription must fit the following pattern. For each such node, exactly one instance of each triple in the pattern must be present in the graph. There are no other triples in the graph in which such nodes are subjects.
Subject | Predicate | Object |
---|---|---|
listOfDescription | rdf:type | rdf:List
|
listOfDescription | rdf:first | classID
or restriction or description [DL only] |
listOfDescription | rdf:rest | listOfDescription orrdf:nil |
Every node of category listOfIndividualID must fit the following pattern. For each such node, exactly one instance of each triple in the pattern must be present in the graph. There are no other triples in the graph in which such nodes are subjects.
Subject | Predicate | Object |
---|---|---|
listOfIndividualID | rdf:type | rdf:List |
listOfIndividualID | rdf:first | individualID |
listOfIndividualID | rdf:rest | listOfIndividualID orrdf:nil |
Every node of category restriction must fit one of these patterns. For each such node, exactly one instance of each triple in the pattern must be present in the graph. There may be additional triples in which such nodes are subjects as listed in the main triple tables.
Subject | Predicate | Object |
---|---|---|
Either: | ||
restriction | rdf:type | owl:Restriction |
restriction | owl:allValuesFrom orowl:someValuesFrom | classID
or description [DL only] or restriction [DL only] |
restriction | owl:onProperty | objectPropID or transitivePropID |
Or: | ||
restriction | rdf:type | owl:Restriction |
restriction | owl:allValuesFrom orowl:someValuesFrom | datatypeID |
restriction | owl:onProperty | dataPropID |
Or: | ||
restriction | rdf:type | owl:Restriction |
restriction | owl:maxCardinality orowl:minCardinality orowl:cardinality | 0^^ (xsd:nonNegativeInteger) or 1^^ (xsd:nonNegativeInteger) or nonNegativeInteger [DL only] |
restriction | owl:onProperty | objectPropID or dataPropID |
Or: [DL only] | ||
restriction | rdf:type | owl:Restriction |
restriction | owl:hasValue | individualID |
restriction | owl:onProperty | objectPropID or transitivePropID |
Or: [DL only] | ||
restriction | rdf:type | owl:Restriction |
restriction | owl:hasValue | literal |
restriction | owl:onProperty | dataPropID |
Every node of category description must fit one of these patterns. For each such node, exactly one instance of each triple in the pattern must be present in the graph. There may be additional triples in which such nodes are subjects as listed in the main triple tables.
Subject | Predicate | Object |
---|---|---|
Either: | ||
description | rdf:type | owl:Class |
description | owl:complementOf | classID or description or restriction |
Or: | ||
description | rdf:type | owl:Class |
description | owl:intersectionOf orowl:unionOf | listOfDescription orrdf:nil |
Or: | ||
description | rdf:type | owl:Class |
description | owl:oneOf | listOfIndividualID orrdf:nil |
Every node of category listOfDataLiteral must fit the following pattern. For each such node, exactly one instance of each triple in the pattern must be present in the graph. There are no other triples in the graph in which such nodes are subjects.
Subject | Predicate | Object |
---|---|---|
listOfDataLiteral | rdf:type | rdf:List |
listOfDataLiteral | rdf:first | literal |
listOfDataLiteral | rdf:rest | listOfDataLiteral orrdf:nil |
Every node of category unnamedDataRange must fit the following pattern. For each such node, exactly one instance of each triple in the pattern must be present in the graph. There may be additional triples in which such nodes are subjects as listed in the main triple tables.
Subject | Predicate | Object |
---|---|---|
unnamedDataRange | rdf:type | owl:DataRange |
unnamedDataRange | owl:oneOf | listOfDataLiteral orrdf:nil |