OWLウェブ・オントロジー言語
セマンティクスおよび抽象構文
4項. RDFグラフへのマッピング

編集者:
Peter F. Patel-Schneider, Bell Labs Research, Lucent Technologies
Ian Horrocks, Department of Computer Science, University of Manchester

このドキュメントに対する正誤表を参照してください。いくつかの規範的な修正が含まれているかもしれません。

翻訳版も参照してください。


目次


4. RDFグラフへのマッピング(規範)

ドキュメントのこの項は、2項で提供されるOWL DLおよびOWL Liteに対する抽象構文から、OWLに対する交換構文(すなわちRDF/XML[RDF Syntax])へのマッピングを提供します。このマッピング(また、その逆)は、抽象構文と交換構文の規範的な関係を提供します。このマッピングがOWL DLオントロジーの意味を保持するということが、5項および付録A.1で示されます。4.2項は、OWL DLおよびOWL LiteというOWLの方言を、抽象構文オントロジーからのマッピングの結果であるRDFグラフであると定義します。

OWL参照記述[OWL Reference]で指定されているように、OWLに対する交換構文はRDF/XML[RDF Syntax]です。さらに、RDF/XMLにおけるOWLオントロジーの意味は、RDF/XMLドキュメントのRDF解析の結果であるRDFグラフ[RDF Concepts]からのみ決定されます。したがって、抽象構文形式のOWLオントロジーを交換構文に翻訳する一つの方法は、各命令の変換をトリプルのコレクションに与えることによります。すべてのOWL Lite構成子は完全な抽象構文における特例であるため、変換はOWL DLバージョンにのみ提供されます。

OWL DLは、RDFグラフのサブセットから成る抽象構文および具象構文に関してセマンティクスを定義します。従って、特定のRDF/XMLドキュメントおよびそれらの対応するグラフに、特定の抽象構文オントロジーを関連付ける必要があります。この項では、抽象構文オントロジーとRDFグラフの間の多対多関係を定義します。これは、1組の非決定的なマッピング規則を使用することで行えます。したがって、特定のRDFグラフにセマンティクスを適用するためには、マッピング規則に基いたそのグラフに対応する抽象構文オントロジーの1つを見つけ、その抽象オントロジーにセマンティクスを適用する必要があります。マッピングは、特定のRDFグラフに対応する抽象オントロジーがそうであるのと同様に、特定の抽象オントロジーに対応するRDFグラフのどれもが同じ意味を持つように設計されています。さらに、対応する抽象構文形式を持っていないRDFグラフにこのプロセスを適用することができないため、マッピング規則は1組のグラフを暗黙に定義し、RDF/XMLにおけるOWL DLを構文的に特徴づけます。

ここで使用されるトリプルに対する構文は、RDFセマンティクス[RDF Semantics]で使用されているものです。この変形においては、修飾名が許されます。RDFセマンティクスで詳述されているように、この構文を標準的なものに変えるためには、標準的なOWL名前空間を使用して、ローカル名と名前空間名を連結することにより、標準的なRDFの方法で修飾名をURI参照に拡張するだけです。

4.1. RDFグラフへの翻訳

変換表は、抽象構文をOWL交換構文に変換する変換規則を示します。少数ではあるが、特にDifferentIndividuals構成子に対し、様々な変換規則が存在するケースもあります。そのような場合には、いずれかの規則を選ぶことができ、決定論的でない翻訳をもたらします。他の少数のケースでは、特にクラスおよびプロパティー公理に対し、生成されるかどうかが不確かなトリプルが存在します。これらのトリプルは、[opt]というフラグを立てることにより示されます。いくつかのケースでは、2つのトリプルのうちの1つが生成されなければなりません。これは、ORでトリプルを分離することによって示されます。これらの非決定性により、より多くのRDFグラフの生成が可能になります。

