Mapping to RDF Graphs
From OWL
(→Axioms that Generate Single Triples) |
(→Introduction) |
||
| Line 25: | Line 25: | ||
{{EdNote|[[User:IanHorrocks|IanHorrocks]] 03:22, 2 December 2007 (EST)|See [http://www.w3.org/2007/OWL/tracker/issues/66 Issue-66] (mapping inconsistencies).}} | {{EdNote|[[User:IanHorrocks|IanHorrocks]] 03:22, 2 December 2007 (EST)|See [http://www.w3.org/2007/OWL/tracker/issues/66 Issue-66] (mapping inconsistencies).}} | ||
| - | This document provides mappings between the functional-style syntax of OWL 1.1 as given in the OWL 1.1 Specification [<cite>[[#ref-owl-1.1-specification|OWL 1.1 Specification]]</cite>] and RDF triples. | + | This document provides mappings between the functional-style syntax of OWL 1.1 as given in the OWL 1.1 Specification [<cite>[[#ref-owl-1.1-specification|OWL 1.1 Specification]]</cite>] and RDF triples. Every OWL 1.1 DL ontology (in functional-style syntax) can be mapped into RDF triples and back without any change in the formal meaning of an ontology. More precisely, let <span class="name">O</span> be any OWL 1.1 DL ontology in functional-style syntax, let <span class="name">RDF(O)</span> the set of RDF triples obtained by transforming <span class="name">O</span> into RDF triples as specified in [[#Mapping_from_Functional-Style_Syntax_to_RDF_Graphs|Section 2]], and let <span class="name">O'</span> be the OWL 1.1 DL in functional-style syntax obtained by applying the reverse-transformation from [[#Mapping_from_RDF_Graphs_to_Functional-Style_Syntax|Section 3]] to <span class="name">RDF(O)</span>; then, <span class="name">O</span> and <span class="name">O'</span> are logically equivalent (i.e., they have exactly the same set of models). |
| + | |||
| + | The RDF syntax of OWL 1.1 DL is backwards-compatible with OWL DL; that is, every OWL DL ontology in RDF is a valid OWL 1.1 ontology. | ||
| + | |||
| + | The syntax for triples used in this document is the one used in the RDF Semantics document [<cite>[[#ref-rdf-semantics|RDF Semantics]]</cite>]. Full URIs are abbreviated using the same namespaces as in the OWL 1.1 Specification [<cite>[[#ref-owl-1.1-specification|OWL 1.1 Specification]]</cite>]. | ||
{{EdNote|[[User:Bmotik2|Boris Motik]] 12:53, 6 December 2007 (GMT)|The actual namespaces used in the specification are subject to discussion and might change in future.}} | {{EdNote|[[User:Bmotik2|Boris Motik]] 12:53, 6 December 2007 (GMT)|The actual namespaces used in the specification are subject to discussion and might change in future.}} | ||
Revision as of 18:13, 3 April 2008
- Document title:
- OWL 2 Web Ontology Language
Mapping to RDF Graphs
- Authors:
- Bernardo Cuenca Grau, Oxford University
- Boris Motik, Oxford University
- Contributors:
- Ian Horrocks, Oxford University
- Bijan Parsia, The University of Manchester
- 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 mapping from the functional-style syntax of OWL 1.1 to the RDF exchange syntax for OWL 1.1, and vice versa. - Status:
- This document is an evolution of the OWL 1.1 Web Ontology Language: Mapping to RDF Graphs document that forms part of the OWL 1.1 Web Ontology Language W3C Member Submission.
Copyright © 2006-2007 by the Authors. This document is available under the W3C Document License. See the W3C Intellectual Rights Notice and Legal Disclaimers for additional information.
Contents |
1 Introduction
This document provides mappings between the functional-style syntax of OWL 1.1 as given in the OWL 1.1 Specification [OWL 1.1 Specification] and RDF triples. Every OWL 1.1 DL ontology (in functional-style syntax) can be mapped into RDF triples and back without any change in the formal meaning of an ontology. More precisely, let O be any OWL 1.1 DL ontology in functional-style syntax, let RDF(O) the set of RDF triples obtained by transforming O into RDF triples as specified in Section 2, and let O' be the OWL 1.1 DL in functional-style syntax obtained by applying the reverse-transformation from Section 3 to RDF(O); then, O and O' are logically equivalent (i.e., they have exactly the same set of models).
The RDF syntax of OWL 1.1 DL is backwards-compatible with OWL DL; that is, every OWL DL ontology in RDF is a valid OWL 1.1 ontology.
The syntax for triples used in this document is the one used in the RDF Semantics document [RDF Semantics]. Full URIs are abbreviated using the same namespaces as in the OWL 1.1 Specification [OWL 1.1 Specification].
The following notation is used throughout this document:
- !x denotes a URI reference;
- _:x denotes a blank node;
- x denotes a blank or a URI reference;
- ct denotes an RDF literal; and
- T(SEQ y1 ... yn) denotes the encoding of an RDF list as shown in Table 1.
| Sequence S | Transformation T(S) | Main Node of T(S) |
|---|---|---|
| SEQ | rdf:nil | |
| SEQ y1 ... yn | _:x rdf:type rdf:List _:x rdf:first T(y1) _:x rdf:rest T(SEQ y2 ... yn) | _:x |
2 Mapping from Functional-Style Syntax to RDF Graphs
As explained in the OWL 1.1 Specification [OWL 1.1 Specification], OWL 1.1 syntax is fully typed -- that is, from the syntax, one can immediately see what is the intended usage of some symbol.
This typing is made explicit here as follows. The type of a symbol S in an ontology O (in functional-style syntax), written Type(S,O), is defined as the smallest set such that
- if the parse tree of O contains S under a objectPropertyURI node, then owl:ObjectProperty ∈ Type(S,O);
- if the parse tree of O contains S under a dataPropertyURI node, then owl:DatatypeProperty ∈ Type(S,O);
- if the parse tree of O contains S under a annotationPropertyURI node, then owl:AnnotationProperty ∈ Type(S,O);
- if the parse tree of O contains S under a owlClassURI node, then owl:Class ∈ Type(S,O);
- if the parse tree of O contains S under a datatypeURI node, then rdfs:Datatype ∈ Type(S,O); and
- if the parse tree of O contains S under a individualURI node, then owl11:Individual ∈ Type(S,O).
The above definition refers to a parse tree only for the axioms from O, and not from the axioms from some ontology that O imports.
A symbol S is punned in an ontology O if Type(S,O) contains more than one element.
The following three conditions are defined to help the mapping:
- OnlyOP(S) is true if and only if owl:ObjectProperty ∈ Type(S,O) and owl:DatatypeProperty and owl:AnnotationProperty are not in Type(S,O);
- OnlyDP(S) is true if and only if owl:DatatypeProperty ∈ Type(S,O) and owl:ObjectProperty and owl:AnnotationProperty are not in Type(S,O);
- OnlyAP(S) is true if and only if owl:AnnotationProperty ∈ Type(S,O) and owl:ObjectProperty and owl:DatatypeProperty are not in Type(S,O).
The following shortcuts are used in the mapping of OWL 1.1 ontologies into RDF triples:
- RESTRICTION[op] expands to owl:Restriction if OnlyOP(op) = true, and to owl11:ObjectRestriction otherwise;
- RESTRICTION[dp] expands to owl:Restriction if OnlyDP(dp) = true, and to owl11:DataRestriction otherwise;
- SUBPROPERTYOF[op1,...,opn] expands to rdfs:subPropertyOf if OnlyOP(opi) = true for each 1 ≤ i ≤ n, and to owl11:subObjectPropertyOf otherwise;
- SUBPROPERTYOF[dp1,dp2] expands to rdfs:subPropertyOf if OnlyDP(dp1) = true and OnlyDP(dp2) = true, and to owl11:subDataPropertyOf otherwise;
- EQUIVALENTPROPERTY[op1,...,opn] expands to owl:equivalentProperty if OnlyOP(opi) = true for each 1 ≤ i ≤ n, and to owl11:equivalentObjectProperty otherwise;
- EQUIVALENTPROPERTY[dp1,...,dpn] expands to owl:equivalentProperty if OnlyDP(dpi) = true for each 1 ≤ i ≤ n, and to owl11:equivalentDataProperty otherwise;
- FUNCTIONALPROPERTY[op] expands to owl:FunctionalProperty if OnlyOP(op) = true, and to owl11:FunctionalObjectProperty otherwise;
- FUNCTIONALPROPERTY[dp] expands to owl:FunctionalProperty if OnlyDP(dp) = true, and to owl11:FunctionalDataProperty otherwise;
- DOMAIN[op] expands to rdfs:domain if OnlyOP(op) = true, and to owl11:objectPropertyDomain otherwise;
- DOMAIN[dp] expands to rdfs:domain if OnlyDP(dp) = true, and to owl11:dataPropertyDomain otherwise;
- RANGE[op] expands to rdfs:range if OnlyOP(op) = true, and to owl11:objectPropertyRange otherwise; and
- RANGE[dp] expands to rdfs:range if OnlyDP(dp) = true, and to owl11:dataPropertyRange otherwise.
Table 2 presents the operator T that maps an OWL 1.1 ontology in functional-style syntax into a set of RDF triples. This table does not consider axioms with annotations: the mapping of such axioms is described in Section 2.1. In the mapping of DatatypeRestriction construct, faceti can be one of the facets listed in the OWL 1.1 Specification section on Data Range Expressions, and xsd:faceti is a URI resource whose namespace is xsd: and whose fragment is the facet name. In the mapping, each _:x is a fresh blank node for different applications of the mapping rules.
| Functional-Style Syntax S | Transformation T(S) | Main Node of T(S) |
|---|---|---|
| Ontology(ontologyURI Import(oID1) ... Import(oIDk) Annotation(apID1 ct1) ... Annotation(apIDn ctn) axiom1 ... axiomm) | ontologyURI rdf:type owl:Ontology ontologyURI owl:imports oIDi 1 ≤ i ≤ k ontologyURI T(apIDi) T(cti) 1 ≤ i ≤ n T(axiomi) 1 ≤ i ≤ m | ontologyURI |
| Ontology( Import(oID1) ... Import(oIDk) Annotation(apID1 ct1) ... Annotation(apIDn ctn) axiom1 ... axiomm) | _:x rdf:type owl:Ontology _:x owl:imports oIDi 1 ≤ i ≤ k _:x T(apIDi) T(cti) 1 ≤ i ≤ n T(axiomi) 1 ≤ i ≤ m | _:x |
| datatypeURI | datatypeURI rdf:type rdfs:Datatype | datatypeURI |
| owlClassURI | owlClassURI rdf:type owl:Class | owlClassURI |
| objectPropertyURI | objectPropertyURI rdf:type owl:ObjectProperty | objectPropertyURI |
| dataPropertyURI | dataPropertyURI rdf:type owl:DatatypeProperty | dataPropertyURI |
| annotationPropertyURI | annotationPropertyURI rdf:type owl:AnnotationProperty | annotationPropertyURI |
| individualURI | individualURI | |
| constant | constant | |
| DataComplementOf(dr) | _:x rdf:type rdfs:Datatype _:x owl:complementOf T(dr) | _:x |
| DataOneOf(ct1 ... ctn) | _:x rdf:type rdfs:Datatype _:x owl:oneOf T(SEQ ct1 ... ctn) | _:x |
| DatatypeRestriction(dt facet1 ct1 ... facetn ctn) | _:x rdf:type rdfs:Datatype _:x owl11:onDatatype T(dt) _:x owl11:withRestrictions T(SEQ _:x1 ... _:xn) _:xi xsd:faceti cti 1 ≤ i ≤ n | _:x |
| InverseObjectProperty(op) | _:x owl11:inverseObjectPropertyExpression T(op) | _:x |
| ObjectUnionOf(c1 ... cn) | _:x rdf:type owl:Class _:x owl:unionOf T(SEQ c1 ... cn) | _:x |
| ObjectIntersectionOf(c1 ... cn) | _:x rdf:type owl:Class _:x owl:intersectionOf T(SEQ c1 ... cn) | _:x |
| ObjectComplementOf(c) | _:x rdf:type owl:Class _:x owl:complementOf T(c) | _:x |
| ObjectOneOf(iID1 ... iIDn) | _:x rdf:type owl:Class _:x owl:oneOf T(SEQ iID1 ... iIDn) | _:x |
| ObjectSomeValuesFrom(op c) | _:x rdf:type RESTRICTION[op] _:x owl:onProperty T(op) _:x owl:someValuesFrom T(c) | _:x |
| ObjectAllValuesFrom(op c) | _:x rdf:type RESTRICTION[op] _:x owl:onProperty T(op) _:x owl:allValuesFrom T(c) | _:x |
| ObjectExistsSelf(op) | _:x rdf:type owl11:SelfRestriction _:x owl:onProperty T(op) | _:x |
| ObjectHasValue(op iID) | _:x rdf:type RESTRICTION[op] _:x owl:onProperty T(op) _:x owl:hasValue T(iID) | _:x |
| ObjectMinCardinality(n op c) | _:x rdf:type RESTRICTION[op] _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(op) _:x owl11:onClass T(c) | _:x |
| ObjectMaxCardinality(n op c) | _:x rdf:type RESTRICTION[op] _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(op) _:x owl11:onClass T(c) | _:x |
| ObjectExactCardinality(n op c) | _:x rdf:type RESTRICTION[op] _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(op) _:x owl11:onClass T(c) | _:x |
| ObjectMinCardinality(n op) | _:x rdf:type RESTRICTION[op] _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(op) | _:x |
| ObjectMaxCardinality(n op) | _:x rdf:type RESTRICTION[op] _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(op) | _:x |
| ObjectExactCardinality(n op) | _:x rdf:type RESTRICTION[op] _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(op) | _:x |
| DataSomeValuesFrom(dp dr) | _:x rdf:type RESTRICTION[dp] _:x owl:onProperty T(dp) _:x owl:someValuesFrom T(dr) | _:x |
| DataSomeValuesFrom(dp1 ... dpn dr) | _:x rdf:type RESTRICTION[dp] _:x owl:onProperty T(SEQ dp1 ... dpn) _:x owl:someValuesFrom T(dr) | _:x |
| DataAllValuesFrom(dp dr) | _:x rdf:type RESTRICTION[dp] _:x owl:onProperty T(dp) _:x owl:allValuesFrom T(dr) | _:x |
| DataAllValuesFrom(dp1 ... dpn dr) | _:x rdf:type RESTRICTION[dp] _:x owl:onProperty T(SEQ dp1 ... dpn) _:x owl:allValuesFrom T(dr) | _:x |
| DataHasValue(dp ct) | _:x rdf:type RESTRICTION[dp] _:x owl:onProperty T(dp) _:x owl:hasValue T(ct) | _:x |
| DataMinCardinality(n dp dr) | _:x rdf:type RESTRICTION[dp] _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(dp) _:x owl11:onDataRange T(dr) | _:x |
| DataMaxCardinality(n dp dr) | _:x rdf:type RESTRICTION[dp] _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(dp) _:x owl11:onDataRange T(dr) | _:x |
| DataExactCardinality(n dp dr) | _:x rdf:type RESTRICTION[dp] _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(dp) _:x owl11:onDataRange T(dr) | _:x |
| DataMinCardinality(n dp) | _:x rdf:type RESTRICTION[dp] _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(dp) | _:x |
| DataMaxCardinality(n dp) | _:x rdf:type RESTRICTION[dp] _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(dp) | _:x |
| DataExactCardinality(n dp) | _:x rdf:type RESTRICTION[dp] _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty T(dp) | _:x |
| EntityAnnotation(Datatype(dID) Annotation(apID1 ct1) ... Annotation(apIDn ctn)) | T(dID) T(apIDi) T(cti) 1 ≤ i ≤ n | |
| EntityAnnotation(OWLClass(cID) Annotation(apID1 ct1) ... Annotation(apIDn ctn)) | T(cID) T(apIDi) T(cti) 1 ≤ i ≤ n | |
| EntityAnnotation(ObjectProperty(opID) Annotation(apID1 ct1) ... Annotation(apIDn ctn)) | T(opID) T(apIDi) T(cti) 1 ≤ i ≤ n | |
| EntityAnnotation(DataProperty(dpID) Annotation(apID1 ct1) ... Annotation(apIDn ctn)) | T(dpID) T(apIDi) T(cti) 1 ≤ i ≤ n | |
| EntityAnnotation(AnnotationProperty(apID) Annotation(apID1 ct1) ... Annotation(apIDn ctn)) | T(apID) T(apIDi) T(cti) 1 ≤ i ≤ n | |
| EntityAnnotation(Individual(iID) Annotation(apID1 ct1) ... Annotation(apIDn ctn)) | T(iID) T(apIDi) T(cti) 1 ≤ i ≤ n | |
| SubClassOf(c1 c2) | T(c1) rdfs:subClassOf T(c2) | |
| EquivalentClasses(c1 ... cn) | T(ci) owl:equivalentClass T(ci+1) 1 ≤ i ≤ n-1 | |
| DisjointClasses(c1 c2) | T(c1) owl:disjointWith T(c2) | |
| DisjointClasses(c1 ... cn), n ≠ 2 | _:x rdf:type owl11:AllDisjointClasses _:x owl11:members T(SEQ c1 ... cn) | |
| DisjointUnion(cID c1 ... cn) | T(cID) owl11:disjointUnionOf T(SEQ c1 ... cn) | |
| SubObjectPropertyOf(op1 op2) | T(op1) SUBPROPERTYOF[op1,op2] T(op2) | |
| SubObjectPropertyOf( subObjectPropertyChain(op1 ... opn) op) | _:x SUBPROPERTYOF[op1,...,opn,op] T(op) _:x owl11: propertyChain T(SEQ op1 ... opn) | |
| EquivalentObjectProperties(op1 ... opn) | T(opi) EQUIVALENTPROPERTY[op1,...,opn] T(opi+1) 1 ≤ i ≤ n-1 | |
| DisjointObjectProperties(op1 ... opn) | T(opi) owl11:disjointObjectProperties T(opj) 1 ≤ i, j ≤ n, i ≠ j | |
| ObjectPropertyDomain(op c) | T(op) DOMAIN[op] T(c) | |
| ObjectPropertyRange(op c) | T(op) RANGE[op] T(c) | |
| InverseObjectProperties(op1 op2) | T(op1) owl:inverseOf T(op2) | |
| TransitiveObjectProperty(op) | T(op) rdf:type owl:TransitiveProperty | |
| FunctionalObjectProperty(op) | T(op) rdf:type FUNCTIONALPROPERTY[op] | |
| InverseFunctionalObjectProperty(op) | T(op) rdf:type owl:InverseFunctionalProperty | |
| ReflexiveObjectProperty(op) | T(op) rdf:type owl11:ReflexiveProperty | |
| IrreflexiveObjectProperty(op) | T(op) rdf:type owl11:IrreflexiveProperty | |
| SymmetricObjectProperty(op) | T(op) rdf:type owl:SymmetricProperty | |
| AsymmetricObjectProperty(op) | T(op) rdf:type owl11:AsymmetricProperty | |
| SubDataPropertyOf(dp1 dp2) | T(dp1) SUBPROPERTYOF[dp1,dp2] T(dp2) | |
| EquivalentDataProperties(dp1 ... dpn) | T(dpi) EQUIVALENTPROPERTY[dp1,...,dpn] T(dpi+1) 1 ≤ i ≤ n-1 | |
| DisjointDataProperties(dp1 ... dpn) | T(dpi) owl11:disjointDataProperties T(dpj) 1 ≤ i, j ≤ n, i ≠ j | |
| DataPropertyDomain(dp c) | T(dp) DOMAIN[dp] T(c) | |
| DataPropertyRange(dp dr) | T(op) RANGE[dp] T(dr) | |
| FunctionalDataProperty(dp) | T(dp) rdf:type FUNCTIONALPROPERTY[dp] | |
| SameIndividual(iID1 ... iIDn) | T(iIDi) owl:sameAs T(iIDi+1) 1 ≤ i ≤ n-1 | |
| DifferentIndividuals(iID1 iID2) | T(iID1) owl:differentFrom T(iID2) | |
| DifferentIndividuals(iID1 ... iIDn) | _:x rdf:type owl:AllDifferent _:x owl:distinctMembers T(SEQ iID1 ... iIDn) | |
| ClassAssertion(iID c) | T(iID) rdf:type T(c) | |
| ObjectPropertyAssertion(op iID1 iID2) | T(iID1) T(op) T(iID2) | |
| NegativeObjectPropertyAssertion(op iID1 iID2) | _:x rdf:type owl11:NegativeObjectPropertyAssertion _:x rdf:subject T(iID1) _:x rdf:predicate T(op) _:x rdf:object T(iID2) | |
| DataPropertyAssertion(dp iID ct) | T(iID) T(dp) T(ct) | |
| NegativeDataPropertyAssertion(op iID ct) | _:x rdf:type owl11:NegativeDataPropertyAssertion _:x rdf:subject T(iID) _:x rdf:predicate T(dp) _:x rdf:object T(ct) | |
| Declaration(Datatype(dID)) | T(dID) owl11:declaredAs rdfs:Datatype | |
| Declaration(OWLClass(cID)) | T(cID) owl11:declaredAs owl:Class | |
| Declaration(ObjectProperty(opID)) | T(opID) owl11:declaredAs owl:ObjectProperty | |
| Declaration(DataProperty(dpID)) | T(dpID) owl11:declaredAs owl:DatatypeProperty | |
| Declaration(AnnotationProperty(apID)) | T(dpID) owl11:declaredAs owl:AnnotationProperty | |
| Declaration(Individual(iID)) | T(iID) owl11:declaredAs owl11:Individual |
2.1 Annotated Axioms
If an axiom ax contains embedded annotations Annotation(apIDi cti), 1 ≤ i ≤ n, its serialization into RDF depends on the type of the axiom. In the following discussion, let ax' be the axiom that is equivalent to ax but that contains no annotations. Note that the Label and Comment annotations are just abbreviations, so they are serialized into RDF by expanding the abbreviation and then applying the serialization presented here.
2.1.1 Axioms that Generate Single Triples
If ax' is translated into a single RDF triple s p o, then the axiom ax is translated into RDF as follows:
_:x rdf:type owl11:Axiom
_:x T(apIDi) T(cti) 1 ≤ i ≤ n
_:x rdf:subject s
_:x rdf:predicate p
_:x rdf:object o
This is the case of the following axiom types: SubClassOf, DisjointUnion, DisjointClasses for two classes, SubObjectPropertyOf (with or without property chains on the subproperty), ObjectPropertyDomain, ObjectPropertyRange, InverseObjectProperties, TransitiveObjectProperty, FunctionalObjectProperty, InverseFunctionalObjectProperty, ReflexiveObjectProperty, IrreflexiveObjectProperty, SymmetricObjectProperty, AsymmetricObjectProperty, SubDataPropertyOf, DataPropertyDomain, DataPropertyRange, FunctionalDataProperty, ClassAssertion, ObjectPropertyAssertion, DataPropertyAssertion, Declaration, and DifferentIndividuals for two individuals.
2.1.2 Axioms that are Translated to Multiple Triples
If the axiom ax' is of type EquivalentClasses, EquivalentObjectProperties, DisjointObjectProperties, EquivalentDataProperties, DisjointDataProperties, SameIndividual, or EntityAnnotation its translation into RDF can be broken up into several RDF triples (because RDF can only represent binary relations). In this case, each of the RDF triples obtained by the translation of ax' is transformed as described in previous section, and the annotations are repeated for each of the blank nodes _:x obtained in the translation.
2.1.3 Axioms Represented by Blank Nodes
If the axiom ax' is of type NegativeObjectPropertyAssertion, NegativeDataPropertyAssertion, DisjointClasses for more than two classes, or DifferentIndividuals for more than two individuals, then its translation already requires introducing a blank node _:x. In such cases, ax is translated by first translating ax' into _:x as shown in Table 2, and then attaching the annotations of ax to _:x.
For example, a negative object property assertion
NegativeObjectPropertyAssertion( Annotation( apID1 ct1 ) op iID1 iID2)
is translated into the following RDF triples:
_:x rdf:type owl11:NegativeObjectPropertyAssertion
_:x rdf:subject T(iID1)
_:x rdf:predicate T(op)
_:x rdf:object T(iID2)
_:x T(apID1) T(ct1)
3 Mapping from RDF Graphs to Functional-Style Syntax
This section specifies how to map a set of RDF triples G into an OWL 1.1 ontology in functional-style syntax O, if possible. The function Type(x) assigns a set of types to each resource node x in G (in this and all other definitions, the graph G is implicitly understood and is not specified explicitly) and is defined as the smallest set satisfying the conditions from Table 3.
| If G contains a triple of this form... | ...then Type(x) must contain this URI. |
|---|---|
| x rdf:type owl:Class | owl:Class |
| x rdf:type owl:Restriction | owl:Class |
| x rdf:type owl11:ObjectRestriction | owl:Class |
| x rdf:type owl11:DataRestriction | owl:Class |
| x rdf:type rdfs:Datatype | rdfs:Datatype |
| x rdf:type owl:DataRange | rdfs:Datatype |
| x rdf:type owl:ObjectProperty | owl:ObjectProperty |
| x rdf:type owl:TransitiveProperty | owl:ObjectProperty |
| x rdf:type owl:SymmetricProperty | owl:ObjectProperty |
| x rdf:type owl11:AsymmetricProperty | owl:ObjectProperty |
| x rdf:type owl11:ReflexiveProperty | owl:ObjectProperty |
| x rdf:type owl11:IrreflexiveProperty | owl:ObjectProperty |
| x rdf:type owl11:FunctionalObjectProperty | owl:ObjectProperty |
| x rdf:type owl:DatatypeProperty | owl:DatatypeProperty |
| x rdf:type owl11:FunctionalDataProperty | owl:DatatypeProperty |
| x rdf:type owl:AnnotationProperty | owl:AnnotationProperty |
| x rdf:type owl11:Individual | owl11:Individual |
For purposes of backward compatability, owl:DataRange should be treated the same as rdfs:Datatype in this mapping. However, this treatment is likely to be removed in the future.
For a resource node x, the functions OnlyOP(x) and OnlyDP(x) are defined as follows:
- OnlyOP(x) is true if and only if owl:ObjectProperty ∈ Type(x) and owl:DatatypeProperty and owl:AnnotationProperty are not in Type(x);
- OnlyDP(x) is true if and only if owl:DatatypeProperty ∈ Type(x) and owl:ObjectProperty and owl:AnnotationProperty are not in Type(x);
- OnlyAP(x) is true if and only if owl:AnnotationProperty ∈ Type(x) and owl:ObjectProperty and owl:DatatypeProperty are not in Type(x).
The following partial functions are defined for each resource node x:
- OP(x) assigns to x an object property expression;
- DP(x) assigns to x a data property expression;
- DRANGE(x) assigns to x a data range; and
- DESC(x) assigns to x a description.
These functions are defined inductively by the following conditions. For the induction to correctly defined, it should be possible to order all resource nodes in G such that there are no cyclic dependencies in the second condition; if this is not possible, then G cannot be converted into an OWL 1.1 ontology.
- If x is not a blank node, then set OP(x), DP(x), DRANGE(x), and DESC(x) to x.
- For each triple pattern from the first column of Table 4 occurring in G, set OP(x) to the object property expression from the second column.
- For each triple pattern from the first column of Table 5 occurring in G, set DRANGE(x) to the data range from the second column. In the mapping of DatatypeRestriction construct, faceti can be one of the facets listed in the Structural Specification, and xsd:faceti is an RDF resource whose namespace is equal to xsd: and whose fragment is equal to the facet name.
- For each triple pattern from the first column of Table 6 occurring G, set DESC(x) to the description from the second column.
- If there is more than one way of assigning a value to any one of these functions, then G cannot be mapped into an OWL 1.1 ontology. Also, if the value of one of these functions is not defined for some node occurring in the functional-style syntax encoding, then G cannot be mapped into an OWL 1.1 ontology.
| Pattern | Object Property Expression |
|---|---|
| _:x owl11:inverseObjectPropertyExpression y | InverseObjectProperty( OP(y) ) |
| Pattern | Data Range |
|---|---|
| _:x rdf:type rdfs:Datatype _:x owl:complementOf y | DataComplementOf( DRANGE(y) ) |
| _:x rdf:type rdfs:Datatype _:x owl:oneOf T(SEQ ct1 ... ctn) | DataOneOf( ct1 ... ctn ) |
| _:x rdf:type rdfs:Datatype _:x owl11:onDatatype y _:x owl11:withRestrictions T(SEQ _:x1 ... _:xn) _:xi xsd:faceti cti for 1 ≤ i ≤ n | DatatypeRestriction( DRANGE(y) facet1 ct1 ... facetn ctn ) |
| Pattern | Description |
|---|---|
| _:x rdf:type owl:Class _:x owl:unionOf T(SEQ y1 ... yn) | ObjectUnionOf( DESC(y1) ... DESC(yn) ) |
| _:x rdf:type owl:Class _:x owl:intersectionOf T(SEQ y1 ... yn) | ObjectIntersectionOf( DESC(y1) ... DESC(yn) ) |
| _:x rdf:type owl:Class _:x owl:complementOf y | ObjectComplementOf( DESC(y) ) |
| _:x rdf:type owl:Class _:x owl:oneOf T(SEQ !y1 ... !yn) | ObjectOneOf( y1 ... yn ) |
| _:x rdf:type owl11:SelfRestriction _:x owl:onProperty y | ObjectExistsSelf( OP(y) ) |
| _:x rdf:type owl11:ObjectRestriction _:x owl:onProperty y _:x owl:hasValue !z | ObjectHasValue( OP(y) z ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty y _:x owl:hasValue !z { OnlyOP(y) = true } | ObjectHasValue( OP(y) z ) |
| _:x rdf:type owl11:ObjectRestriction _:x owl:onProperty y _:x owl:someValuesFrom z | ObjectSomeValuesFrom( OP(y) DESC(z) ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty y _:x owl:someValuesFrom z { OnlyOP(y) = true } | ObjectSomeValuesFrom( OP(y) DESC(z) ) |
| _:x rdf:type owl11:ObjectRestriction _:x owl:onProperty y _:x owl:allValuesFrom z | ObjectAllValuesFrom( OP(y) DESC(z) ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty y _:x owl:allValuesFrom z { OnlyOP(y) = true } | ObjectAllValuesFrom( OP(y) DESC(z) ) |
| _:x rdf:type owl11:ObjectRestriction _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onClass z ] | ObjectMinCardinality( n OP(y) [ DESC(z) ] ) |
| _:x rdf:type owl:Restriction _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onClass z ] { OnlyOP(y) = true } | ObjectMinCardinality( n OP(y) [ DESC(z) ] ) |
| _:x rdf:type owl11:ObjectRestriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onClass z ] | ObjectMaxCardinality( n OP(y) [ DESC(z) ] ) |
| _:x rdf:type owl:Restriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onClass z ] { OnlyOP(y) = true } | ObjectMaxCardinality( n OP(y) [ DESC(z) ] ) |
| _:x rdf:type owl11:ObjectRestriction _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onClass z ] | ObjectExactCardinality( n OP(y) [ DESC(z) ] ) |
| _:x rdf:type owl:Restriction _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onClass z ] { OnlyOP(y) = true } | ObjectExactCardinality( n OP(y) [ DESC(z) ] ) |
| _:x rdf:type owl11:DataRestriction _:x owl:onProperty y _:x owl:hasValue ct | DataHasValue( DP(y) ct ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty y _:x owl:hasValue ct { OnlyDP(y) = true } | DataHasValue( DP(y) ct ) |
| _:x rdf:type owl11:DataRestriction _:x owl:onProperty y _:x owl:someValuesFrom z | DataSomeValuesFrom( DP(y) DRANGE(z) ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty y _:x owl:someValuesFrom z { OnlyDP(y) = true } | DataSomeValuesFrom( DP(y) DRANGE(z) ) |
| _:x rdf:type owl11:DataRestriction _:x owl:onProperty T(SEQ y1 ... yn) _:x owl:someValuesFrom z | DataSomeValuesFrom( DP(y1) ... DP(yn) DRANGE(z) ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty T(SEQ y1 ... yn) _:x owl:someValuesFrom z { OnlyDP(y) = true } | DataSomeValuesFrom( DP(y1) ... DP(yn) MDRANGE(z) ) |
| _:x rdf:type owl11:DataRestriction _:x owl:onProperty y _:x owl:allValuesFrom z | DataAllValuesFrom( DP(y) DRANGE(z) ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty y _:x owl:allValuesFrom z { OnlyDP(y) = true } | DataAllValuesFrom( DP(y) DRANGE(z) ) |
| _:x rdf:type owl11:DataRestriction _:x owl:onProperty T(SEQ y1 ... yn) _:x owl:allValuesFrom z | DataAllValuesFrom( DP(y1) ... DP(yn) DRANGE(z) ) |
| _:x rdf:type owl:Restriction _:x owl:onProperty T(SEQ y1 ... yn) _:x owl:allValuesFrom z { OnlyDP(y) = true } | DataAllValuesFrom( DP(y1) ... DP(yn) DRANGE(z) ) |
| _:x rdf:type owl11:DataRestriction _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onDataRange z ] | DataMinCardinality( n DP(y) [ DRANGE(z) ] ) |
| _:x rdf:type owl:Restriction _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onDataRange z ] { OnlyDP(y) = true } | DataMinCardinality( n DP(y) [ DRANGE(z) ] ) |
| _:x rdf:type owl11:DataRestriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onDataRange z ] | DataMaxCardinality( n DP(y) [ DRANGE(z) ] ) |
| _:x rdf:type owl:Restriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onDataRange z ] { OnlyDP(y) = true } | DataMaxCardinality( n DP(y) [ DRANGE(z) ] ) |
| _:x rdf:type owl11:DataRestriction _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onDataRange z ] | DataExactCardinality( n DP(y) [ DRANGE(z) ] ) |
| _:x rdf:type owl:Restriction _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onDataRange z ] { OnlyDP(y) = true } | DataExactCardinality( n DP(y) [ DRANGE(z) ] ) |
The ontology O, corresponding to the set of RDF triples G, is the samllest set containing the axioms occurring in the second column of Table 7 for each triple pattern from the first column.
| Pattern | Axiom |
|---|---|
| !x !yi cti for 1 ≤ i ≤ n { rdfs:Datatype ∈ Type(x) and OnlyAP(yi) = true for 1 ≤ i ≤ n } | EntityAnnotation( Datatype(x) Annotation( y1 ct1 ) ... Annotation( yn ctn ) ) |
| !x !yi cti for 1 ≤ i ≤ n { owl:Class ∈ Type(x) and OnlyAP(yi) = true for 1 ≤ i ≤ n } | EntityAnnotation( OWLClass(x) Annotation( y1 ct1 ) ... Annotation( yn ctn ) ) |
| !x !yi cti for 1 ≤ i ≤ n { owl:ObjectProperty ∈ Type(x) and OnlyAP(yi) = true for 1 ≤ i ≤ n } | EntityAnnotation( ObjectProperty(x) Annotation( y1 ct1 ) ... Annotation( yn ctn ) ) |
| !x !yi cti for 1 ≤ i ≤ n { owl:DatatypeProperty ∈ Type(x) and OnlyAP(yi) = true for 1 ≤ i ≤ n } | EntityAnnotation( DataProperty(x) Annotation( y1 ct1 ) ... Annotation( yn ctn ) ) |
| !x !yi cti for 1 ≤ i ≤ n { owl:AnnotationProperty ∈ Type(x) and OnlyAP(yi) = true for 1 ≤ i ≤ n } | EntityAnnotation( AnnotationProperty(x) Annotation( y1 ct1 ) ... Annotation( yn ctn ) ) |
| !x !yi cti for 1 ≤ i ≤ n { owl11:Individual ∈ Type(x) and OnlyAP(yi) = true for 1 ≤ i ≤ n } | EntityAnnotation( Individual(x) Annotation( y1 ct1 ) ... Annotation( yn ctn ) ) |
| x rdfs:subClassOf y | SubClassOf( DESC(x) DESC(y) ) |
| x owl:equivalentClass y | EquivalentClasses( DESC(x) DESC(y) ) |
| x owl:disjointWith y | DisjointClasses( DESC(x) DESC(y) ) |
| _:x rdf:type owl11:AllDisjointClasses _:x owl11:members T(SEQ y1 ... yn) | DisjointClasses( DESC(y1) ... DESC(yn) ) |
| x owl11:disjointUnionOf T(SEQ y1 ... yn) | DisjointUnion( DESC(x) DESC(y1) ... DESC(yn) ) |
| x owl11:subObjectPropertyOf y | SubObjectPropertyOf( OP(x) OP(y) ) |
| x rdfs:subPropertyOf y { OnlyOP(x) = true and OnlyOP(y) = true } | SubObjectPropertyOf( OP(x) OP(y) ) |
| _:x owl11:subObjectPropertyOf y _:x owl11:propertyChain T(SEQ x1 ... xn) | SubObjectPropertyOf( subObjectPropertyChain( OP(x1) ... OP(xn) ) OP(y) ) |
| _:x rdfs:subPropertyOf y _:x owl11:propertyChain T(SEQ x1 ... xn) | SubObjectPropertyOf( subObjectPropertyChain( OP(x1) ... OP(xn) ) OP(y) ) |
| x owl11:equivalentObjectProperty y | EquivalentObjectProperties( OP(x) OP(y) ) |
| x owl:equivalentProperty y { OnlyOP(x) = true and OnlyOP(y) = true } | EquivalentObjectProperties( OP(x) OP(y) ) |
| x owl11:disjointObjectProperties y | DisjointObjectProperties( OP(x) OP(y) ) |
| x owl11:objectPropertyDomain y | ObjectPropertyDomain( OP(x) DESC(y) ) |
| x rdfs:domain y { OnlyOP(x) = true } | ObjectPropertyDomain( OP(x) DESC(y) ) |
| x owl11:objectPropertyRange y | ObjectPropertyRange( OP(x) DESC(y) ) |
| x rdfs:range y { OnlyOP(x) = true } | ObjectPropertyRange( OP(x) DESC(y) ) |
| x owl:inverseOf y | InverseObjectProperties( OP(x) OP(y) ) |
| x rdf:type owl:TransitiveProperty | TransitiveObjectProperty( OP(x) ) |
| x rdf:type owl11:FunctionalObjectProperty | FunctionalObjectProperty( OP(x) ) |
| x rdf:type owl:FunctionalProperty { OnlyOP(x) = true } | FunctionalObjectProperty( OP(x) ) |
| x rdf:type owl:InverseFunctionalProperty | InverseFunctionalObjectProperty( OP(x) ) |
| x rdf:type owl11:ReflexiveProperty | ReflexiveObjectProperty( OP(x) ) |
| x rdf:type owl11:IrreflexiveProperty | IrreflexiveObjectProperty( OP(x) ) |
| x rdf:type owl:SymmetricProperty | SymmetricObjectProperty( OP(x) ) |
| x rdf:type owl11:AsymmetricProperty | AsymmetricObjectProperty( OP(x) ) |
| x owl11:subDataPropertyOf y | SubDataPropertyOf( DP(x) DP(y) ) |
| x rdfs:subPropertyOf y { OnlyDP(x) = true and OnlyDP(y) = true } | SubDataPropertyOf( DP(x) DP(y) ) |
| x owl11:equivalentDataProperty y | EquivalentDataProperties(dp1 ... dpn) |
| x owl:equivalentProperty y { OnlyDP(x) = true and OnlyDP(y) = true } | EquivalentDataProperties(dp1 ... dpn) |
| x owl11:disjointDataProperties y | DisjointDataProperties( DP(x) DP(y) ) |
| x owl11:dataPropertyDomain y | DataPropertyDomain( DP(x) DESC(y) ) |
| x rdfs:domain y { OnlyDP(x) = true } | DataPropertyDomain( DP(x) DESC(y) ) |
| x owl11:dataPropertyRange y | DataPropertyRange( DP(x) DRANGE(y) ) |
| x rdfs:range y { OnlyDP(x) = true } | DataPropertyRange( DP(x) DRANGE(y) ) |
| x rdf:type owl11:FunctionalDataProperty | FunctionalDataProperty( DP(x) ) |
| x rdf:type owl:FunctionalProperty { OnlyDP(x) = true } | FunctionalDataProperty( DP(x) ) |
| !x owl:sameAs !y | SameIndividual( x y ) |
| !x owl:differentFrom !y | DifferentIndividuals( x y ) |
| _:x rdf:type owl:AllDifferent _:x owl:distinctMembers T(SEQ x1 ... xn) | DifferentIndividuals( x1 ... xn ) |
| !x rdf:type y { y is not a part of RDF(S) or OWL 1.1 vocabulary } | ClassAssertion( x DESC(y) ) |
| !x !y !z { none of x, y, and z is a part of RDF(S) or OWL 1.1 vocabulary } { owl:AnnotationProperty is not in Type(y) } | ObjectPropertyAssertion( OP(y) x z ) |
| _:x rdf:type owl11:NegativeObjectPropertyAssertion _:x rdf:subject !w _:x rdf:predicate !y _:x rdf:object !z | NegativeObjectPropertyAssertion( OP(y) w z ) |
| !x !y ct { neither x not y is a part of RDF(S) or OWL 1.1 vocabulary } { owl:AnnotationProperty is not in Type(y) } | DataPropertyAssertion( DP(y) x ct ) |
| _:x rdf:type owl11:NegativeDataPropertyAssertion _:x rdf:subject !w _:x rdf:predicate !y _:x rdf:object ct | NegativeDataPropertyAssertion( DP(y) w ct ) |
| !x owl11:declaredAs rdfs:Datatype | Declaration( Datatype(x) ) |
| !x owl11:declaredAs owl:Class | Declaration( OWLClass(x) ) |
| !x owl11:declaredAs owl:ObjectProperty | Declaration( ObjectProperty(x) ) |
| !x owl11:declaredAs owl:DatatypeProperty | Declaration( DataProperty(x) ) |
| !x owl11:declaredAs owl:AnnotationProperty | Declaration( AnnotationProperty(x) ) |
| !x owl11:declaredAs owl11:Individual | Declaration( Individual(x) ) |
| _:x rdf:type owl11:Axiom _:x !yi cti 1 ≤ i ≤ n _:x rdf:subject s _:x rdf:predicate !p _:x rdf:object o | The result is the axiom obtained by matching the triple pattern s p o. The axiom contains the following annotations: Annotation( y1 ct1 ) ... Annotation( yn ctn ) ) |
| Pattern | Ontology |
|---|---|
| !x rdf:type owl:Ontology !x owl:imports y1 ... !x owl:imports yk !x !z1 !w1 ... !x !zn !wn | Ontology(!x Import(y1) ... Import(yk) Annotation(z1 w1) ... Annotation(zn wn) The set of axioms obtained by matching the patters from Table 7.) |
| _:x rdf:type owl:Ontology _:x owl:imports y1 ... _:x owl:imports yk _:x !z1 !w1 ... _:x !zn !wn | Ontology( Import(y1) ... Import(yk) Annotation(z1 w1) ... Annotation(zn wn) The set of axioms obtained by matching the patters from Table 7.) |
If G contains some triple that is not matched by any triple pattern (including the patterns used to define Type(x)), then G cannot be mapped into an OWL 1.1 ontology.
4 Changes from Original Version of OWL
Multiple changes have been made to accommodate the improved functional-style syntax. As well
- owl:DataRange is deprecated and its use is not suggested. However the mapping to the functional-style syntax still allows owl:DataRange in OWL 1.1 ontologies.
5 References
- [OWL 1.1 Specification]
- OWL 1.1 Web Ontology Language: Structural Specification and Functional-Style Syntax. Peter F. Patel-Schneider, Ian Horrocks, and Boris Motik, eds., 2006.
- [OWL 1.1 Semantics]
- OWL 1.1 Web Ontology Language: Model-Theoretic Semantics. Bernardo Cuenca Grau and Boris Motik, eds., 2006.
- [RDF Semantics]
- RDF Semantics. Patrick Hayes, Editor, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-mt-20040210/.
