W3C

OWL 2 Web Ontology Language:
Mapping to RDF Graphs

W3C Editor's Draft 11 April22 September 2008

This version:
http://www.w3.org/2007/OWL/draft/ED-owl2-mapping-to-rdf-20080411/http://www.w3.org/2007/OWL/draft/ED-owl2-mapping-to-rdf-20080922/
Latest editor's draft:
http://www.w3.org/2007/OWL/draft/owl2-mapping-to-rdf/
Previous version:
http://www.w3.org/2007/OWL/draft/WD-owl11-mapping-to-rdf-20080108/http://www.w3.org/2007/OWL/draft/ED-owl2-mapping-to-rdf-20080411/ (color-coded diff)
Authors:
Bernardo Cuenca Grau, Oxford University
Boris Motik, Oxford University
Peter F. Patel-Schneider, Bell Labs Research, Alcatel-Lucent
Contributors:
Ian Horrocks, Oxford University
Bijan Parsia, The University of Manchester


Abstract

OWL 2 extends the W3C OWL Web Ontology Language with a small but useful set of features that have been requested by users, for which effective reasoning algorithms are now available, and that OWL tool developers are willing to support. The new features include extra syntactic sugar, additional property and qualified cardinality constructors, extended datatype support, simple metamodelling, and extended annotations.
This document provides a mapping from the functional-style syntax of OWL 2 to the RDF exchange syntax for OWL 2, and vice versa.

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/.

This document is being published as one of a set of 68 documents:

  1. Structural Specification and Functional-Style Syntax
  2. Model-Theoretic Semantics
  3. RDF-Based Semantics
  4. Mapping to RDF Graphs (this document)
  5. XML Serialization
  6. Profiles
  7. Primer Summary of Changes Since the previous Working Draft (dated 8 January 2008), the only change is the name of the language, from "OWL 1.1" to "OWL 2". Since the group is publishing three new Working Drafts,Conformance and the name has changed, it decided to publish the complete set with consistent names.Test Cases
  8. A Datatype for Internationalized Text

Please Comment By 11 May 2008ASAP

The OWL Working Group seeks public feedback on these Working Drafts. Please send your comments to public-owl-comments@w3.org (public archive). If possible, please offer specific changes to the text that would address your concern. You may also wish to check the Wiki Version of this document for internal-review comments and changes being drafted which may address your concerns.

No Endorsement

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Patents

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. 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. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.


[Show Short TOC]

Contents


1 Introduction Editor's Note: See Issue-66 (mapping inconsistencies).and Preliminaries

This document provides a mapping from the functional-style syntaxmappings by means of which every OWL 2 as givenontology in the functional-style syntax [OWL 2 Specification] to thecan be mapped into RDF exchange syntax for OWL 2triples and vice versa. Everyback without any change in the formal meaning of the ontology. More precisely, let O be any OWL 2 ontology canin functional-style syntax, let T(O) be serializedthe set of RDF triples obtained by transforming O into RDF triples as specified in RDF, so everySection 2, and let O' be the OWL 2 ontology in RDF is a valid OWL Full ontology.functional-style syntax obtained by applying the reverse transformation from Section 3 to T(O); then, O and O' are logically equivalent that is, they have exactly the same set of models.

The RDF syntax of OWL 2 is backwards-compatible with that of OWL DL, this is,DL: every OWL DL ontology in RDF issyntax can be mapped into a valid OWL 2 ontology.ontology using the semanticsreverse-transformation from Section 3 such that the resulting OWL 2 is defined for ontologies inontology has exactly the functional-style syntax.same set of models as the original OWL 2 ontologies serialized in RDF/XML are interpreted by translating them into the functional-style syntax and applying the OWL 2 semantics [ OWL 2 Semantics ].DL ontology.

The syntax for triples used herein this document is the one used in the RDF Semantics document.[RDF Semantics]. Full URIs are abbreviated using namespaces as usual. Editor's Note:the actualnamespaces used infrom the OWL 2 Specification are subject to discussion and might change in future.[OWL 2 Specification].

The following notation is used throughout this document:document for referring to parts of RDF graphs:

The italicized keywords MUST, MUST NOT, SHOULD, SHOULD NOT, and T(SEQ y 1 ... y n ) denotesMAY specify certain aspects of the encodingnormative behavior of an RDF listOWL 2 tools, and are interpreted as shownspecified in Table 1. Table 1. Transformation of Sequences to Triples Sequence S Transformation T(S) Main Node of T(S) SEQ rdf:nil SEQ y 1 ... y n _:x rdf:type rdf:List _:x rdf:first T(y 1 ) _:x rdf:rest T(SEQ y 2 ... y n ) _:xRFC 2119 [RFC 2119].

2 TranslationMapping from Functional-Style Syntax to RDF Graphs

Editor's Note: See Issue-2 (allDisjoint-RDF), Issue-68 (nonmonotonic mapping) and Issue-81 (reification, negative assertions). As explained in [ OWL 2 Specification ],This section defines a mapping of an OWL 2 ontology O in functional-style syntax is fully typed -- that is, from the syntax, one can immediately see what is the intendend usageinto a set of some symbol. OWL 1.0 syntaxRDF triples T(O). The mapping is not typed; rather, OWL 1.0 relies on explicit statementspresented in three parts. Section 2.1 shows how to translate axioms that determine the typedo not contain annotations, Section 2.2 shows how to translate annotations, and Section 2.3 shows how to translate axioms containing annotations.

2.1 Translation of each URI. For backwards compatibility, OWL 2 uses OWL 1.0 vocabulary whenever there is no ambiguity. This is made precise using the following definition.Axioms without Annotations

Table 1 presents the type of a symbol S inoperator T that maps an OWL 2 ontology O (inin functional-style syntax), written Type(S,O)syntax into a set of RDF triples T(O), provided that no axiom in O is annotated. The mapping is defined asrecursively, i.e., the smallest set such that if the parse treemapping of O contains S undera objectPropertyURI node, then owl:ObjectProperty Type(S,O) ; ifconstruct often depends on the parse treemappings of O contains S underits sub-constructs, but in a dataPropertyURI node, then owl:DatatypeProperty Type(S,O) ;slightly unusual way. If the parse treemapping of O contains S undera annotationURI node, then owl:AnnotationProperty Type(S,O) ; ifconstruct refers to the parse treemapping of O contains S undera owlClassURI node,sub-construct, then owl:Class Type(S,O) ; ifthe parse treetriples generated by the recursive invocation of O contains ST are added to the graph under a datatypeURI node, then rdfs:Datatype Type(S,O) ;construction, and if the parse treeits main node is used in place of O contains S under a individualURI node, then owl11:Individual Type(S,O) .the aboveinvocation itself.

The definition refers to a parse tree only forof the axioms from O , and not fromoperator T uses the axioms from some ontology that O imports. A symbol S in punnedoperator TANN in an ontology O if Type(S,O) contains more than one element. Based on that,order to translate annotations. The following two conditions are defined: OnlyOP(S)operator TANN is true if and only if owl:ObjectProperty Type(S,O) and owl:DatatypeProperty and owl:AnnotationProperty are notdefined in Type(S,O) ; OnlyDP(S) is true if and only if owl:DatatypeProperty Type(S,O)Section 2.2. It takes an annotation and owl:ObjectPropertyan URI reference or a blank node and owl:AnnotationProperty are notproduces the triples that attach the annotation to the supplied object.

In Type(S,O) ; OnlyAP(S)the mapping of DatatypeRestriction, faceti is true if and only if owl:AnnotationProperty Type(S,O)one of the constraining facets listed in Section 4 of the OWL 2 Specification [OWL 2 Specification], and owl:ObjectPropertyxsd:faceti is a URI resource whose namespace is xsd: and owl:DatatypeProperty arewhose fragment is the constraining facet name. In the mapping, each generated blank node (i.e., each blank node that does not correspond to an anonymous individual) is fresh in Type(S,O) .each application of a mapping rule. Furthermore, the following shortcutsconventions are used in the translationthis section to denote different syntactic parts of OWL 2 ontologies into RDF: 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[op 1 ,...,op n ] expands to rdfs:subPropertyOf if OnlyOP(op i ) = true for each 1 i n, and to owl11:subObjectPropertyOf otherwise; SUBPROPERTYOF[dp 1 ,dp 2 ] expands to rdfs:subPropertyOf if OnlyDP(dp 1 ) = true and OnlyDP(dp 2 ) = true , and to owl11:subDataPropertyOf otherwise; EQUIVALENTPROPERTY[op 1 ,...,op n ] expands to owl:equivalentProperty if OnlyOP(op i ) = true for each 1 i n,ontologies:

In this section, T(SEQ y1 ,...,dp... yn ] expands to owl:equivalentProperty if OnlyDP(dp i) = 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 presentsdenotes the translation of a sequence of objects from the operator T that translates an OWL 2 ontology infunctional-style syntax into a set ofan RDF triples. This table does not consider axioms with annotations: the translation of such axioms is describedlist, as shown in Section 2.1 .Table 2.1.

