[topicmapmail] multidirectional property of association role

Steve Pepper pepper@ontopia.net
Wed, 30 Jan 2002 18:27:14 +0100


At 10:08 30/01/02 -0600, Dan Wu wrote:
>In the same paper, The TAO of Topic Maps,
>that I was reading.
>
>On page 12, it argued that
>"....associations are inherently multidirectional. In topic maps
>it does not make sense to say that A is related to B but that
>B is not related to A; If A is related to B, then B must, by definition,
>be related to A...."
>
>For example, in the assocation born_in,
>I can have an association born_in(John, Canadan) to indicate
>that John was born in Canada.
>
>The association between John and Canada, expressed
>in topic map as an association born_in(John, Canada)
>is differnent than the association born_in(Canada, John).

The answer to this is that the concept of "association roles" removes the 
need for directionality. Your examples are confusing because they are 
incomplete: the roles are not stated.

    born_in(John, Canada)

is asserting that there is a relationship of type [born_in] between the 
topics [John] and [Canada], but it is not saying which topic plays which 
role in this association. To make a complete and meaningful association you 
need to state the roles. In LTM syntax you would express them like this:

    born_in( [John] : person, [Canada] : place )

This says that the topic [John] plays the role "person" and the topic 
[Canada] plays the role "place". The same thing can be expressed as:

    born_in( [Canada] : place, [John] : person )

So you see, there is no direction.

But there is an *impression* of direction, caused by your use of a *verb* 
to label the association type ("born in"). Transitive verbs are very useful 
for describing (binary) relationships because the subject-verb-object 
construct in English maps neatly to topic-association-topic, but they can 
be misleading precisely because the subject-verb-object construct (at least 
in English) has an order to it.

So should you avoid verbs? I think not, provided you don't imply a 
directionality that is not there. I use them quite freely as the IDs of 
topics that type associations. However, I also use multiple names for such 
topics and tell my application to choose the most pertinent name based on 
the vantage point from which the association is viewed.

To see how this works, go to http://www.ontopia.net/omnigator/ and look at 
the topic map "opera.xtm". Navigate via "composer" to the topic "Puccini". 
Note that his "born in" association with "Lucca" is labelled "born in". 
Click on "Lucca" and see how the *same association* is now labelled 
"birthplace of".

How is this done? Simple. The topic used to type the association looks like 
this:

    <topic id="born-in">
      <baseName>
        <baseNameString>born in</baseNameString>
      </baseName>
      <baseName>
        <scope><topicRef xlink:href="#place"/></scope>
        <baseNameString>birthplace of</baseNameString>
      </baseName>
    </topic>

The default name used to label associations of this type is the one in the 
unconstrained scope ("born in"). However, there is another name, in the 
scope "place" that is used when the association is presented in the context 
(scope) of the topic playing the *role* of "place" in the association.

Steve

--
Steve Pepper, Chief Executive Officer <pepper@ontopia.net>
Convenor, ISO/IEC JTC1/SC34/WG3  Editor, XTM (XML Topic Maps)
Ontopia AS, Waldemar Thranes gt. 98, N-0175 Oslo, Norway.
http://www.ontopia.net/ phone: +47-23233080 GSM: +47-90827246