This section of the document provides a mapping from the abstract syntax
for OWL DL and OWL Lite given in Section 2
to the exchange syntax for OWL, namely
RDF/XML [RDF Syntax].
This mapping (and its inverse) provide the normative relationship between
the abstract syntax and the exchange syntax.
It is shown in Section 5 and
Appendix A.1 that this mapping preserves the
meaning of OWL DL ontologies.
Section 4.2 defines
the OWL DL and OWL Lite dialects of OWL as those RDF graphs
that are the result of mappings from abstract syntax ontologies.
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.
OWL DL has semantics defined over the abstract syntax
and a concrete syntax consisting of a subset of RDF graphs.
Hence it is necessary to relate specific abstract syntax ontologies
with specific RDF/XML documents and their corresponding graphs.
This section defines a many-to-many relationship between
abstract syntax ontologies and RDF graphs. This is done
using a set of nondeterministic mapping rules.
Thus to apply the semantics to a particular RDF graph it is necessary
to find one of the abstract syntax ontologies that correspond with that
graph under the mapping rules and to apply the semantics to that
abstract ontology.
The mapping is designed so that any of the RDF/XML graphs
that correspond to a particular abstract ontology have the same meaning,
as do any of the abstract ontologies that correspond to a
particular RDF/XML graph.
Moreover, since this process cannot be applied to RDF graphs
that do not have corresponding abstract syntax forms, the mapping
rules implicitly define a set of graphs, which syntactically
characterise OWL DL in RDF/XML.
The syntax for triples used here is the one used in the
RDF semantics [RDF MT].
In this variant, qualified names are allowed.
As detailed in the RDF semantics, 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.
4.1. Translation to RDF Graphs
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 abstract syntax (S);
the center column gives its transformation
into triples (T(S));
and the right column gives an identifier for the main
node of the transformation (M(T(S))), 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,
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, predicate,
or object of a triple, even an optional triple,
the transformation of the component is part of the production (but only
once per production) and
the main node of that transformation should be used in 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;
in both cases this node is referred to as O below.
Transformation to Triples
Abstract Syntax (and sequences) - S
Transformation - T(S)
Main Node - M(T(S))
Ontology(O directive1 … directiven)
O rdf:typeowl:Ontology .
T(directive1) … T(directiven)
Ontology(directive1 … directiven)
O rdf:typeowl:Ontology .
T(directive1) … T(directiven)
Annotation(ontologyPropertyID URIreference)
ontologyPropertyID rdf:typeowl:OntologyProperty .
O ontologyPropertyID URIreference .
URIreference rdf:typeowl:Ontology .
T(descriptioni) owl:equivalentClass T(descriptionj) .
for all <i,j> in G
where G is a set of pairs over {1,...,n}x{1,...,n} that if
interpreted as an undirected graph forms a connected graph
for {1,...,n}
ID rdf:typeowl:DatatypeProperty .
ID rdf:typerdf:Property . [opt]
[ID rdf:typeowl:DeprecatedProperty .]
ID T(annotation1) … ID T(annotationm)
ID rdfs:subPropertyOf T(super1) . …
ID rdfs:subPropertyOf T(supern) .
ID rdfs:domain T(domain1) . …
ID rdfs:domain T(domaink) .
ID rdfs:range T(range1) . …
ID rdfs:range T(rangeh) .
[ID rdf:typeowl:FunctionalProperty . ]
ID rdf:typeowl:ObjectProperty .
[opt if one of the last three triples is included]
ID rdf:typerdf:Property . [opt]
[ID rdf:typeowl:DeprecatedProperty .]
ID T(annotation1) … ID T(annotationm)
ID rdfs:subPropertyOf T(super1) . …
ID rdfs:subPropertyOf T(supern) .
ID rdfs:domain T(domain1) . …
ID rdfs:domain T(domaink) .
ID rdfs:range T(range1) . …
ID rdfs:range T(rangeh) .
[ID owl:inverseOf T(inverse) .]
[ID rdf:typeowl:FunctionalProperty . ]
[ID rdf:typeowl:InverseFunctionalProperty . ]
[ID rdf:typeowl:TransitiveProperty . ]
[ID rdf:typeowl:SymmetricProperty . ]
AnnotationProperty(ID annotation1 … annotationm)
ID rdf:typeowl:AnnotationProperty . ID rdf:typerdf:Property . [opt]
ID T(annotation1) … ID T(annotationm)
OntologyProperty(ID annotation1 … annotationm)
ID rdf:typeowl:OntologyProperty . ID rdf:typerdf:Property . [opt]
ID T(annotation1) … ID T(annotationm)
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.
4.2. Definition of OWL DL and OWL Lite Ontologies in
RDF Graph Form
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: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:OntologyProperty,owl:Restriction,
owl:sameAs,
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.
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
the ontologies in O, taken together, do not use any URI reference as more than
one of a class ID, a datatype ID, an individual ID,
an individual-valued property ID, a data-valued property ID,
an annotation property ID, ontology property ID, or an ontology ID;
the ontologies in O, taken together, provide a type for every
individual ID;
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:integer 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.