[topicmapmail] Merging associations
Lars Heuer
heuer at semagia.com
Sun Sep 17 14:11:21 EDT 2006
Hi Joril,
>>Since TMAPI is a collection of Java interfaces you have the freedom to
>>implement anything you want (as long as you fullfil the interface
>>contracts). If you want a TopicMap.mergeIn(Association) method: add it.
>>As said, it would be strange to have something like that in TMAPI.
>>That's implementation specific.
> Yea, I am fully aware of this... I never meant an implementation, merely an
> added method in the Association interface, like the mergin() method in the
> Topic class. To indicate that this method should be realized..
It is not there, because TMAPI is the "user" perspective. TMAPI is not
a tutorial "How to implement a TM engine". I suspect that a user needs
a TopicMap.mergeIn(Association) method.
[...]
>>Maybe it would be nice if tinyTiM provides a utility that removes
>>duplicates, but in "runtime mode" it is too expensive to check for
>>duplicates.
> Yes , I agree, this is also true for the MTV implementation that runs on
> mobile phones. The question is; should it be checked at startup or shutdown?
If I have to write a DuplicateSuppression class I'd let the user
decide when she likes to remove duplicates from the TM. If a user does
not care about duplicates you won't waste her resources and time ;)
Merging topic maps might be another subject, here you can take care
that an association is not added to the topic map if the association
already exist.
> Do you know if other implementations merge associations?
I think [TM4J] takes care that an association is not added to the TM
if it already exist. You can look into the (if I remember right)
TopicMapCopier class.
[TM4J] http://www.tm4j.org/
Best regards,
Lars
--
http://www.semagia.com
http://www.topicgarden.com/mailinglist/ German Topic Maps mailinglist
More information about the topicmapmail
mailing list