From: Kal A. <ka...@te...> - 2001-06-25 15:54:50
|
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 ? Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Jack > Park > Sent: 24 June 2001 17:26 > To: tm4...@li... > Subject: [Tm4j-developers] Drill-down topic maps > > > New member alert! <gg> > > Goal: > To allow an occurrence of a topic to be, in fact, another topic map. > > Problem: > xlink:href opens a can of worms. For instance, the topic map > FiveKingdoms > has a topic Animalia, the occurrence for which is another topic > map called > Animalia. > > An approach to a solution: > I am making the occurrence an instanceOf topicMap. In so doing, > I have my > XTM engine do a type check. My system -- > http://nexist.sourceforge.net -- > uses HSQLDB as a relational store. Everything is in tables. It > becomes a > simple task for the engine to see that an occurrence is of type topicMap, > and search the topicmap table rather than the topic table. > > Angst: > This is just not a general enough solution. Besides, Nexist converses > (client-server) with my xtm engine by way of an XTMSession > object. It will > be an easy change to rewrite XTMSession to converse with TM4J > instead. Thusly, I'd like to know how this community might go about > implementing drill-down topic maps. > > Cheers > Jack > > > _______________________________________________ > Tm4j-developers mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-developers > > |