From: Kal A. <ka...@te...> - 2002-02-25 16:00:51
|
Hi all, I am currently thinking about ways to support complete conformance with Annex F of XTM 1.0. Briefly, XTM defines the concept of a "consistent" topic map in which all topics are merged and all duplicates are suppressed in conformance with XTM 1.0 Annex F. In my mind there are three possible approaches to supporting this: 1) A "static translation" approach - you can construct any topic map you like which may or may not be a "consistent" topic map. You then use a utility to process the topic map into a consistent topic map - this would remove the dynamic merges from the topic map and would eliminate all duplicates. This is currently implemented as org.tm4j.topicmap.Compressor (needs a better name!) 2) A "dynamic" layer over the basic TM4J implementation - This approach is a shim layer which wraps any TopicMapProvider and creates a layer of consistency validation around all methods which can update the topic - the shim makes sure that no call is allowed to violate the consistency of the topic map. Persistent implementations might also want to store a flag that indicates whether or not a particular TopicMap object should be wrapped in the consistency-enforcing layer. I think that there is room for / need for both of these approaches - The tradeoff as I see it is that (2) eliminates a lot of the freedom and flexibility of TM4J (particularly in the dynamic merging), so simply making the core API enforce consistency is not an option IMHO; whereas (1) is nice as it only enforces consistency at the point of use, but it is extremely processor intensive (though additional indexing layers could probably improve this) and so is not really a viable alternative when dealing with large topic maps in a persistent store. I would like to hear others thoughts Cheers, Kal |