RDF to Topic Maps Conversion

Our approach to Topic Maps RDF interoperability is based on the idea of overlapping concepts. The purpose of defining overlapping concepts is to enable translation between RDF and Topic Maps that integrates generic with focused translation in a single system. The focused component of the translation is intended to deal with the constructs identified as "overlapping concepts". The remaining concepts are subject to generic translation.

1 Focused Translation

The focused translation is intended to deal with the constructs identified as "overlapping concepts". This also includes metadata vocabularies expressed in both RDF and Topic Maps. The remaining constructs are subject to generic translation.

1.1 Predefined Properties

The RDF type property is converted to Class-Instance association, where the subjects of the property are mapped to the instance members of the association and the objects of the type property are mapped to the corresponding typing topics. The RDFS subClassOf property is converted to Superclass-Subclass association, where the subjects of the property are mapped to the subclass association members and the objects of the subClassOf property are mapped to the superclass association members. RDFS label properties are converted to Topic names (baseName). The predefined RDFS properties seeAlso are converted to Topic Maps occurrences, where the subject of the property is converted to a topic and the object of the property to the topic occurrence.

Example

The RDF statement asserting that the resource with rdf:label property value Spinach Lasagna is an instance of the resource with rdf:label property value Lasagna is translated into an equivalent Topic Maps set of assertions: namely, the topic with basename Spinach Lasagna is an instance of the topic with basename Lasagna.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdf:Description rdf:ID="Spinach-Lasagna-Id">
<rdf:type rdf:resource="#Lasagna-Id"/>
<rdfs:label>Spinach Lasagna</rdfs:label>
</rdf:Description>

<rdf:Description rdf:ID="Lasagna-Id">
<rdfs:label>Lasagna</rdfs:label>
</rdf:Description>
                     

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<topicMap xmlns="http://www.topicmaps.org/xtm/1.0/"
xmlns:xlink="http://www.w3.org/1999/xlink">

<topic id="Spinach-Lasagna-Id">
  <baseName>
    <baseNameString>Spinach Lasagna</baseNameString>
  </baseName>
  <instanceOf>
    <topicRef xlink:href="#Lasagna-Id"/>
  </instanceOf>
</topic>
<topic id="Lasagna-Id">
  <baseName>
    <baseNameString>Lasagna</baseNameString>
  </baseName>
</topic>
1.2 RDF Dublin Core Metadata

The Dublin Core Metadata elements contributor, coverage, creator, type, format, language, publisher, relation, source and subject are translated into an association of the corresponding type. The resource to which metadata is being assigned is represented as an association role of type resource, while the other role of the association is of type value. The elements date, description, identifier and rights are represented as occurrences, while the element title is represented as a topic name. To simplify the examples, in the following the prolog is omitted from the xtm and xml-rdf encoding

Example

The RDF statements asserting that Dave Beckett is a creator of Dublin Core Metadata Initiative - Home Page with creation date of January 16 2001 is translated into Topic Maps statements asserting that the topic Dublin Core Metadata Initiative - Home Page topic with occurrence 2001-01-16 of type Date plays a role of Resource, while the topic Dave Beckett plays a role of Value in the Creator association.

<rdf:Description rdf:about="http://dublincore.org/">
   <dc:title>Dublin Core Metadata Initiative - Home Page</dc:title>
   <dc:creator>Dave Beckett</dc:creator>
   <dc:date>2001-01-16</dc:date>
</rdf:Description>
                     
<topic id="x1osden5er-38">
    <subjectIdentity>
         <subjectIndicatorRef xlink:href="http://dublincore.org/" />
    </subjectIdentity>
    <baseName>
          <baseNameString>Dublin Core Metadata Initiative - Home Page</baseNameString>
    </baseName>
    <occurrence>
         <instanceOf>
             <topicRef xlink:href="#x1osden5er-3b" />
         </instanceOf>
         <resourceData>2001-01-16</resourceData>
     </occurrence>
