[topicmapmail] Merging associations

Lars Heuer heuer at semagia.com
Tue Sep 19 09:30:30 EDT 2006


Hi Joril,

> when merging 2 topic maps, and 2 topics are equal -->in the mergeIn(Topic),
> should you go through the rolesPlayed of the topic B, and add the players to
> the topic A if they don't exist.? Or should this just be applied when 
> merging within one topic map?

If you merge the topic B with topic A you have to ensure that topic A
plays all roles that the topic B plays.

Some (simplified) examples:

a) Merging of topic maps

Topic map A

      john
      fullname: John Ono Lennon

      member-of(group: the-beatles, member: john)


Topic map B

      john
      birthname: John Winston Lennon

      plays-instrument(player: john, instrument: guitar)


Now, you merge topic map B into topic map A (in TMAPI-speak:
topicMapA.mergeIn(topicMapB);)

After the merging process topic map A has become:

      john
      fullname: John Ono Lennon
      birthname: John Winston Lennon

      member-of(group: the-beatles, member: john)

      plays-instrument(player: john, instrument: guitar)
      
You see, the topic "john", that previously played only the "member"
role in the "member-of" association, plays now an instrument.



b) Merging topics inside a topic map

      john
      fullname: John Ono Lennon

      john-lennon
      bithname: John Winston Lennon

      member-of(group: the-beatles, member: john)

      plays-instrument(player: john-lennon, instrument: guitar)


After the merge of "john-lennon" with "john"
(john.mergeIn(johnLennon)) the topic map has become

      john
      fullname: John Ono Lennon
      bithname: John Winston Lennon

      member-of(group: the-beatles, member: john)

      plays-instrument(player: john, instrument: guitar)


"john-lennon" has been replaced by "john" in the "plays-instrument"
association (and "john" has one topic name more).
      
(The [AsTMa2] topic map is slighly incorrect, since it ignores the
fact that the topic 'john' got all item identifiers of 'john-lennon').

A better (and complete) description for the merging process is located
here: http://isotopicmaps.org/sam/sam-model/#sect-merging

> The item identifier/source locaor:
> a topic : <topic id ="tuesday">
> makes the item identifier : tuesday ? Or should one add the base locator of
> the topic map it is a part of?

Item identifiers are always absolute. They are resolved against a
locator. This locator is not necessarily the base locator. It can be
any locator (i.e. the locator where the serialized topic maps is
located). In XTM 2.0, for example, we don't have a base locator. The
user / application has to provide a locator which is used to resolve
relative references against. I.e. if the document is located at
"http://www.example.org/tm/my-tm", "tuesday" becomes
"http://www.example.org/tm/my-tm#tuesday".

[AsTMa2] http://astma.it.bond.edu.au/astma=-spec-2.0r1.0.dbk

Best regards,
Lars
-- 
http://www.semagia.com
http://www.topicgarden.com/mailinglist/ German Topic Maps mailinglist



More information about the topicmapmail mailing list