From: Gerd M. <ge...@sm...> - 2001-06-25 18:24:06
|
On Mon, 25 Jun 2001 16:54:03 +0100 "Kal Ahmed" <ka...@te...> wrote: > I think that the solution to this problem lies in something that Gerd and I > discussed briefly a little while ago and that is creating a more generic way > to create and access TopicMap objects. We already have the TopicMapFactory > interface, which at least provides a generic means of creating topic map > objects regardless of the back-end. However, I think that what we also need > is a TopicMapManager interface which would enable a back-end to provide a > generic interface for accessing and creating TopicMap objects. > > I am thinking of an interface something like this: > > import com.techquila.topicmap.*; > import java.util.*; > > public interface TopicMapManager { > > public TopicMapManger(); > public void initialise(Properties) throws TopicMapManagerException(); > public TopicMap getTopicMap(String sourceURL); > public Collection getTopicMaps(); > > } > > The init() function takes a java property set, which would enable any > back-end specific initialisation to be passed en-masse (and so manage things > like establishing a database connection and setting up internal caches). > Perhaps an additional function to set properties one-by-one might also be > useful. > > The getTopicMap() function returns a topic map whose sourceURL property > matches that specified in the parameter. > The getTopicMaps() function returns all of the TopicMap objects that the > manager knows about. > > Jack, you should then be able to get the referenced topic map by checking > with the TopicMapManager (equates to the XTMSession object I guess). > Although your topic map will still need to use the full URL for referencing > the topic map as an occurrence (or else your code needs to have some smarts > to recognise how to process the occurrence according to its type). > > How does this sound ? Sounds good so far. This brings another idea to my mind: What about distributed topic maps ? E.g. an association in topicmap A could have a type that is defined in a topicmap B somewhere. It would be cool to manage this transparently for the application, e.g. be topic proxies or something like that. Best Regards, Gerd -- ________________________________________________________________ Gerd Mueller ge...@sm... SMB GmbH http://www.smb-tec.com |