Table 1. Transformation to Triples
Functional-Style Syntax S TransformationTriples Generated in an Invocation of T(S) Main Node of T(S)
Ontology(ontologyURI Import(oIDSEQ rdf:nil
SEQ y1 ... yn _:x rdf:first T(y1)
_:x rdf:rest T(SEQ y2 ... Import(oID kyn)
Annotation(apID 1 ct_:x
Ontology( ontologyURI [ versionURI ]
    Import( importedOntologyURI1 )
    ...
Annotation(apID n ct n    Import( importedOntologyURIk )
    annotation1
    ...
    annotationm
    axiom1
    ...
    axiom mn
)
ontologyURI rdf:type owl:Ontology
[ ontologyURI owl:versionInfo versionURI ]
ontologyURI owl:imports oID iimportedOntologyURI1
i ...
ontologyURI owl:imports importedOntologyURIk
TANN(annotation1,ontologyURI)
...
TANN(annotationm,ontologyURI)
T(axiom1)
...
T(axiomn)
ontologyURI
T(apID iOntology(
    Import( importedOntologyURI1 )
T(ct i    ...
    Import( importedOntologyURIk )
    annotation1
i     ...
    annotationm
    axiom1
    ...
    axiomn
T(axiom i)
_:x rdf:type owl:Ontology
_:x owl:imports importedOntologyURI1
i ...
_:x owl:imports importedOntologyURIk
TANN(annotation1,_:x)
...
TANN(annotationm ontologyURI datatypeURI datatypeURI,_:x)
T(axiom1)
...
T(axiomn)
_:x
C C
Class( C ) C
DT DT
Datatype( DT ) DT
OP OP
ObjectProperty( OP ) OP
DP DP
DataProperty( DP ) DP
AP AP
AnnotationProperty( AP ) AP
a a
NamedIndividual( *:a ) *:a
lt lt
Declaration( Datatype( DT ) ) T(DT) rdf:type rdfs:Datatype
datatypeURI owlClassURI owlClassURIDeclaration( Class( C ) ) T(C) rdf:type owl:Class
owlClassURI objectPropertyURI objectPropertyURIDeclaration( ObjectProperty( OP ) ) T(OP) rdf:type owl:ObjectProperty
objectPropertyURI dataPropertyURI dataPropertyURIDeclaration( DataProperty( DP ) ) T(DP) rdf:type owl:DatatypeProperty
dataPropertyURI annotationURI annotationURIDeclaration( AnnotationProperty( AP ) ) T(AP) rdf:type owl:AnnotationProperty
annotationURI individualURI individualURI constant constant DataComplementOf(dr)Declaration( NamedIndividual( *:a ) ) T(*:a) rdf:type owl:NamedIndividual
InverseOf( OP ) _:x owl:inverseOf T(OP) _:x
ComplementOf( DR ) _:x rdf:type owl:DataRangerdfs:Datatype
_:x owl:complementOfowl:datatypeComplementOf T(DR)
_:x
DataOneOf(ctOneOf( lt1 ... ctltn ) _:x rdf:type owl:DataRangerdfs:Datatype
_:x owl:oneOf T(SEQ ctlt1 ... ctltn)
_:x
DatatypeRestriction(drDatatypeRestriction( DT
    facet1 ctlt1
    ...
    facetn ctltn
)
_:x rdf:type owl:DataRangerdfs:Datatype
_:x owl11:onDataRange T(dr)owl:onDatatype T(DT)
_:x owl11:withRestrictionsowl:withRestrictions T(SEQ _:x_:y1 ... _:x_:yn)
_:x i owl11:_:y1 xsd:facet i ct i1 i lt1
...
_:yn xsd:facetn ltn
_:x
InverseObjectProperty(op) _:x owl11:inverseObjectPropertyExpression T(op) _:x ObjectUnionOf(cIntersectionOf( CE1 ... cCEn ) _:x rdf:type owl:Class
_:x owl:unionOfowl:intersectionOf T(SEQ cCE1 ... cCEn)
_:x
ObjectIntersectionOf(cUnionOf( CE1 ... cCEn ) _:x rdf:type owl:Class
_:x owl:intersectionOfowl:unionOf T(SEQ cCE1 ... cCEn)
_:x
ObjectComplementOf(c)ComplementOf( CE ) _:x rdf:type owl:Class
_:x owl:complementOf T(c)T(CE)
_:x
ObjectOneOf(iIDOneOf( a1 ... iIDan ) _:x rdf:type owl:Class
_:x owl:oneOf T(SEQ iIDa1 ... iIDan)
_:x
ObjectSomeValuesFrom(op c)SomeValuesFrom( OPE CE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:onProperty T(op)T(OPE)
_:x owl:someValuesFrom T(c)T(CE)
_:x
ObjectAllValuesFrom(op c)AllValuesFrom( OPE CE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:onProperty T(op)T(OPE)
_:x owl:allValuesFrom T(c)T(CE)
_:x
ObjectExistsSelf(op)HasValue( OPE a ) _:x rdf:type owl11:SelfRestrictionowl:Restriction
_:x owl:onProperty T(op)T(OPE)
_:x ObjectHasValue(op iID)owl:hasValue T(a)
_:x
ExistsSelf( OPE ) _:x rdf:type RESTRICTION[op]owl:SelfRestriction
_:x owl:onProperty T(op)T(OPE)
_:x
owl:hasValue T(iID) _:x ObjectMinCardinality(n op c)MinCardinality( n OPE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:minCardinality "n"^^xsd:nonNegativeInteger"n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(op) _:x owl11:onClass T(c)T(OPE)
_:x
ObjectMaxCardinality(n op c)MinCardinality( n OPE CE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:maxCardinality "n"^^xsd:nonNegativeIntegerowl:minQualifiedCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(op)T(OPE)
_:x owl11:onClass T(c)owl:onClass T(CE)
_:x
ObjectExactCardinality(n op c)MaxCardinality( n OPE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:cardinality "n"^^xsd:nonNegativeIntegerowl:maxCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(op) _:x owl11:onClass T(c)T(OPE)
_:x
ObjectMinCardinality(n op)MaxCardinality( n OPE CE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:minCardinality "n"^^xsd:nonNegativeIntegerowl:maxQualifiedCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(op)T(OPE)
_:x ObjectMaxCardinality(n op)owl:onClass T(CE)
_:x
ExactCardinality( n OPE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:maxCardinality "n"^^xsd:nonNegativeIntegerowl:cardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(op)T(OPE)
_:x
ObjectExactCardinality(n op)ExactCardinality( n OPE CE ) _:x rdf:type RESTRICTION[op]owl:Restriction
_:x owl:cardinality "n"^^xsd:nonNegativeIntegerowl:qualifiedCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(op)T(OPE)
_:x DataSomeValuesFrom(dp dr)owl:onClass T(CE)
_:x
SomeValuesFrom( DPE DR ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:onProperty T(dp)T(DPE)
_:x owl:someValuesFrom T(DR)
_:x
DataSomeValuesFrom(dpSomeValuesFrom( DPE1 ... dpDPEn DR ), n dr) 2 _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:onPropertyowl:onProperties T(SEQ dpDPE1 ... dpDPEn)
_:x owl:someValuesFrom T(DR)
_:x
DataAllValuesFrom(dp dr)AllValuesFrom( DPE DR ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:onProperty T(dp)T(DPE)
_:x owl:allValuesFrom T(DR)
_:x
DataAllValuesFrom(dpAllValuesFrom( DPE1 ... dpDPEn DR ), n dr) 2 _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:onPropertyowl:onProperties T(SEQ dpDPE1 ... dpDPEn)
_:x owl:allValuesFrom T(DR)
_:x
DataHasValue(dp ct)HasValue( DPE lt ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:onProperty T(dp)T(DPE)
_:x owl:hasValue T(ct)T(lt)
_:x
DataMinCardinality(n dp dr)MinCardinality( n DPE ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:minCardinality "n"^^xsd:nonNegativeInteger"n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(dp) _:x owl11:onDataRange T(dr)T(DPE)
_:x
DataMaxCardinality(n dp dr)MinCardinality( n DPE DR ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:maxCardinality "n"^^xsd:nonNegativeIntegerowl:minQualifiedCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(dp)T(DPE)
_:x owl11:onDataRangeowl:onDataRange T(DR)
_:x
DataExactCardinality(n dp dr)MaxCardinality( n DPE ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:cardinality "n"^^xsd:nonNegativeIntegerowl:maxCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(dp)T(DPE)
_:x
owl11:onDataRange T(dr) _:x DataMinCardinality(n dp)MaxCardinality( n DPE DR ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:minCardinality "n"^^xsd:nonNegativeIntegerowl:maxQualifiedCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(dp)T(DPE)
_:x owl:onDataRange T(DR)
_:x
DataMaxCardinality(n dp)ExactCardinality( n DPE ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:maxCardinality "n"^^xsd:nonNegativeIntegerowl:cardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(dp)T(DPE)
_:x
DataExactCardinality(n dp)ExactCardinality( n DPE DR ) _:x rdf:type RESTRICTION[dp]owl:Restriction
_:x owl:cardinality "n"^^xsd:nonNegativeIntegerowl:qualifiedCardinality "n"^^xsd:nonNegativeInteger
_:x owl:onProperty T(dp)T(DPE)
_:x EntityAnnotation(Datatype(dID) Annotation(apID 1 ctowl:onDataRange T(DR)
_:x
SubClassOf( CE1 CE2 ) ... Annotation(apID n ct n )) T(dID) T(apID i ) T(ct i ) 1 i n EntityAnnotation(OWLClass(cID) Annotation(apID 1 ctT(CE1) ... Annotation(apID n ct n )) T(cID) T(apID i ) T(ct irdfs:subClassOf T(CE2)
EquivalentClasses( CE1 i n EntityAnnotation(ObjectProperty(opID) Annotation(apID 1 ct 1 )... Annotation(apIDCEn ct n )) T(opID) T(apID i) T(ct i ) 1 i n EntityAnnotation(DataProperty(dpID) Annotation(apID 1 ctT(CE1) ... Annotation(apID n ct n )) T(dpID) T(apID i ) T(ct i ) 1 i n EntityAnnotation(Individual(iID) Annotation(apID 1 ct 1owl:equivalentClass T(CE2)
...
Annotation(apID n ct n )) T(iID) T(apID i ) T(ct iT(CEn-1) 1 i owl:equivalentClass T(CEn SubClassOf(c)
DisjointClasses( CE1 cCE2 ) T(cT(CE1) rdfs:subClassOf T(cowl:disjointWith T(CE2)
EquivalentClasses(cDisjointClasses( CE1 ... cCEn ) T(c i ) owl:equivalentClass T(c i+1 ) 1 i n-1 DisjointClasses(c), n > 2 _:x rdf:type owl:AllDisjointClasses
_:x owl:members T(SEQ CE1 ... cCEn)
T(c i ) owl:disjointWith T(c j ) 1 i, j n, i j DisjointUnion(cIDDisjointUnion( C CE1 ... cCEn ) T(cID) owl11:disjointUnionOfT(C) owl:disjointUnionOf T(SEQ cCE1 ... cCEn)
SubObjectPropertyOf(opSubPropertyOf( OPE1 opOPE2 ) T(opT(OPE1) SUBPROPERTYOF[op 1 ,op 2 ] T(oprdfs:subPropertyOf T(OPE2)
SubObjectPropertyOf( subObjectPropertyChain(opSubPropertyOf( PropertyChain( OPE1 ... opOPEn ) op)OPE ) _:x SUBPROPERTYOF[op 1 ,...,op n ,op] T(op)rdfs:subPropertyOf T(OPE)
_:x owl11: propertyChainowl:propertyChain T(SEQ opOPE1 ... opOPEn)
EquivalentObjectProperties(opEquivalentProperties( OPE1 ... opOPEn ) T(op i ) EQUIVALENTPROPERTY[opT(OPE1 ,...,op) owl:equivalentProperty T(OPE2)
...
T(OPEn-1) owl:equivalentProperty T(OPEn ])
DisjointProperties( OPE1 OPE2 ) T(op1) owl:propertyDisjointWith T(op i+12)
DisjointProperties( OPE1 i n-1 DisjointObjectProperties(op... OPEn), n > 2 _:x rdf:type owl:AllDisjointProperties
_:x owl:members T(SEQ OPE1 ... opOPEn)
T(op iPropertyDomain( OPE CE ) owl11:disjointObjectProperties T(op jT(OPE) rdfs:domain T(CE)
PropertyRange( OPE CE ) T(OPE) rdfs:range T(CE)
InverseProperties( OPE1 i, j n, i j ObjectPropertyDomain(op c) T(op) DOMAIN[op] T(c) ObjectPropertyRange(op c) T(op) RANGE[op] T(c) InverseObjectProperties(op 1 opOPE2 ) T(opT(OPE1) owl:inverseOf T(opT(OPE2)
TransitiveObjectProperty(op) T(op) rdf:type owl:TransitiveProperty FunctionalObjectProperty(op) T(op)FunctionalProperty( OPE ) T(OPE) rdf:type FUNCTIONALPROPERTY[op] InverseFunctionalObjectProperty(op) T(op)owl:FunctionalProperty
InverseFunctionalProperty( OPE ) T(OPE) rdf:type owl:InverseFunctionalProperty
ReflexiveObjectProperty(op) T(op)ReflexiveProperty( OPE ) T(OPE) rdf:type owl11:ReflexiveProperty IrreflexiveObjectProperty(op) T(op)owl:ReflexiveProperty
IrreflexiveProperty( OPE ) T(OPE) rdf:type owl11:IrreflexiveProperty SymmetricObjectProperty(op) T(op)owl:IrreflexiveProperty
SymmetricProperty( OPE ) T(OPE) rdf:type owl:SymmetricProperty
AsymmetricObjectProperty(op) T(op)AsymmetricProperty( OPE ) T(OPE) rdf:type owl:AsymmetricProperty
TransitiveProperty( OPE ) T(OPE) rdf:type owl11:AsymmetricProperty SubDataPropertyOf(dpowl:TransitiveProperty
SubPropertyOf( DPE1 dpDPE2 ) T(dpT(DPE1) SUBPROPERTYOF[dp 1 ,dp 2 ] T(dprdfs:subPropertyOf T(DPE2)
EquivalentDataProperties(dpEquivalentProperties( DPE1 ... dpDPEn ) T(dp i ) EQUIVALENTPROPERTY[dpT(DPE1 ,...,dp n ] T(dp i+1) 1 i n-1 DisjointDataProperties(dp 1 ... dp nowl:equivalentProperty T(DPE2)
T(dp i...
T(DPEn-1) owl11:disjointDataProperties T(dp jowl:equivalentProperty T(DPEn)
DisjointProperties( DPE1 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(iID 1 ... iID nDPE2 ) T(iID iT(DPE1) owl:sameAs T(iID i+1owl:propertyDisjointWith T(DPE2)
DisjointProperties( DPE1 i n-1 DifferentIndividuals(iID... DPEn ), n > 2 _:x rdf:type owl:AllDisjointProperties
_:x owl:members T(SEQ DPE1 ... iIDDPEn)
T(iID iPropertyDomain( DPE CE ) T(DPE) rdfs:domain T(CE)
PropertyRange( DPE DR ) T(DPE) rdfs:range T(DR)
FunctionalProperty( DPE ) T(DPE) rdf:type owl:FunctionalProperty
HasKey( CE PE1 ... PEn ) T(CE) owl:hasKey T(SEQ PE1 ... PEn)
SameIndividual( a1 ... an ) T(a1) owl:sameAs T(a2)
...
T(an-1) owl:sameAs T(an)
DifferentIndividuals( a1 a2 ) T(a1) owl:differentFrom T(iID jT(a2)
DifferentIndividuals( a1 i, j n, i j ClassAssertion(iID c) T(iID)... an ), n > 2 _:x rdf:type T(c) ObjectPropertyAssertion(op iIDowl:AllDifferent
_:x owl:members T(SEQ a1 ... an)
ClassAssertion( CE a ) T(a) rdf:type T(CE)
PropertyAssertion( OP a1 iIDa2 ) T(iIDT(a1) T(OP) T(iIDT(a2)
PropertyAssertion( InverseOf( OP ) a1 a2 ) T(a2) NegativeObjectPropertyAssertion(op iIDT(OP) T(a1)
NegativePropertyAssertion( OPE a1 iIDa2 ) _:x rdf:type owl11:NegativeObjectPropertyAssertionowl:NegativePropertyAssertion
_:x rdf:subject T(iIDowl:sourceIndividual T(a1)
_:x rdf:predicate T(op)owl:assertionProperty T(OPE)
_:x rdf:object T(iIDowl:targetIndividual T(a2)
DataPropertyAssertion(dp iID ct) T(iID) T(dp) T(ct) NegativeDataPropertyAssertion(op iID ct)PropertyAssertion( DPE a lt ) T(a) T(DPE) T(lt)
NegativePropertyAssertion( DPE a lt ) _:x rdf:type owl11:NegativeDataPropertyAssertionowl:NegativePropertyAssertion
_:x rdf:subject T(iID)owl:sourceIndividual T(a)
_:x rdf:predicate T(dp)owl:assertionProperty T(DPE)
_: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(Individual(iID)) T(iID) owl11:declaredAs owl11:Individual 2.1 Annotated Axioms Editor's Note: See Issue-12 (multi-triple annotations) and Issue-67 (reification). Axioms with annotations are reified. If s p o is the RDF serializationowl:targetValue T(lt)
EntityAnnotation( Class( C )
    annotation1
    ...
    annotationm
)
TANN(annotation1,T(C))
...
TANN(annotationm,T(C))
EntityAnnotation( Datatype( DT )
    annotation1
    ...
    annotationm
)
TANN(annotation1,T(DT))
...
TANN(annotationm,T(DT))
EntityAnnotation( ObjectProperty( OP )
    annotation1
    ...
    annotationm
)
TANN(annotation1,T(OP))
...
TANN(annotationm,T(OP))
EntityAnnotation( DataProperty( DP )
    annotation1
    ...
    annotationm
)
TANN(annotation1,T(DP))
...
TANN(annotationm,T(DP))
EntityAnnotation( AnnotationProperty( AP )
    annotation1
    ...
    annotationm
)
TANN(annotation1,T(AP))
...
TANN(annotationm,T(AP))
EntityAnnotation( NamedIndividual( *:a )
    annotation1
    ...
    annotationm
)
TANN(annotation1,T(*:a))
...
TANN(annotationm,T(*:a))
AnonymousIndividualAnnotation( _:a
    annotation1
    ...
    annotationm
)
TANN(annotation1,T(_:a))
...
TANN(annotationm,T(_:a))

2.2 Translation of Annotations

The corresponding axiom withoutoperator TANN, which translates annotations givenand attaches them to an URI reference or a blank node, is defined in Table 22. Note that Label, Comment, and the axiom containsDeprecated are syntactic abbreviations, so they are not listed in Table 2.

Table 2. Translation of Annotations
Annotation(apID i ct iAnnotation ann Triples Generated in an Invocation of TANN(ann,y)
Annotation( AP elt ) ,y T(AP) T(elt)
Annotation(
    annotation1
i n, then, instead of being serialized as s p o ,    ...
    annotationn
    AP elt
)
_:x rdf:type owl:Annotation
_:x owl:subject y
_:x owl:predicate T(AP)
_:x owl:object T(etl)
TANN(annotation1,_:x)
...
TANN(annotationn,_:x)

Consider the following entity annotation, which associates a:Peter with a simple label.

EntityAnnotation( NamedIndividual(a:Peter)
    Label( "Peter Griffin" )
)

This axiom is serialized as follows:translated into the following triple:

a:Peter rdfs:label "Peter Griffin"^^xsd:string

Consider the following axioms, which associates a:Peter with an annotation containing a nested annotation.

EntityAnnotation( NamedIndividual(a:Peter)
    Annotation(
       Annotation( a:author a:Seth_MacFarlane )
       rdfs:label "Peter Griffin"
    )
)

This axiom is translated into the following triples:

_:x rdf:type owl11:Axiomowl:Annotation
_:x T(apID i ) T(ct i ) 1 i nowl:subject a:Peter
_:x rdf:subject sowl:predicate rdfs:label
_:x rdf:predicate powl:object "Peter Griffin"^^xsd:string
_:x rdf:object o Negative object and data property assertions are already reified so only the following triples are addeda:auhtor a:Seth_MacFarlane

2.3 Translation of Axioms with Annotations

If an assertionaxiom ax contains an annotation: _:x T(apID i ) T(ct i )embedded annotations annotation1 i n... annotationm, its serialization into RDF depends on the type of the axiom. In the following discussion, let ax' be the axiom that is obtained from ax by removing all annotations. Note that the Label and Comment annotations are just abbreviations.abbreviations, so they are serialized into RDF triplesby expanding the abbreviation and then applying the transformation from Table 2. 3 Translation from RDF Graphsserialization presented here.

2.3.1 Axioms that Generate a Single Triple or that Have a Main Triple

Editor's Note: OWL WG Issue 144 is related to Functional-Style Syntaxthis section specifies how to translate a setpart of RDF triples Gthe mapping.

If ax' is translated into an OWL 2 ontology in functional-style syntaxa single RDF triple s p o, if possible.then the function Type(x) assigns a setaxiom ax generates the following triples instead of types to each resource node x in G (intriple s p o:

_:x rdf:type owl:Axiom
_:x owl:subject s
_:x owl:predicate p
_:x owl:object o
TANN(annotation1,_:x)
...
TANN(annotationm,_:x)

This and all other definitions, the graph G is implicitly understood and is not specified explicitly) andis defined asthe smallest set satisfyingcase for the conditions from Table 3. Table 3. Types of Nodes in a Graph If G containsfollowing axioms: SubClassOf, DisjointClasses with two classes, SubPropertyOf without a triple of this form... ...then Type(x) must contain this URI. xproperty chain as the subproperty expression, PropertyDomain, PropertyRange, InverseProperties, FunctionalProperty, InverseFunctionalProperty, ReflexiveProperty, IrreflexiveProperty, SymmetricProperty, AsymmetricProperty, TransitiveProperty, DisjointProperties with two properties, ClassAssertion, PropertyAssertion, Declaration, and DifferentIndividuals with two individuals.

Consider the following subclass axiom:

SubClassOf( Comment( "Children are people." ) a:Child a:Person )

Without the annotation, the axiom would be translated into the following triple:

a:Child rdfs:subClassOf a:Person

Thus, the annotated axiom is transformed into the following triples:

_:x rdf:type owl:Axiom
_:x owl:subject a:Child
_:x owl:predicate rdfs:subClassOf
_:x owl:object a:Person
_:x rdfs:comment "Children are people."

Axioms DisjointUnion, SubPropertyOf with a subproperty chain, and HasKey are, without annotations, translated into several, and not a single triple. If such such axioms are annotated, then the main triple is subjected to the transformation described above. The other triples called side triples are output without any change.

Consider the following subproperty axiom:

SubPropertyOf( Comment( "An aunt is a mother's sister." ) PropertyChain( a:hasMother a:hasSister ) a:hasAunt ) )

Without the annotation, the axiom would be translated into the following triples:

_:y rdfs:subPropertyOf a:hasAunt
_:y owl:propertyChain _:z1
_:z1 rdf:first a:hasMother
_:z1 rdf:rest _:z2
_:z2 rdf:first a:hasSister
_:z2 rdf:rest rdf:nil

In order to capture the annotation on the axiom, the first triple plays the role of the main triple for the axiom, so it is represented using a fresh blank node _:x in order to be able to attach the annotation to it.

_:x rdf:type owl:Axiom
_:x owl:subject _:y
_:x owl:predicate rdfs:subPropertyOf
_:x owl:object a:hasAunt
_:x rdfs:comment "An aunt is a mother's sister."

_:y owl:propertyChain _:z1
_:z1 rdf:first a:hasMother
_:z1 rdf:rest _:z2
_:z2 rdf:first a:hasSister
_:z2 rdf:rest rdf:nil

Consider the following key axiom:

HasKey( Comment( "SSN uniquely determines a person." ) a:Person a:hasSSN )

Without the annotation, the axiom would be translated into the following triples:

a:Person owl:hasKey _:y
_:y rdf:first a:hasSSN
_:y rdf:rest rdf:nil

In order to capture the annotation on the axiom, the first triple plays the role of the main triple for the axiom, so it is represented using a fresh blank node _:x in order to be able to attach the annotation to it.

_:x rdf:type owl:Axiom
_:x owl:subject a:Person
_:x owl:predicate owl:hasKey
_:x owl:object _:y
_:x rdfs:comment "SSN uniquely determines a person."

_:y rdf:first a:hasSSN
_:y rdf:rest rdf:nil

2.3.2 Axioms that are Translated to Multiple Triples

Editor's Note: OWL WG Issue 144 is related to this part of the mapping.

If the axiom ax' is of type EquivalentClasses, EquivalentProperties, 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 triples obtained in the translation.

Consider the following individual equality axiom:

SameIndividual( Annotation( a:source a:Fox ) a:Meg a:Megan a:Megan_Griffin )

This axiom is first split into the following equalities between pairs of individuals, and the annotation is repeated on each axiom obtained in this process:

SameIndividual( Annotation( a:source a:Fox ) a:Meg a:Megan )
SameIndividual( Annotation( a:source a:Fox ) a:Megan a:Megan_Griffin )

Each of these axioms is now transformed into triples as explained in the previous section:

_:x1 rdf:type owl:Axiom
_:x1 owl:subject a:Meg
_:x1 owl:predicate owl:sameAs
_:x1 owl:object a:Megan
_:x1 a:source a:Fox

_:x2 rdf:type owl:Axiom
_:x2 owl:subject a:Megan
_:x2 owl:predicate owl:sameAs
_:x2 owl:object a:Megan_Griffin
_:x2 a:source a:Fox

2.3.3 Axioms Represented by Blank Nodes

If the axiom ax' is of type NegativePropertyAssertion, DisjointClasses with more than two classes, DisjointUnion with more than two properties, or DifferentIndividuals with 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 1, and then attaching the annotations of ax to _:x.

Consider the following negative property assertion:

NegativePropertyAssertion( Annotation( a:author a:Seth_MacFarlane ) a:brotherOf a:Chris a:Stewie )

Even without the annotation, this axiom would be represented using a blank node. The annotation can readily be attached to this node, so the axiom is transformed into the following triples:

_:x rdf:type owl:NegativePropertyAssertion
_:x owl:sourceIndividual a:Chris
_:x owl:assertionProperty a:brotherOf
_:x owl:targetIndividual a:Stewie
_:x a:author a:Seth_MacFarlane

3 Mapping from RDF Graphs to Functional-Style Syntax

This section specifies canonical RDF parsing a process that transforms a set of RDF triples G into an OWL 2 ontology O in functional-style syntax, if possible. This process is specified as an instance of canonical parsing, defined in Section 5.9.3 of the OWL 2 Specification [OWL 2 Specification]. It is important to understand that canonical RDF parsing merely defines the result of the transformation. An OWL 2 implementation MAY implement whatever algorithm it chooses; however, the result MUST be structurally equivalent to the result of canonical RDF parsing.

Canonical RDF parsing maintains the following functions that map a URI reference or a blank node x occurring in G into a fragment of the functional-style syntax. In particular,

Initially, these functions are undefined for all URIs and blank nodes occurring in G; this is written as CE(x) = ε, DR(x) = ε, OPE(x) = ε, DPE(x) = ε, and AP(x) = ε. The functions are updated as parsing progresses. If at any point in time the following conditions become invalidated, G MUST be rejected as syntactically incorrect.

If there is an attempt to redefine (i.e., change after the initial definition) the value of any of these functions for any x, then G MUST be rejected as syntactically incorrect.

The following sections contain rules in which triple patterns are matched to G. The following notation is used to denote parts of the patterns that are matched to literals with integer value:

Additional conditions on the pattern are enclosed in curly braces { }. Some patterns use optional parts, which are enclosed in square brackets '[ ]'. If a pattern contains a variable number of triples, the maximal possible subset of G MUST be matched.

The abbreviation T(SEQ y1 ... yn) denotes the pattern corresponding to RDF lists, as shown in Table 3. This is the same mapping for lists as used in Table 1, but here it is used to recognize lists instead of mapping them.

Table 3. Patterns Corresponding to RDF Lists
Sequence S Triples Corresponding to T(S) Main Node of T(S)
SEQ rdf:nil
SEQ y1 ... yn _:x rdf:first y1
_:x rdf:rest T(SEQ y2 ... yn)
_:x

3.1 Parsing Ontology Header and Declarations

First, the ontology header is extracted from G. In particular, if G does not contain a triple whose predicate is rdf:type and object is owl:Ontology, then the ontology header is Ontology( ... ). Otherwise, patterns from Table 4 are matched to G; if no such pattern can be matched in G, or if the pattern can be matched to G in more than one way, the graph G MUST be rejected as syntactically incorrect. Each time a triple pattern is matched, the matched triples are removed from G.

Table 4. Parsing the Ontology Header
If G contains this pattern... ...then the ontology header has this form.
*:x rdf:type owl:Ontology
[ *:x owl:versionInfo *:y ]
*:x owl:imports z1
...
*:x owl:imports zk
{ The following triple pattern cannot be matched in G:
    u w *:x
    u rdf:type owl:Ontology
    w rdf:type owl:OntologyProperty
}
Ontology( *:x [ *:y ]
    Import( z1 )
    ...
    Import( zk )
    ...
)
_:x rdf:type owl:Ontology
_:x owl:imports y1
...
_:x owl:imports yk
{ The following triple pattern cannot be matched in G:
    u w _:x
    u rdf:type owl:Ontology
    w rdf:type owl:OntologyProperty
}
Ontology(
    Import( y1 )
    ...
    Import( yk )
    ...
)

Next, for backwards compatibility with OWL DL, certain redundant triples are removed from G. In particular, if the triple pattern from the left-hand side of Table 5 is matched in G, then the triples on the right-hand side of Table 5 are removed from G.

Editor's Note: OWL WG Issue 137 is related to this part of the reverse mapping.
Table 5. Triples to be Removed for Backwards Compatibility with OWL DL
If G contains this pattern... ...then these triples are removed from G.
x rdf:type owl:Ontology x rdf:type owl:Ontology
x rdf:type owl:Class
owl:Classx rdf:type rdfs:Class
x rdf:type rdfs:Class
x rdf:type rdfs:Datatype
x rdf:type rdfs:Class
x rdf:type rdfs:Class
x rdf:type owl:DataRange
x rdf:type rdfs:Class
x rdf:type rdfs:Class
x rdf:type owl:Restriction
x rdf:type rdfs:Class
x rdf:type rdfs:Class
x rdf:type owl:Restriction
x rdf:type owl:Class
x rdf:type owl11:ObjectRestrictionowl:Class
x rdf:type owl11:DataRestriction owl:Class xowl:ObjectProperty
x rdf:type rdf:Property
x rdf:type rdf:Property
x rdf:type owl:FunctionalProperty
x rdf:type rdf:Property
x rdf:type rdf:Property
x rdf:type owl:InverseFunctionalProperty
x rdf:type rdf:Property
x rdf:type rdf:Property
x rdf:type owl:TransitiveProperty
x rdf:type rdf:Property
x rdf:type rdf:Property
x rdf:type owl:DatatypeProperty
x rdf:type rdf:Property
x rdf:type rdf:Property
x rdf:type owl:AnnotationProperty
x rdf:type rdf:Property
x rdf:type rdf:Property
x rdf:type owl:OntologyProperty
x rdf:type rdf:Property
x rdf:type rdf:Property
x rdf:type rdf:List
x rdf:first y
x rdf:rest z
x rdf:type rdf:List

Next, for backwards compatibility with OWL DL, G is modified such that declarations can be properly extracted in the next step. When a triple pattern from the first column of Table 6 is matched in G, the matching triples are replaced in G with the triples from the second column. This matching phase stops when matching a pattern and replacing it as specified does not change G. Note that G is a set and thus cannot contain duplicate triples, so this last condition prevents infinite matches.

Table 6. Additional Declaration Triples
If G contains this pattern... ...then the matched triples are replaced in G with these triples.
*:x rdf:type owl:OntologyProperty *:x rdf:type owl:DataRange owl:DataRange xowl:AnnotationProperty
*:x rdf:type rdfs:Datatype owl:DataRange xowl:InverseFunctionalProperty *:x rdf:type owl:ObjectProperty
owl:ObjectProperty x*:x rdf:type owl:InverseFunctionalProperty
*:x rdf:type owl:TransitiveProperty *:x rdf:type owl:ObjectProperty
x*:x rdf:type owl:TransitiveProperty
*:x rdf:type owl:SymmetricProperty owl:ObjectProperty x*:x rdf:type owl11:AsymmetricPropertyowl:ObjectProperty
x*:x rdf:type owl11:ReflexiveProperty owl:ObjectProperty xowl:SymmetricProperty

Finally, the set of declarations Decl(O) is extracted from G according to Table 7. The matched triples are not removed from G the triples from Table 7 can contain annotations so, in order to correctly parse the annotations, they will be matched again in the step described in Section 3.4.

Table 7. Parsing Declarations in G
If G contains this pattern... ...then this declaration is added to Decl(O).
*:x rdf:type owl11:IrreflexiveProperty owl:ObjectProperty xowl:Class Declaration( Class( *:x ) )
*:x rdf:type rdfs:Datatype Declaration( Datatype( *:x ) )
*:x rdf:type owl11:FunctionalObjectPropertyowl:ObjectProperty xDeclaration( ObjectProperty( *:x ) )
*:x rdf:type owl:DatatypeProperty owl:DatatypeProperty xDeclaration( DataProperty( *:x ) )
*:x rdf:type owl:AnnotationProperty Declaration( AnnotationProperty( *:x ) )
*:x rdf:type owl:NamedIndividual Declaration( NamedIndividual( *:x ) )
_:x rdf:type owl:Axiom
_:x owl:subject *:y
_:x owl:predicate rdf:type
_:x owl:object owl:Class
Declaration( Class( *:y ) )
_:x rdf:type owl:Axiom
_:x owl:subject *:y
_:x owl:predicate rdf:type
_:x owl:object rdfs:Datatype
Declaration( Datatype( *:y ) )
_:x rdf:type owl:Axiom
_:x owl:subject *:y
_:x owl:predicate rdf:type
_:x owl:object owl:ObjectProperty
Declaration( ObjectProperty( *:y ) )
_:x rdf:type owl:Axiom
_:x owl:subject *:y
_:x owl:predicate rdf:type
owl11:FunctionalDataProperty_:x owl:object owl:DatatypeProperty
xDeclaration( DataProperty( *:y ) )
_:x rdf:type owl:Axiom
_:x owl:subject *:y
_:x owl:predicate rdf:type
_:x owl:object owl:AnnotationProperty
owl:AnnotationProperty xDeclaration( AnnotationProperty( *:y ) )
_:x rdf:type owl:Axiom
_:x owl:subject *:y
_:x owl:predicate rdf:type
owl11:Individual owl11:Individual_:x owl:object owl:NamedIndividual
Declaration( NamedIndividual( *:y ) )

3.2 Parsing the Imported Ontologies

Next, for a resource node xeach ontology O' imported into O, the ontology header and declarations are determined. If the ontology O' is written in RDF then this is done as above. If the ontology O' is written in some other format then the ontology header and declarations are determined according to the rules appropriate to the ontology format.

3.3 Declaration Checking and Initialization

The set AllDecl(O) of all declarations is computed by taking the union of the set Decl(O), the sets Decl(O') for each ontology O' imported (directly or indirectly) into O, and the declarations for built-in entities from Table 10 of the OWL 2 Specification [OWL 2 Specification]. The declarations in AllDecl(O) are checked for typing constraints, as specified in Section 5.9.1 of the OWL 2 Specification [OWL 2 Specification]. If the constraints are not satisfied, the graph G MUST be rejected as syntactically incorrect.

Next, the functions OnlyOP(x)CE, DR, OPE, DPE, and OnlyDP(x)AP are definedinitialized as follows: OnlyOP(x) is true ifshown in Table 8.

Table 8. Initialization of CE, DR, OPE, DPE, and onlyAP
If owl:ObjectProperty Type(x) and owl:DatatypeProperty and owl:AnnotationProperty are not in Type(x) ; OnlyDP(x)AllDecl(O) contains this declaration... ...then perform this assignment.
Declaration( Class( *:x ) ) CE(*:x) := a class with the URI *:x
Declaration( Datatype( *:x ) ) DR(*:x) := a datatype with the URI *:x
Declaration( ObjectProperty( *:x ) ) OPE(*:x) := an object property with the URI *:x
Declaration( DataProperty( *:x ) ) DPE(*:x) := a data property with the URI *:x
Declaration( AnnotationProperty( *:x ) ) AP(*:x) := an annotation property with the URI *:x

The function OPEorDPE is truedefined as follows: OPEorDPE(x) = OPE(x) if and onlyOPE(x) ε; OPEorDPE(x) = DPE(x) if owl:DatatypeProperty Type(x) and owl:ObjectPropertyDPE(x) ε; and owl:AnnotationProperty are notOPEorDPE(x) = ε otherwise.

3.4 Parsing of Annotations

Editor's Note: OWL WG Issue 144 is related to this part of the reverse mapping.

The annotations in Type(x) ; OnlyAP(x)G are parsed next. To this end, canonical RDF parsing uses a function ANN that assigns a set of annotations ANN(x) to each URI reference or a blank node x. This function is true if and only if owl:AnnotationProperty Type(x) and owl:ObjectPropertyinitialized by setting ANN(x) = for each each URI reference or a blank node x. Next, triple patters from the headers of Tables 9 and owl:DatatypeProperty10 are notmatched in Type(x)G. For each matched pattern, ANN(x) is extended with all annotations from the following partial functionsright columns of the tables matching the respective conditions in the left columns. Each time one of these triple patterns is matched, the matched triples are definedremoved from G. This process is repeated until no further matches are possible.

Table 9. Parsing of Simple Annotations
For each resource nodetriple x : OP(x) assigns*:y z in G where AP(*:y) ε, for each satisfied condition... ...this annotation is added to xANN(x).
z is a URI reference and CE(z) is a class Annotation( *:y Class( CE(z) ) )
z is a URI reference and DR(z) is a datatype Annotation( *:y Datatype( DR(z) ) )
z is a URI reference and OPE(z) is an object property expression; DP(x) assigns to xAnnotation( *:y ObjectProperty( OPE(z) ) )
z is a URI reference and DPE(z) is a data property expression; DRANGE(x) assigns to xAnnotation( *:y DataProperty( DPE(z) ) )
z is a data range;URI reference 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 thisAP(z) is not possible, then G cannot be converted intoan OWL 2 ontology. If xannotation property Annotation( *:y AnnotationProperty( AP(z) ) )
z is nota blank node, then set OP(x) , DP(x) , DRANGE(x) ,URI reference and DESC(x)CE(z), DR(z), OPE(z),
DPE(z), and AP(z) are all equal to x .ε
Annotation( *:y NamedIndividual( z ) )
z is blank node Annotation( *:y z )
Table 10. Parsing of Annotations with Annotations
For each triple pattern from the first column of Table 4 occurringin G , set OP(x) to the object property expression fromof the second column. For eachform
_:w rdf:type owl:Annotation
_:w owl:subject x
_:w owl:predicate *:y
_:w owl:object z
such that AP(*:y) ε and
no triple pattern from the first column of Table 5 occurringin G , set DRANGE(x) to the data range from the second column.contain _:w in subject or object position,
for each tiple pattern from the first column of Table 6 occurring G , set DESC(x)satisfied condition...
...this annotation is added to the description from the second column. If thereANN(x).
z is more than one way of assigninga valueURI reference and CE(z) is a class Annotation( ANN(_:w) *:y Class( CE(z) ) )
z is a URI reference and DR(z) is a datatype Annotation( ANN(_:w) *:y Datatype( DR(z) ) )
z is a URI reference and OPE(z) is an object property Annotation( ANN(_:w) *:y ObjectProperty( OPE(z) ) )
z is a URI reference and DPE(z) is a data property Annotation( ANN(_:w) *:y DataProperty( DPE(z) ) )
z is a URI reference and AP(z) is an annotation property Annotation( ANN(_:w) *:y AnnotationProperty( AP(z) ) )
z is a URI reference and CE(z), DR(z), OPE(z),
DPE(z), and AP(z) are all equal to any oneε
Annotation( ANN(_:w) *:y NamedIndividual( z ) )
z is blank node Annotation( ANN(_:w) *:y z )

3.5 Parsing of Axioms

Let x be the node that is matched to *:x or _:x while parsing the ontology header of these functions, then G cannot be translated into an OWL 2 ontology. Also, ifO according to the valuepatterns from Table 4. Then, ANN(x) determines the set of oneontology annotations of theseO.

Next, the functions is not defined for some node occurringOPE, DR, and CE are extended as shown in Tables 11, 12, and 13, as well as in Tables 14 and 15. The functional-style syntax encoding, then G cannotpatterns in the latter two tables are not generated by the mapping from Section 2, but they can be translated into anpresent in RDF graphs that encode OWL 2 ontology. Table 4. Translation ofDL ontologies. Each time a pattern is matched, the matched triples are removed from G. Pattern matching is repeated until no triple pattern can be matched to G.

Table 11. Parsing Object Property Expressions
PatternIf G contains this pattern... ...then OPE(_:x) is set to this object property Expressionexpression.
_:x owl11:inverseObjectPropertyExpression y InverseObjectProperty( OP(y)owl:inverseOf *:y
{ OPE(_:x) = ε and OPE(*:y) ε }
InverseOf( OPE(*:y) )
Table 5. Translation12. Parsing of Triples toData Ranges
PatternIf G contains this pattern... ...then DR(_:x) is set to this data Rangerange.
_:x rdf:type owl:DataRangerdfs:Datatype
_:x owl:datatypeComplementOf y
{ DR(y) ε }
ComplementOf( DR(y) )
_:x rdf:type rdfs:Datatype
_:x owl:oneOf T(SEQ lt1 ... ltn)
OneOf( lt1 ... ltn )
_:x rdf:type rdfs:Datatype
_:x owl:onDatatype *:y
_:x owl:withRestrictions T(SEQ _:z1 ... _:zn)
_:z1 xsd:facet1 lt1
...
_:zn xsd:facetn ltn
{ DR(*:y) is a datatype }
DatatypeRestriction( DR(*:y)
    facet1 lt1
    ...
    facetn ltn
)
Table 13. Parsing of Class Expressions
If G contains this pattern... ...then CE(_:x) is set to this class expression.
_:x rdf:type owl:Class
_:x owl:complementOf y
DataComplementOf( DRANGE(y){ CE(y) ε }
ComplementOf( CE(y) )
_:x rdf:type owl:Class
_:x owl:unionOf T(SEQ y1 ... yn)
{ n 2 and CE(yi) ε for each 1 i n }
UnionOf( CE(y1) ... CE(yn) )
_:x rdf:type owl:Class
_:x owl:intersectionOf T(SEQ y1 ... yn)
{ n 2 and CE(yi) ε for each 1 i n }
IntersectionOf( CE(y1) ... CE(yn) )
_:x rdf:type owl:DataRangeowl:Class
_:x owl:oneOf T(SEQ ct*:y1 ... ct*:yn)
DataOneOf( ctOneOf( *:y1 ... ct*:yn )
_:x rdf:type owl:DataRangeowl:SelfRestriction
_:x owl11:onDataRangeowl:onProperty y
{ OPE(y) ε }
ExistsSelf( OPE(y) )
_:x owl11:withRestriction T(SEQrdf:type owl:Restriction
_:x 1 ...owl:onProperty y
_:x nowl:hasValue *:z
{ OPE(y) ε }
HasValue( OPE(y) *:z )
_:x i owl11: facet i ct i for 1 i n DatatypeRestriction( DRANGE(y) facet 1 ct 1 ... facetrdf:type owl:Restriction
_:x owl:onProperty y
_:x owl:someValuesFrom z
{ OPE(y) ε and CE(z) ε }
SomeValuesFrom( OPE(y) CE(z) )
_:x rdf:type owl:Restriction
_:x owl:onProperty y
_:x owl:allValuesFrom z
{ OPE(y) ε and CE(z) ε }
AllValuesFrom( OPE(y) CE(z) )
_:x rdf:type owl:Restriction
_:x owl:minQualifiedCardinality NN_INT(n)
_:x owl:onProperty y
_:x owl:onClass z
{ OPE(y) ε and CE(z) ε }
MinCardinality( n ctOPE(y) CE(z) )
_:x rdf:type owl:Restriction
_:x owl:maxQualifiedCardinality NN_INT(n)
_:x owl:onProperty y
_:x owl:onClass z
{ OPE(y) ε and CE(z) ε }
MaxCardinality( n OPE(y) CE(z) )
Table 6. Translation of Triples to Descriptions Pattern Description_:x rdf:type owl:Classowl:Restriction
_:x owl:unionOf T(SEQowl:qualifiedCardinality NN_INT(n)
_:x owl:onProperty y
1 ..._:x owl:onClass z
{ OPE(y) ε and CE(z) ε }
ExactCardinality( n OPE(y) CE(z) )
_:x rdf:type owl:Restriction
_:x owl:minCardinality NN_INT(n)
_:x owl:onProperty y
{ OPE(y) ε }
MinCardinality( n OPE(y) )
ObjectUnionOf( DESC(y 1_:x rdf:type owl:Restriction
_:x owl:maxCardinality NN_INT(n)
_:x owl:onProperty y
{ OPE(y) ε }
MaxCardinality( n OPE(y) )
... DESC(y_:x rdf:type owl:Restriction
_:x owl:cardinality NN_INT(n)
_:x owl:onProperty y
{ OPE(y) ε }
ExactCardinality( n OPE(y) )
_:x rdf:type owl:Restriction
_:x owl:onProperty y
_:x owl:hasValue lt
{ DPE(y) ε }
HasValue( DPE(y) lt )
_:x rdf:type owl:Classowl:Restriction
_:x owl:intersectionOfowl:onProperty y
_:x owl:someValuesFrom z
{ DPE(y) ε and DR(z) ε }
SomeValuesFrom( DPE(y) DR(z) )
_:x rdf:type owl:Restriction
_:x owl:onProperties T(SEQ y1 ... yn)
ObjectIntersectionOf( DESC(y_:x owl:someValuesFrom z
{ DPE(yi) ε for each 1 i n and DR(z) ε }
SomeValuesFrom( DPE(y1) ... DESC(yDPE(yn) DR(z) )
_:x rdf:type owl:Classowl:Restriction
_:x owl:complementOfowl:onProperty y
ObjectComplementOf( DESC(y)_:x owl:allValuesFrom z
{ DPE(y) ε and DR(z) ε }
AllValuesFrom( DPE(y) DR(z) )
_:x rdf:type owl:Classowl:Restriction
_:x owl:oneOf T(SEQ !yowl:onProperties T(SEQ y1 ... yn)
_:x owl:allValuesFrom z
{ DPE(yi) ε for each 1 ... !y i n ) ObjectOneOf( yand DR(z) ε }
AllValuesFrom( DPE(y1) ... yDPE(yn) DR(z) )
_:x rdf:type owl11:SelfRestrictionowl:Restriction
_:x owl:minQualifiedCardinality NN_INT(n)
_:x owl:onProperty y
ObjectExistsSelf( OP(y)_:x owl:onDataRange z
{ DPE(y) ε and DR(z) ε }
MinCardinality( n DPE(y) DR(z) )
_:x rdf:type owl11:ObjectRestrictionowl:Restriction
_:x owl:maxQualifiedCardinality NN_INT(n)
_:x owl:onProperty y
_:x owl:hasValue !z ObjectHasValue( OP(y)owl:onDataRange z
{ DPE(y) ε and DR(z) ε }
MaxCardinality( n DPE(y) DR(z) )
_:x rdf:type owl:Restriction
_:x owl:qualifiedCardinality NN_INT(n)
_:x owl:onProperty y
_:x owl:hasValue !zowl:onDataRange z
{ OnlyOP(y) = trueDPE(y) ε and DR(z) ε }
ObjectHasValue( OP(y) zExactCardinality( n DPE(y) DR(z) )
_:x rdf:type owl11:ObjectRestrictionowl:Restriction
_:x owl:minCardinality NN_INT(n)
_:x owl:onProperty y
_:x owl:someValuesFrom z ObjectSomeValuesFrom( OP(y) DESC(z){ DPE(y) ε }
MinCardinality( n DPE(y) )
_:x rdf:type owl:Restriction
_:x owl:maxCardinality NN_INT(n)
_:x owl:onProperty y
_:x owl:someValuesFrom z{ OnlyOP(y) = trueDPE(y) ε }
ObjectSomeValuesFrom( OP(y) DESC(z)MaxCardinality( n DPE(y) )
_:x rdf:type owl11:ObjectRestrictionowl:Restriction
_:x owl:cardinality NN_INT(n)
_:x owl:onProperty y
{ DPE(y) ε }
ExactCardinality( n DPE(y) )
Table 14. Parsing of Data Ranges for Compatibility with OWL DL
If G contains this pattern... ...then DR(_:x) is set to this object property expression.
_:x owl:allValuesFrom z ObjectAllValuesFrom( OP(y) DESC(z)rdf:type owl:DataRange
_:x owl:oneOf T(SEQ lt1 ... ltn)
OneOf( lt1 ... ltn )
_:x rdf:type owl:Restrictionowl:DataRange
_:x owl:onProperty yowl:oneOf T(SEQ)
ComplementOf( rdfs:Literal )
Table 15. Parsing of Class Expressions for Compatibility with OWL DL
If G contains this pattern... ...then CE(_:x) is set to this class expression.
_:x owl:allValuesFrom zrdf:type owl:Class
_:x owl:unionOf T(SEQ)
owl:Nothing
_:x rdf:type owl:Class
_:x owl:unionOf T(SEQ y)
{ OnlyOP(y) = trueCE(y) ε }
ObjectAllValuesFrom( OP(y) DESC(z) )CE(y)
_:x rdf:type owl11:ObjectRestrictionowl:Class
_:x owl:minCardinality "n"^^xsd:nonNegativeIntegerowl:intersectionOf T(SEQ)
owl:Thing
_:x owl:onProperty y [rdf:type owl:Class
_:x owl11:onClass z ] ObjectMinCardinality( n OP(y) [ DESC(z) ]owl:intersectionOf T(SEQ y)
{ CE(y) ε }
CE(y)
_:x rdf:type owl:Class
_:x owl:oneOf T(SEQ)
owl:Nothing

The ontology O is then populated with axioms. The patterns from Table 16 are matched in G, the resulting axioms are added to O. Each time a pattern is matched, the matched triples are removed from G. The patterns for the EntityAnnotation and AnonymousIndividualAnnotation axioms can be matched to the empty set of triples so, in order to prevent infinite matches of the same pattern, these patterns are are matched to G at most once for each different URI reference *:x or blank node _:x.

Table 16. Parsing of Axioms
If G contains this pattern... ...then the following axiom is added to O.
*:x rdf:type owl:Class Declaration( Class( *:x ) )
*:x rdf:type rdfs:Datatype Declaration( Datatype( *:x ) )
*:x rdf:type owl:ObjectProperty Declaration( ObjectProperty( *:x ) )
*:x rdf:type owl:DatatypeProperty Declaration( DataProperty( *:x ) )
_:x*:x rdf:type owl:Restriction _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty yowl:AnnotationProperty Declaration( AnnotationProperty( *:x ) )
*:x rdf:type owl:NamedIndividual Declaration( NamedIndividual( *:x ) )
[ _:x owl11:onClass z*:x rdf:type owl:DeprecatedClass ]
{ OnlyOP(y) = trueCE(*:x) ε, and
  ANN(*:x) or the optional triple is matched }
ObjectMinCardinality( n OP(y)EntityAnnotation( Class( *:x )
    ANN(*:x)
    [ DESC(z)Deprecated ]
)
_:x rdf:type owl11:ObjectRestriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y[ _:x owl11:onClass z*:x rdf:type owl:DeprecatedClass ]
ObjectMaxCardinality( n OP(y){ DR(*:x) ε, and
  ANN(*:x) or the optional triple is matched }
EntityAnnotation( Datatype( *:x )
    ANN(*:x)
    [ DESC(z)Deprecated ]
)
_:x rdf:type owl:Restriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y[ _:x owl11:onClass z*:x rdf:type owl:DeprecatedProperty ]
{ OnlyOP(y) = trueOPE(*:x) ε, and
  ANN(*:x) or the optional triple is matched }
ObjectMaxCardinality( n OP(y)EntityAnnotation( ObjectProperty( *:x )
    ANN(*:x)
    [ DESC(z)Deprecated ]
)
_:x rdf:type owl11:ObjectRestriction _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y[ _:x owl11:onClass z*:x rdf:type owl:DeprecatedProperty ]
ObjectExactCardinality( n OP(y){ DPE(*:x) ε, and
  ANN(*:x) or the optional triple is matched }
EntityAnnotation( DataProperty( *:x )
    ANN(*:x)
    [ DESC(z)Deprecated ]
)
_:x rdf:type owl:Restriction _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y[ _:x owl11:onClass z*:x rdf:type owl:DeprecatedProperty ]
{ OnlyOP(y) = trueAP(*:x) ε, and
  ANN(*:x) or the optional triple is matched }
ObjectExactCardinality( n OP(y)EntityAnnotation( AnnotationProperty( *:x )
    ANN(*:x)
    [ DESC(z)Deprecated ]
)
_: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) = trueCE(*:x) ε, DR(*:x) ε, OPE(*:x) ε,
  DPE(*:x) ε, AP(*:x) ε, and
  ANN(*:x) }
DataHasValue( DP(y) ctEntityAnnotation( Individual( *:x )
_:x rdf:type owl11:DataRestriction _:x owl:onProperty y _:x owl:someValuesFrom z DataSomeValuesFrom( DP(y) DRANGE(z)    ANN(*:x)
)
_:x rdf:type owl:Restriction _:x owl:onProperty y _:x owl:someValuesFrom z{ OnlyDP(y) = trueANN(_:x) } DataSomeValuesFrom( DP(y) DRANGE(z) ) _:x rdf:type owl11:DataRestriction _:x owl:onProperty T(SEQ y 1 ... y n )AnonymousIndividualAnnotation( _:x
owl:someValuesFrom z DataSomeValuesFrom( DP(y 1 ) ... DP(y n    ANN(_:x)
)
DRANGE(z) ) _:x rdf:type owl:Restriction _:x owl:onProperty T(SEQ y 1 ...x rdfs:subClassOf y
n ) _:x owl:someValuesFrom z{ OnlyDP(y) = trueCE(x) ε and CE(y) ε }
DataSomeValuesFrom( DP(y 1 ) ... DP(y n ) MDRANGE(z) ) _:x rdf:type owl11:DataRestriction _:x owl:onProperty y _:x owl:allValuesFrom z DataAllValuesFrom( DP(y) DRANGE(z)SubClassOf( CE(x) CE(y) )
_:x rdf:type owl:Restriction _:x owl:onPropertyx owl:equivalentClass y
_:x owl:allValuesFrom z{ OnlyDP(y) = trueCE(x) ε and CE(y) ε }
DataAllValuesFrom( DP(y) DRANGE(z) ) _:x rdf:type owl11:DataRestriction _:x owl:onProperty T(SEQ y 1 ... y n ) _:x owl:allValuesFrom z DataAllValuesFrom( DP(y 1 ) ... DP(y nEquivalentClasses( CE(x) CE(y) )
DRANGE(z)x owl:disjointWith y
{ CE(x) ε and CE(y) ε }
DisjointClasses( CE(x) CE(y) )
_:x rdf:type owl:Restrictionowl:AllDisjointClasses
_:x owl:onPropertyowl:members T(SEQ y1 ... yn)
_:x owl:allValuesFrom z{ OnlyDP(y) = trueCE(yi) ε for each 1 i n }
DataAllValuesFrom( DP(yDisjointClasses( CE(y1) ... DP(yCE(yn) DRANGE(z))
_:x rdf:type owl11:DataRestriction _:x owl:minCardinality "n"^^xsd:nonNegativeInteger _:x owl:onPropertyx owl:disjointUnionOf T(SEQ y1 ... 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(CE(x) ε and CE(yi) ε for each 1 i n DP(y) [ DRANGE(z) ]}
DisjointUnion( CE(x) CE(y1) _:x rdf:type owl11:DataRestriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty y [ _:x owl11:onDataRange z ] DataMaxCardinality(... CE(yn DP(y) [ DRANGE(z) ]) _:x rdf:type owl:Restriction _:x owl:maxCardinality "n"^^xsd:nonNegativeInteger _:x owl:onProperty)
x rdfs:subPropertyOf y
[ _:x owl11:onDataRange z ]{ OnlyDP(y) = trueOPE(x) ε and OPE(y) ε }
DataMaxCardinality( n DP(y) [ DRANGE(z) ]SubPropertyOf( OPE(x) OPE(y) )
_:x rdf:type owl11:DataRestriction _:x owl:cardinality "n"^^xsd:nonNegativeInteger _:x owl:onPropertyrdfs:subPropertyOf y
[_:x owl11:onDataRange z ] DataExactCardinality(owl:propertyChain T(SEQ x1 ... xn 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) ]OPE(xi) 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. Table 7. Translation of Triples to Axioms Pattern Axiom  !x !y i ct i for1 ≤ i ≤ n { rdfs:Datatype Type(x)and OnlyAP(y i ) = true for 1 i OPE(y) ε }
EntityAnnotation( Datatype(x) Annotation( y 1 ctSubPropertyOf(
    PropertyChain( OPE(x1) ... Annotation( y n ctOPE(xn) )
 !x !y i ct i for 1 i n    OPE(y)
)
x owl:equivalentProperty y
{ owl:Class Type(x)OPE(x) ε and OnlyAP(y iOPE(y) ε }
EquivalentProperties( OPE(x) OPE(y) )
= true for 1 i x owl:propertyDisjointWith y
{ OPE(x) ε and OPE(y) ε }
EntityAnnotation( OWLClass(x) Annotation(DisjointProperties( OPE(x) OPE(y) )
_:x rdf:type owl:AllDisjointProperties
_:x owl:members T(SEQ y1 ct 1 )... Annotation(yn ct n)
)  !x !y i ct i for 1 i n { owl:ObjectProperty Type(x) and OnlyAP(y{ OPE(yi) = true ε for each 1 ≤ i ≤ n }
EntityAnnotation( ObjectProperty(x) Annotation( y 1 ctDisjointProperties( OPE(y1) ... Annotation( y n ctOPE(yn) )
 !x !y i ct i for 1 i nx rdfs:domain y
{ owl:DatatypeProperty Type(x)OPE(x) ε and OnlyAP(y iCE(y) ε }
PropertyDomain( OPE(x) CE(y) )
= true for 1 i x rdfs:range y
{ OPE(x) ε and CE(y) ε }
EntityAnnotation( DataProperty(x) Annotation(PropertyRange( OPE(x) CE(y) )
*:x owl:inverseOf y
1 ct 1{ OPE(*:x) ε and OPE(y) ε }
InverseProperties( OPE(*:x) OPE(y) )
... Annotation(x rdf:type owl:FunctionalProperty
{ OPE(x) ε }
FunctionalProperty( OPE(x) )
x rdf:type owl:InverseFunctionalProperty
{ OPE(x) ε }
InverseFunctionalProperty( OPE(x) )
x rdf:type owl:ReflexiveProperty
{ OPE(x) ε }
ReflexiveProperty( OPE(x) )
x rdf:type owl:IrreflexiveProperty
{ OPE(x) ε }
IrreflexiveProperty( OPE(x) )
x rdf:type owl:SymmetricProperty
{ OPE(x) ε }
SymmetricProperty( OPE(x) )
x rdf:type owl:AsymmetricProperty
{ OPE(x) ε }
AsymmetricProperty( OPE(x) )
x rdf:type owl:TransitiveProperty
{ OPE(x) ε }
TransitiveProperty( OPE(x) )
x rdfs:subPropertyOf y
n ct n{ DPE(x) ε and DPE(y) ε }
SubPropertyOf( DPE(x) DPE(y) )
x owl:equivalentProperty y
{ DPE(x) ε and DPE(y) ε }
EquivalentProperties( DPE(x) DPE(y) )
x owl:propertyDisjointWith y
{ DPE(x) ε and DPE(y) ε }
DisjointProperties( DPE(x) DPE(y) )
 !x !y i ct i for_:x rdf:type owl:AllDisjointProperties
_:x owl:members T(SEQ y1 i ... yn)
{ owl11:Individual Type(x) and OnlyAP(yDPE(yi) = true ε for each 1 ≤ i ≤ n }
EntityAnnotation( Individual(x) Annotation( y 1 ctDisjointProperties( DPE(y1) ... Annotation( y n ctDPE(yn) )
x rdfs:subClassOfrdfs:domain y
SubClassOf( DESC(x) DESC(y){ DPE(x) ε and CE(y) ε }
PropertyDomain( DPE(x) CE(y) )
x owl:equivalentClassrdfs:range y
EquivalentClasses( DESC(x) DESC(y){ DPE(x) ε and DR(y) ε }
PropertyRange( DPE(x) DR(y) )
x owl:disjointWith y DisjointClasses( DESC(x) DESC(y)rdf:type owl:FunctionalProperty
{ DPE(x) ε }
FunctionalProperty( DPE(x) )
x owl11:disjointUnionOfowl:hasKey T(SEQ y1 ... yn)
DisjointUnion( DESC(x) DESC(y{ CE(x) ε and OPEorDPE(yi) ε for each 1 i n }
HasKey( CE(x) OPEorDPE(y1) ... DESC(yOPEorDPE(yn) )
x owl11:subObjectPropertyOfowl:sameAs y SameIndividual( x y SubObjectPropertyOf( OP(x) OP(y))
x rdfs:subPropertyOfowl:differentFrom y DifferentIndividuals( x y { OnlyOP(x) = true and OnlyOP(y) = true } SubObjectPropertyOf( OP(x) OP(y))
_:x owl11:subObjectPropertyOf yrdf:type owl:AllDifferent
_:x owl11:propertyChainowl:members T(SEQ x1 ... xn)
SubObjectPropertyOf( subObjectPropertyChain( OP(xDifferentIndividuals( x1 )... OP(xxn )
) OP(y) )_:x rdfs:subPropertyOf yrdf:type owl:AllDifferent
_:x owl11:propertyChainowl:members T(SEQ x1 ... xn)
SubObjectPropertyOf( subObjectPropertyChain( OP(xDifferentIndividuals( x1 )... OP(x n ) ) 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)n )
x rdfs:domainrdf:type y
{ OnlyOP(x) = trueCE(y) ε }
ObjectPropertyDomain( OP(x) DESC(y) )ClassAssertion( x owl11:objectPropertyRange y ObjectPropertyRange( OP(x) DESC(y)CE(y) )
x rdfs:range y*:y z
{ OnlyOP(x) = trueOPE(*:y) ε }
ObjectPropertyRange( OP(x) DESC(y) ) x owl:inverseOf y InverseObjectProperties( OP(x) OP(y) )PropertyAssertion( OPE(*:y) x rdf:type owl:TransitiveProperty TransitiveObjectProperty( OP(x)z )
x_:x rdf:type owl11:FunctionalObjectProperty FunctionalObjectProperty( OP(x)owl:NegativePropertyAssertion
_:x owl:sourceIndividual w
_:x owl:assertionProperty *:y
_:x owl:targetIndividual z
{ OPE(*:y) ε }
NegativePropertyAssertion( OPE(*:y) w z )
x rdf:type owl:FunctionalProperty*:y lt
{ OnlyOP(x) = trueDPE(*:y) ε }
FunctionalObjectProperty( OP(x) )PropertyAssertion( DPE(*:y) x rdf:type owl:InverseFunctionalProperty InverseFunctionalObjectProperty( OP(x)lt )
x_:x rdf:type owl11:ReflexiveProperty ReflexiveObjectProperty( OP(x)owl:NegativePropertyAssertion
_:x owl:sourceIndividual w
_:x owl:assertionProperty *:y
_:x owl:targetValue lt
{ OPE(*:y) ε }
NegativePropertyAssertion( DPE(*:y) w lt )

xFor clarity, Table 16 handles only axioms without annotations. In case of the patterns for owl:AllDisjointClasses, owl:AllDisjointProperties, owl:AllDifferent, and owl:NegativePropertyAssertion, axiom annotations are defined by ANN(_:x). For other axioms, axiom annotations are obtained by additionally matching patterns from Table 17 in G during axiom matching. Each time a triple pattern is matched, the matched triples are removed from G.

Table 17. Parsing of Annotated Axioms
If G contains this pattern... ...then the following axiom is added to O.
_:x rdf:type owl11:IrreflexiveProperty IrreflexiveObjectProperty( OP(x) ) xowl:Axiom
_:x owl:subject s
_:x owl:predicate *:p
_:x owl:object o
{ s *:p o is the main triple for an axiom and
  G contains possible necessary side triples for the axiom }
The result is the axiom corresponding to s *:p o
(and possible side triples) that additionally
contains the annotations ANN(_:x).

Finally, the patterns from Table 18 are matched in G, the resulting axioms are added to O. These patterns are not generated by the mapping from Section 2, but they can be present in RDF graphs that encode OWL DL ontologies. (Note that the patterns from the table do not contain triples of the form *:x rdf:type owl:SymmetricProperty SymmetricObjectProperty( OP(x)owl:Class because such triples are removed while parsing the entity declarations, as specified in Section 3.1.) Each time a triple pattern is matched, the matched triples are removed from G.

Table 18. Parsing of Axioms for Compatibility with OWL DL
If G contains this pattern... ...then the following axiom is added to O.
*:x owl:complementOf y
{ CE(*:x) ε and CE(y) ε }
EquivalentClasses( CE(*:x) ComplementOf( CE(y) ) x rdf:type owl11:AsymmetricProperty AsymmetricObjectProperty( OP(x))
x owl11:subDataPropertyOf y SubDataPropertyOf( DP(x) DP(y)*:x owl:unionOf T(SEQ)
{ CE(*:x) ε }
EquivalentClasses( CE(*:x) owl:Nothing )
x rdfs:subPropertyOf*:x owl:unionOf T(SEQ y1)
{ OnlyDP(x) = trueCE(*:x) ε and OnlyDP(y) = trueCE(y1) ε }
SubDataPropertyOf( DP(x) DP(y)EquivalentClasses( CE(*:x) CE(y) )
x owl11:equivalentDataProperty*:x owl:unionOf T(SEQ y EquivalentDataProperties(dp1 ... dpyn)
x owl:equivalentProperty y{ OnlyDP(x) = truen 2, CE(*:x) ε, and OnlyDP(y) = trueCE(yi) ε for each 1 i n }
EquivalentDataProperties(dpEquivalentClasses( CE(*:x) UnionOf( CE(y1) ... dpCE(yn) x owl11:disjointDataProperties y DisjointDataProperties( DP(x) DP(y)) x owl11:dataPropertyDomain y DataPropertyDomain( DP(x) DESC(y))
x rdfs:domain y*:x owl:intersectionOf T(SEQ)
{ OnlyDP(x) = trueCE(*:x) ε }
DataPropertyDomain( DP(x) DESC(y)EquivalentClasses( CE(*:x) owl:Thing )
x owl11:dataPropertyRange*:x owl:intersectionOf T(SEQ y DataPropertyRange( DP(x) DRANGE(y)1)
x rdfs:range y{ OnlyDP(x) = true } DataPropertyRange( DP(x) DRANGE(y) ) x rdf:type owl11:FunctionalDataProperty FunctionalDataProperty( DP(x)CE(*:x) ε and CE(y1) x rdf:type owl:FunctionalProperty { OnlyDP(x) = true ε }
FunctionalDataProperty( DP(x) ) !x owl:sameAs !y SameIndividual( x y ) !x owl:differentFrom !y DifferentIndividuals( x yEquivalentClasses( CE(*:x) CE(y) )
 !x rdf:type*:x owl:intersectionOf T(SEQ y {1 ... y is not a part of RDF(S) or OWL 2 vocabulary } ClassAssertion( x DESC(y)n)
 !x !y !z{ none of x, y,n 2, CE(*:x) ε, and z is a part of RDF(S) or OWL 2 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 zCE(yi)  !x !y ct { neither x not y is a part of RDF(S) or OWL 2 vocabulary } { owl:AnnotationProperty is not in Type(y) ε for each 1 i n }
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)EquivalentClasses( CE(*:x) IntersectionOf( CE(y1)  !x owl11:declaredAs owl:Class Declaration( OWLClass(x)... CE(yn)  !x owl11:declaredAs owl:ObjectProperty Declaration( ObjectProperty(x))  !x owl11:declaredAs owl:DatatypeProperty Declaration( DataProperty(x))
 !x owl11:declaredAs owl11:Individual Declaration( Individual(x)*:x owl:oneOf T(SEQ)
{ CE(*:x) ε }
EquivalentClasses( CE(*:x) owl:Nothing )
_:x rdf:type owl11:Axiom _:x !y i ct i*:x owl:oneOf T(SEQ *:y1 i ... *:yn _: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( y 1 ct 1)
{ CE(*:x) ε }
EquivalentClasses( CE(*:x) OneOf( *:y1 ... Annotation( y n ct*:yn ) )

At the end of this process, if G contains some triple thatis not matched by any triple pattern (including the patterns used to define Type(x) ),empty then G cannotMUST be translated into an OWL 2 ontology.rejected as syntactically incorrect.

4 References

[OWL 2 Specification]
OWL 2 Web Ontology Language:Structural Specification and Functional-Style Syntax Boris Motik, Peter F. Patel-Schneider, Ian Horrocks. W3C Editor's Draft, 11 April22 September 2008, http://www.w3.org/2007/OWL/draft/ED-owl2-syntax-20080411/http://www.w3.org/2007/OWL/draft/ED-owl2-syntax-20080922/. Latest version available at http://www.w3.org/2007/OWL/draft/owl2-syntax/.
[OWL 2 Semantics]
OWL 2 Web Ontology Language:Model-Theoretic Semantics Bernardo Cuenca Grau, Boris Motik. W3C Editor's Draft, 11 April22 September 2008, http://www.w3.org/2007/OWL/draft/ED-owl2-semantics-20080411/http://www.w3.org/2007/OWL/draft/ED-owl2-semantics-20080922/. Latest version available at http://www.w3.org/2007/OWL/draft/owl2-semantics/.
[RDF Semantics]
RDF Semantics. Patrick Hayes, Editor, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-rdf-mt-20040210/.
[RFC 2119]
RFC 2119: Key words for use in RFCs to Indicate Requirement Levels. Network Working Group, S. Bradner. Internet Best Current Practice, March 1997.