の左列は、抽象構文(S)を示し、中央列はそのトリプル(T(S))への変換を示し、右列は変換(M(T(S)))の主要ノードの識別子を示します(いくつかの命令として生じる構文構成子の場合)。構成要素の繰り返しは、description1… descriptionnのような省略形を用いてリストアップされ、この形式によって、構文中で許されるn個のすべての値に対する変換の仕様が容易になります。抽象構文のオプション部分(角括弧で囲まれた)は、変換のオプション部分(角括弧で示された)です。同様に、組み込みOWLデータ型組み込みOWLクラス組み込みOWLアノテーション・プロパティー、および組み込みOWLオントロジー・プロパティーのいずれかに対して、それの翻訳における第1のrdf:typeトリプルか、それに対する任意の公理かはオプションです。

表のいくつかの変換は命令に対するものです。他の変換は命令の部分に対するものです。最後の変換は、数列に対するもので、これらは抽象構文の一部ではありません。この最後の変換は、他の変換のいくつかのを、よりコンパクトで、読みやすくするために使用されます。

多くの命令に関しては、これらの変換規則は、他の変換規則を使用して、命令の構成要素の変換を要求します。構成要素の変換が、トリプルの主題、述語、あるいは目的語、オプションのトリプルとしてさえも使用される場合、構成要素の変換は生産の一部(しかし、1つの生産に対して一度だけ)であり、その変換の主要ノードはそのトリプルで使用されるべきです。

ここでは、Bノード識別子は、各変換に対してローカルであると考えなければなりません。つまり、異なる識別子はそれぞれの変換規則の実施のために使用されるべきです。名前のないオントロジーは、それらの主要ノードとしてbノードを与えられ、名前を持つオントロジーはその名前をそれらの主要ノードとして使用し、両方のケースにおいて、このノードは下記でOと呼ばれます。

トリプルへの変換
抽象構文(および数列)- S 変換 - T(S) 主要ノード - M(T(S))
Ontology(O directive1 … directiven) O rdf:type owl:Ontology .
T(directive1) … T(directiven)
Ontology(directive1 … directiven) O rdf:type owl:Ontology .
T(directive1) … T(directiven)
Annotation(ontologyPropertyID URIreference) ontologyPropertyID rdf:type owl:OntologyProperty .
O ontologyPropertyID URIreference .
URIreference rdf:type owl:Ontology .
Annotation(annotationPropertyID URIreference) annotationPropertyID rdf:type owl:AnnotationProperty .
annotationPropertyID rdf:type rdf:Property . [opt]
O annotationPropertyID URIreference .
Annotation(annotationPropertyID dataLiteral) annotationPropertyID rdf:type owl:AnnotationProperty .
annotationPropertyID rdf:type rdf:Property . [opt]
O annotationPropertyID T(dataLiteral) .
Annotation(annotationPropertyID individual) annotationPropertyID rdf:type owl:AnnotationProperty .
annotationPropertyID rdf:type rdf:Property . [opt]
O annotationPropertyID T(individual) .
rdfs:Literal rdfs:Literal
datatypeID datatypeID rdf:type rdfs:Datatype . datatypeID
classID classID rdf:type owl:Class .
classID rdf:type rdfs:Class . [opt]
classID
individualID individualID
datavaluedPropertyID datavaluedPropertyID rdf:type owl:DatatypeProperty .
datavaluedPropertyID rdf:type rdf:Property . [opt]
datavalued-
PropertyID
individualvaluedPropertyID individualvaluedPropertyID rdf:type owl:ObjectProperty . [opt if there is a triple in the translation of the ontology that types the individualvaluedPropertyID as owl:InverseFunctionalProperty, owl:TransitiveProperty, or owl:SymmetricProperty] .
individualvaluedPropertyID rdf:type rdf:Property . [opt]
individualvalued-
PropertyID
dataLiteral dataLiteral dataLiteral
Individual(iID annotation1 … annotationm
      
type(type1)type(typen)
      value(pID1 v1)value(pIDk vk))
iID T(annotation1) … iID T(annotationm)
iID rdf:type T(type1) . … iID rdf:type T(typen) .
iID T(pID1) T(v1) . … iID T(pIDk) T(vk) .
iID
Individual(annotation1 … annotationm
      type(type1)type(typen)
      value(pID1 v1)value(pIDk vk))