</topic>
<topic id="x1osden5er-46">
   <baseName>
       <baseNameString>Dave Beckett</baseNameString>
   </baseName>
</topic>
<topic id="x1osden5er-3e">
  <baseName>
      <baseNameString> Creator </baseNameString>
  </baseName>
  <baseName>
      <scope>
           <topicRef xlink:href="#x1osden5er-40" />
      </scope>
      <baseNameString>Resource</baseNameString>
   </baseName>
   <baseName>
     <scope>
         <topicRef xlink:href="#x1osden5er-43" />
     </scope>
     <baseNameString>Value</baseNameString>
  </baseName>
</topic>
<association>
   <instanceOf>
       <topicRef xlink:href="#x1osden5er-3e" />
   </instanceOf>
    <member>
        <roleSpec>
             <topicRef xlink:href="#x1osden5er-40" />
         </roleSpec>
         <topicRef xlink:href="#x1osden5er-38" />
    </member>
    <member>
         roleSpec>
             <topicRef xlink:href="#x1osden5er-43" />
         </roleSpec>
         <topicRef xlink:href="#x1osden5er-46" />
    </member>
</association>
<topic id="x1osden5er-3b">
  <baseName>
      <baseNameString>Date</baseNameString>
  </baseName>
</topic>
1.3 User Defined Properties

The RDF properties describing user defined structures are subject to generic translation. They are converted into a Topic Maps binary association with two role types: subject and object, mirroring the subject and the object of the corresponding RDF property. The type of the association corresponds to the predicate of the property.

2 Generic Translation

The generic translation is intended to generate syntactically correct encoding in terms of the target model with minimal intentional inconsistency with respect to the original. All RDF concepts that do not have corresponding counterparts in Topic Maps (i.e. with no matching concepts) are subject to generic translation. Strictly speaking, the term "generic translation" refers to a combination of translations and transformations. The semantics of particular source concept may change its meaning when translated into the target model in order to make use of existing concepts with similar meaning instead of introducing new ones.

2.1 RDF Containers

The three types of containers: bag, sequence and alternative are intended for a different type of resource grouping. We transform RDF containers into compositions of the predefined Topic Maps InstanceOf and Whole-Part binary associations. For each container, a topic of type Bag, Seq or Alt is generated. This topic container is also a role payer of type whole. The contained items, called members, are translated as role players of type part and linked by the Whole-Part association to the container topic.

Example The statement "Group1 consists of the students Elva, James and Paul" with the following RDF representation.
<rdf:Description rdf:about="http://example.org/courses/Compilers">
      <s:students>
         <rdf:Bag>
            <rdf:li rdf:resource="http://example.org/students/Elva"/>
            <rdf:li rdf:resource="http://example.org/students/James"/>
            <rdf:li rdf:resource="http://example.org/students/Paul"/>           
         </rdf:Bag>
      </s:students>
</rdf:Description>

is translated into the following sequence of Topic Maps assertions (in LTM notation)

       students(Compilers: subject, Group1: object)
       InstanceOf(Group1: instance, Bag: class)
       Whole-Part(Group1: whole, Elva: part)
       Whole-Part(Group1: whole, James: part)
       Whole-Part(Group1: whole, Paul: part)

The following is a translation of the original RDF bag example into XTM format

<topic id="id1">
  <subjectIdentity>
    <subjectIndicatorRef xlink:href="http://example.org/courses/Compilers"/>
  </subjectIdentity>
</topic>
<topic id="id2">
  <baseName>
    <baseNameString>Bag</baseNameString>
  </baseName>
</topic>
<topic id="id3">
  <baseName>
    <baseNameString>Whole</baseNameString>
  </baseName>
</topic>
<topic id="id4">
  <baseName>
    <baseNameString>Part</baseNameString>
  </baseName>
</topic>
<topic id="id5">
  <baseName>
    <baseNameString>Whole-Part</baseNameString>
  </baseName>
  <baseName>
    <scope>
      <topicRef xlink:href="#id3"/>
    </scope>
    <baseNameString>contains</baseNameString>
  </baseName>
  <baseName>
    <scope>
      <topicRef xlink:href="#id4"/>
    </scope>
    <baseNameString>is part of</baseNameString>
  </baseName>
