This document represents an evening's work and apparent concensus between Eric Prud'hommeaux and Graham Moore. It is not a part of any W3C process or the product of any W3C working group or coordination group.
RDF is a languages for expressing binary relationships between resources. Topic Maps is a language for expressing n-ary associations of members, each with its own role in the association. Eric van der Vlist describes the problem of Defining relationships between nodes of a tree. This document explores ways to model Topic Map associations in RDF as well as model arbitrary RDF graphs as associations.
Here is a list of mappings that have been considered:
The first member is related to the second member by an arc composed of the association type and the roleSpec of second member. The member nodes (at the end of this arc) are identified by the topicDefinition.
RDF databases become less efficient and meaningful if random properties are added. It is instead desirable that defined properties be re-used when possible. Constructing the relationship between the first and second members of an association achieves this goal as others asserting data from topic maps with association type will re-use the same properties.
A binding arc relates the property of the arc created in step 1 and a (potentially anonymous) node of type RelationshipComplement.
A subjectRole arc relates the RelationshipComplement node created in step 2 and a node of type SubjectRole. The SubjectRole node is named by the roleSpec of the first member.
An objectRole arc relates the RelationshipComplement node created in step 2 and a node of type ObjectRole. The ObjectRole node is named by the roleSpec of the second member.
An associationType arc relates the RelationshipComplement node created in step 2 and a node of type AssociationType. The AssociationType node is named by the association type.
This transformation associates a Topic Map with a set of RDF statements with generated properties. These properties have bindings with sufficient information to reverse the process without information loss. RDF arcs with properties without such bindings transform to Topic Maps without role specifications or association types.
This mapping shows how to transform an employment Topic Map
into RDF.
Mapping an n-ary topic map introduces the rule that
The first member is related to each following member by an arc composed of the association type and the roleSpec of that following member.
Translating RDF to a Topic Map requires that the RDF have the form generated above, or that complementary information be supplied out of band. This complementary information includes the SubjectRole, ObjectRole and AssociationType of each arc in the graph.
The first member is related to the second member by an arc composed of the association type and the roleSpec of second member. The member nodes (at the end of this arc) are identified by the topicDefinition.
RDF databases become less efficient and meaningful if random properties are added. It is instead desirable that defined properties be re-used when possible. Constructing the relationship between the first and second members of an association achieves this goal as others asserting data from topic maps with association type will re-use the same properties.
This has not been explored, though it seems possible to look for sets of properties and perform the mapping back
This approach is that it does round trip well but it implies a Topic Map interpretation of RDF that doesn't follow the intentions of the roles ad types in RDF. For instance, the common graph:
implies the Topic Map with the somewhat corrupted roles and types:
<assoc type="http://www.w3.org/2002/06/09-RDF-topic-maps/characters.txt#Graham" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:t="http://www.w3.org/2002/06/09-RDF-topic-maps/TM-schema.rdf#" xmlns:g="http://www.w3.org/2002/06/09-RDF-topic-maps/characters.txt#"> <member> <ruleSpec x:href="http://www.w3.org/2002/06/09-RDF-topic-maps/characters.txt#mailto"/> <topicRef x:href="mailto:gdm@empolis.co.uk"/> </member> <member> <ruleSpec x:href="http://www.w3.org/2002/06/09-RDF-topic-maps/characters.txt#authorOf/> <topicRef x:href="http://www.w3.org/2002/06/09-RDF-topic-maps/"/> </member> </assoc>
Perhaps the most straitforward way to model Topic Maps is to define an schema for the obvious components, association, (member)role and (member)topic. This makes Topic Map data available to RDF but does not make common RDF availble to Topic Maps. In this way, Mapping 1 is better as it makes RDF data available to Topic Maps, albeit generally in a limited form.