(With at least one type.)
_:x T(annotation1) … _:x T(annotationm)
_:x rdf:type T(type1) . … _:x rdf:type T(typen) .
_:x T(pID1) T(v1) . … _:x T(pIDk) T(vk) .
_:x
Individual(annotation1 … annotationm
      value(pID1 v1)value(pIDk vk))
_:x T(annotation1) … _:x T(annotationm)
_:x rdf:type owl:Thing .
_:x T(pID1) T(v1) . … _:x T(pIDk) T(vk) .
_:x
SameIndividual(iID1 … iIDn) iIDi owl:sameAs iIDi+1 . 1≤i<n
iIDi owl:sameAs iIDj . [opt] 1≤i≠j≤n
DifferentIndividuals(iID1 … iIDn) iIDi owl:differentFrom iIDj . OR
iIDj owl:differentFrom iIDi . 1≤i<j≤n
iIDj owl:differentFrom iIDi . [opt] 1≤i≠j≤n
DifferentIndividuals(iID1 … iIDn) _:x rdf:type owl:AllDifferent .
_:x owl:distinctMembers T(SEQ iID1 … iIDn) .
Class(classID [Deprecated] partial
      annotation1 … annotationm
      description1 … descriptionn)
classID rdf:type owl:Class .
classID rdf:type rdfs:Class . [opt]
[classID rdf:type owl:DeprecatedClass .]
classID T(annotation1) … classID T(annotationm)
classID rdfs:subClassOf T(description1) . …
classID rdfs:subClassOf T(descriptionn) .
Class(classID [Deprecated] complete
      annotation1 … annotationm
      description1 … descriptionn)
classID rdf:type owl:Class .
classID rdf:type rdfs:Class . [opt]
[classID rdf:type owl:DeprecatedClass .]
classID T(annotation1) … classID T(annotationm)
classID owl:intersectionOf T(SEQ description1…descriptionn) .
Class(classID [Deprecated] complete
      annotation1 … annotationm
      description)
classID rdf:type owl:Class .
classID rdf:type rdfs:Class . [opt]
[classID rdf:type owl:DeprecatedClass .]
classID T(annotation1) … classID T(annotationm)
classID owl:equivalentClass T(description) .
Class(classID [Deprecated] complete
      annotation1 … annotationm
      unionOf(description1 … descriptionn))
classID rdf:type owl:Class .
classID rdf:type rdfs:Class . [opt]
[classID rdf:type owl:DeprecatedClass .]
classID T(annotation1) … classID T(annotationm)
classID owl:unionOf T(SEQ description1…descriptionn) .
Class(classID [Deprecated] complete
      annotation1 … annotationm
      complementOf(description))
classID rdf:type owl:Class .
classID rdf:type rdfs:Class . [opt]
[classID rdf:type owl:DeprecatedClass .]
classID T(annotation1) … classID T(annotationm)
classID owl:complementOf T(description) .
EnumeratedClass(classID [Deprecated]
      annotation1 … annotationm
      iID1 … iIDn)
classID rdf:type owl:Class .
classID rdf:type rdfs:Class . [opt]
[classID rdf:type owl:DeprecatedClass .]
classID T(annotation1) … classID T(annotationm) .
classID owl:oneOf T(SEQ iID1…iIDn) .
DisjointClasses(description1 … descriptionn) T(descriptioni) owl:disjointWith T(descriptionj) . OR
T(descriptionj) owl:disjointWith T(descriptioni) . 1≤i<j≤n
T(descriptioni) owl:disjointWith T(descriptionj) . [opt] 1≤i≠j≤n
EquivalentClasses(description1 … descriptionn) T(descriptioni) owl:equivalentClass T(descriptionj) .
for all <i,j> in G where G is a set of pairs over {1,...,n}x{1,...,n}
that if interpreted as an undirected graph forms a connected graph for {1,...,n}
SubClassOf(description1 description2) T(description1) rdfs:subClassOf T(description2) .
Datatype(datatypeID [Deprecated]
      annotation1 … annotationm )