</topic>
<topic id="id7">
  <baseName>
    <baseNameString>Subject</baseNameString>
  </baseName>
</topic>
<topic id="id8">
  <baseName>
    <baseNameString>Object</baseNameString>
  </baseName>
</topic>
<topic id="id6">
  <subjectIdentity>
    <subjectIndicatorRef xlink:href="http://www.w3.org/2006/students/students"/>
  </subjectIdentity>
  <baseName>
    <baseNameString>students</baseNameString>
  </baseName>
  <baseName>
    <scope>
      <topicRef xlink:href="#id7"/>
    </scope>
   <baseNameString>subject</baseNameString>
  </baseName>
  <baseName>
    <scope>
      <topicRef xlink:href="#id8"/>
    </scope>
    <baseNameString>object</baseNameString>
  </baseName>
</topic>
<topic id="id9">
  <baseName>
    <baseNameString>Group1</baseNameString>
  </baseName>
  <instanceOf/>
    <topicRef xlink:href="#id2"/>
</topic>
<association>
  <instanceOf>
    <topicRef xlink:href="#id6"/>
  </instanceOf>
  <member>
    <roleSpec>
      <topicRef xlink:href="#id7"/>
    </roleSpec>
    <topicRef xlink:href="#id1"/>
  </member>
  <member>
    <roleSpec>
      <topicRef xlink:href="#id8"/>
    </roleSpec>
    <topicRef xlink:href="#id9"/>
  </member>
</association>
<topic id="id10">
  <subjectIdentity>
    <subjectIndicatorRef xlink:href="http://example.org/students/Elva"/>
  </subjectIdentity>
</topic>
<association>
  <instanceOf>
    <topicRef xlink:href="#id5"/>
  </instanceOf>
  <member>
    <roleSpec>
     <topicRef xlink:href="#id3"/>
    </roleSpec>
    <topicRef xlink:href="#id9"/>
  </member>
  <member>
    <roleSpec>
      <topicRef xlink:href="#id4"/>
    </roleSpec>
    <topicRef xlink:href="#id10"/>
  </member>
</association>
<topic id="id11">
  <subjectIdentity>
    <subjectIndicatorRef xlink:href="http://example.org/students/James"/>
  </subjectIdentity>
</topic>
<association>
  <instanceOf>
    <topicRef xlink:href="#id5"/>
  </instanceOf>
  <member>
    <roleSpec>
      <topicRef xlink:href="#id3"/>
    </roleSpec>
    <topicRef xlink:href="#id9"/>
  </member>
  <member>
    <roleSpec>
      <topicRef xlink:href="#id4"/>
    </roleSpec>
    <topicRef xlink:href="#id11"/>
  </member>
</association>
<topic id="id12">
  <subjectIdentity>
    <subjectIndicatorRef xlink:href="http://example.org/students/Paul"/>
  </subjectIdentity>
</topic>
<association>
  <instanceOf>
    <topicRef xlink:href="#id5"/>
  </instanceOf>
  <member>
    <roleSpec>
      <topicRef xlink:href="#id3"/>
    </roleSpec>
    <topicRef xlink:href="#id9"/>
  </member>
  <member>
    <roleSpec>
      <topicRef xlink:href="#id4"/>
    </roleSpec>
    <topicRef xlink:href="#id12"/>
  </member>
</association>

The remaining type of containers rdf:Seq or rdf:Alt are translated in a similar fashion. The difference is that the container topic is now of type Seq or Alt instead of Bag. Thus each container is composed from multiple Whole-Part associations applied to the container topic of type Bag/Seq/Alt.

See Also

Translation between RDF and Topic Maps: Divide and Translate


This is a personal web page. Opinions or views expressed are those of the author and do not represent the official views of Winston-Salem State University.