datatypeID rdf:type rdfs:Datatype .
datatypeID rdf:type rdfs:Class . [opt]
[datatypeID rdf:type owl:DeprecatedClass .]
datatypeID T(annotation1) … datatypeID T(annotationm)
unionOf(description1 … descriptionn) _:x rdf:type owl:Class .
_:x rdf:type rdfs:Class . [opt]
_:x owl:unionOf T(SEQ description1…descriptionn) .
_:x
intersectionOf(description1 … descriptionn) _:x rdf:type owl:Class .
_:x rdf:type rdfs:Class . [opt]
_:x owl:intersectionOf T(SEQ description1…descriptionn) .
_:x
complementOf(description) _:x rdf:type owl:Class .
_:x rdf:type rdfs:Class . [opt]
_:x owl:complementOf T(description) .
_:x
oneOf(iID1 … iIDn) _:x rdf:type owl:Class .
_:x rdf:type rdfs:Class . [opt]
_:x owl:oneOf T(SEQ iID1…iIDn) .
_:x
oneOf(v1 … vn) _:x rdf:type owl:DataRange .
_:x rdf:type rdfs:Class . [opt]
_:x owl:oneOf T(SEQ v1 … vn) .
_:x
restriction(ID component1 … componentn)
(With at least two components)
_:x rdf:type owl:Class .
_:x rdf:type rdfs:Class . [opt]
_:x owl:intersectionOf
  T(SEQ(restriction(ID component1) … restriction(ID componentn))) .
_:x
restriction(ID allValuesFrom(range)) _:x rdf:type owl:Restriction .
_:x rdf:type owl:Class . [opt]
_:x rdf:type rdfs:Class . [opt]
_:x owl:onProperty T(ID) .
_:x owl:allValuesFrom T(range) .
_:x
restriction(ID someValuesFrom(required)) _:x rdf:type owl:Restriction .
_:x rdf:type owl:Class . [opt]
_:x rdf:type rdfs:Class . [opt]
_:x owl:onProperty T(ID) .
_:x owl:someValuesFrom T(required) .
_:x
restriction(ID value(value)) _:x rdf:type owl:Restriction .
_:x rdf:type owl:Class . [opt]
_:x rdf:type rdfs:Class . [opt]
_:x owl:onProperty T(ID) .
_:x owl:hasValue T(value) .
_:x
restriction(ID minCardinality(min)) _:x rdf:type owl:Restriction .
_:x rdf:type owl:Class . [opt]
_:x rdf:type rdfs:Class . [opt]
_:x owl:onProperty T(ID) .
_:x owl:minCardinality "min"^^xsd:nonNegativeInteger .
_:x
restriction(ID maxCardinality(max)) _:x rdf:type owl:Restriction .
_:x rdf:type owl:Class . [opt]
_:x rdf:type rdfs:Class . [opt]
_:x owl:onProperty T(ID) .
_:x owl:maxCardinality "max"^^xsd:nonNegativeInteger .
_:x
restriction(ID cardinality(card)) _:x rdf:type owl:Restriction .
_:x rdf:type owl:Class . [opt]
_:x rdf:type rdfs:Class . [opt]
_:x owl:onProperty T(ID) .
_:x owl:cardinality "card"^^xsd:nonNegativeInteger .
_:x
DatatypeProperty(ID [Deprecated]
      annotation1 … annotationm
      super(super1)super(supern)
      domain(domain1)
      domain(domaink)
      range(range1)
      range(rangeh)
      [Functional])
ID rdf:type owl:DatatypeProperty .
ID rdf:type rdf:Property . [opt]
[ID rdf:type owl:DeprecatedProperty .]
ID T(annotation1) … ID T(annotationm)
ID rdfs:subPropertyOf T(super1) . …
ID rdfs:subPropertyOf T(supern) .
ID rdfs:domain T(domain1) . …
ID rdfs:domain T(domaink) .
ID rdfs:range T(range1) . …
ID rdfs:range T(rangeh) .
[ID rdf:type owl:FunctionalProperty . ]
ObjectProperty(ID [Deprecated]
      annotation1 … annotationm
      super(super1)super(supern)
      domain(domain1)
      domain(domaink)
      range(range1)
      range(rangeh)
      [inverseOf(inverse)]
      [Functional |
       InverseFunctional |
       Transitive])
      [Symmetric]
ID rdf:type owl:ObjectProperty .
    [opt if one of the last three triples is included]
ID rdf:type rdf:Property . [opt]
[ID rdf:type owl:DeprecatedProperty .]
ID T(annotation1) … ID T(annotationm)
ID rdfs:subPropertyOf T(super1) . …
ID rdfs:subPropertyOf T(supern) .
ID rdfs:domain T(domain1) . …
ID rdfs:domain T(domaink) .
ID rdfs:range T(range1) . …
ID rdfs:range T(rangeh) .
[ID owl:inverseOf T(inverse) .]
[ID rdf:type owl:FunctionalProperty . ]
[ID rdf:type owl:InverseFunctionalProperty . ]
[ID rdf:type owl:TransitiveProperty . ]
[ID rdf:type owl:SymmetricProperty . ]
AnnotationProperty(ID
      annotation1 … annotationm)
ID rdf:type owl:AnnotationProperty .
ID rdf:type rdf:Property . [opt]
ID T(annotation1) … ID T(annotationm)
OntologyProperty(ID
      annotation1 … annotationm)
ID rdf:type owl:OntologyProperty .
ID rdf:type rdf:Property . [opt]
ID T(annotation1) … ID T(annotationm)
EquivalentProperties(dvpID1 … dvpIDn) T(dvpIDi) owl:equivalentProperty T(dvpIDi+1) . 1≤i<n
SubPropertyOf(dvpID1 dvpID2) T(dvpID1) rdfs:subPropertyOf T(dvpID2) .
EquivalentProperties(ivpID1 … ivpIDn) T(ivpIDi) owl:equivalentProperty T(ivpIDi+1) . 1≤i<n
SubPropertyOf(ivpID1 ivpID2) T(ivpID1) rdfs:subPropertyOf T(ivpID2) .
annotation(annotationPropertyID URIreference) annotationPropertyID URIreference .
annotationPropertyID rdf:type owl:AnnotationProperty .
annotationPropertyID rdf:type rdf:Property . [opt]
annotation(annotationPropertyID dataLiteral) annotationPropertyID T(dataLiteral) .
annotationPropertyID rdf:type owl:AnnotationProperty .
annotationPropertyID rdf:type rdf:Property . [opt]
annotation(annotationPropertyID individual) annotationPropertyID T(individual) .
annotationPropertyID rdf:type owl:AnnotationProperty .
annotationPropertyID rdf:type rdf:Property . [opt]
SEQ rdf:nil
SEQ item1…itemn _:l1 rdf:type rdf:List . [opt]
_:l1 rdf:first T(item1) . _:l1 rdf:rest _:l2 .

_:ln rdf:type rdf:List . [opt]
_:ln rdf:first T(itemn) . _:ln rdf:rest rdf:nil .
_:l1

上記の予約された語彙(reserved vocabulary)を使用しないいくつかのOWL抽象オントロジーを同等のRDFグラフへマッピングすることができるため、この変換は単射ではありません。しかし、これが起こりうる唯一のケースは、構成子が、より大きな1つのものと同じ効果を持ついくつかのDisjointClasses公理のような、同じ意味を持つ場合です。望めば、正統な逆変換を定義することができるでしょう。

4.2. RDFグラフ形式のOWL DLおよびOWL Liteオントロジーの定義

RDFグラフ形式のOWL LiteおよびDLのオントロジーについて考える場合、ある語彙を、OWLクラス、プロパティー、あるいは個体として使用しないように注意しなければなりません。これが行われない場合、組み込み定義やこの語彙の使用(RDFあるいはOWL仕様における)によって、OWLオントロジーの情報が増大するでしょう。RDF語彙のいくつかだけがこのカテゴリーに適合し、rdf:subjectのようなRDF語彙のいくつかはRDFの仕様によってほとんどあるいは全く意味を与えられず、RDF仕様書によって与えられた意味と一致している限り、使用しても問題にはなりません。

定義: RDFで許されていない語彙は、rdf:typerdf:Propertyrdf:nilrdf:Listrdf:firstrdf:restrdfs:domainrdfs:rangerdfs:Resourcerdfs:Datatyperdfs:Classrdfs:subClassOfrdfs:subPropertyOfrdfs:memberrdfs:Containerおよびrdfs:ContainerMembershipPropertyです。OWLで許されていない語彙は、owl:AllDifferentowl:allValuesFromowl:AnnotationPropertyowl:cardinalityowl:Classowl:complementOfowl:DataRangeowl:DatatypePropertyowl:DeprecatedClassowl:DeprecatedPropertyowl:differentFromowl:disjointWithowl:distinctMembersowl:equivalentClassowl:equivalentPropertyowl:FunctionalPropertyowl:hasValueowl:intersectionOfowl:InverseFunctionalPropertyowl:inverseOfowl:maxCardinalityowl:minCardinalityowl:ObjectPropertyowl:oneOfowl:onPropertyowl:Ontologyowl:OntologyPropertyowl:Restrictionowl:sameAsowl:someValuesFromowl:SymmetricPropertyowl:TransitiveProperty、およびowl:unionOfです。許されていない語彙は、RDFで許されていない語彙OWLで許されていないの和集合です。

定義: クラス限定語彙は、rdf:Statementrdf:Seqrdf:Bag、およびrdf:Altです。データ型限定語彙は、組み込みOWLデータ型です。プロパティー限定語彙は、rdf:subjectrdf:predicaterdf:object、および、すべてのコンテナー・メンバーシップ・プロパティー、つまり、rdf:_1rdf:_2、…です。

定義: 以下の場合、抽象構文形式のOWL DLオントロジーのコレクションおよび公理と事実Oは、分離された語彙を持ちます。

  1. Oのオントロジーは、総合すれば、クラスID、データ型ID、個体ID、個体値プロパティーID、データ値プロパティーID、アノテーション・プロパティーID、オントロジー・プロパティーID、あるいはオントロジーIDのうちの1つ以上としてURI参照を使用しません。
  2. Oのオントロジーは、総合すれば、すべての個体IDにタイプを提供します。
  3. Oのオントロジーは、アノテーションの値としての場合を除き、クラスIDとしてクラス限定語彙(class-only vocabulary)のみを使用し、データ型IDとしてデータ型限定語彙(datatype-only vocabulary)のみを使用し、データ値域においてrdfs:Literalのみを使用し、datavaluedProperty ID、individualvaluedProperty ID、あるいはannotationProperty IDとしてプロパテイー限定語彙(property-only vocabulary)のみを使用し、クラスIDとして組み込みクラス(built-in classes)のみを使用し、データ型IDとして組み込みデータ型(built-in datatypes)のみを使用し、annotationProperty IDとして組み込みアノテーション・プロパティー(built-in annotation properties)のみを使用し、ontologyProperty IDとして組み込みオントロジー・プロパティー(built-in ontology properties)のみを使用し、どの許されていない語彙にも言及しません。

定義: 分離された語彙を持つ抽象構文形式のOWL DLオントロジーのコレクションおよび公理と事実の、上記のトリプルへの変換の結果と同じ(少し緩和した定義は以下を参照)である場合、RDFグラフはRDFグラフ形式のOWL DLオントロジーです。RDFグラフがRDFグラフ形式のOWL DLオントロジーかどうかを決定する目的で、カーディナリティー制限で、"1"^^xsd:integerのような構文を使用することが、そのようにコード化されたデータ値が負でない整数である限り、明示的に許されています。

定義: Oの内容が抽象構文形式のOWL Liteオントロジーあるいは公理か事実であるという点を除いて、上記のようである場合、RDFグラフはRDFグラフ形式のOWL Liteオントロジーです。