From: Prudence A. <pa...@ko...> - 2004-02-19 18:59:24
|
Hi Kal, Thanks for the quick response. It is very helpful. Since, most likely the changes will only happen in the XTM side. It might = be easiest to = delete the topic map and recreate it in the persistent store. Is there a m= ethod for me = to use to delete the whole topic map? = One more question about merging. So far, I've just tried the command line = version for = merging two files. I assume I can do the same with Java code, right? Thanks for both your great software and your help. Regards, Prudence -----Original Message----- From: Kal Ahmed Sent: 2/18/2004 4:21 PM To: Prudence Au Cc: tm4...@li... Subject: Re: [Tm4j-developers] Modify an existing topic map Hi Prudence, There is not a quick-and-easy way to do this at the moment. If you only added things to the topic map, then you could just merge the new XTM file with the existing persistent map - but that approach would not capture deletions and if you, for example, changed the type of an occurrence, you would then end up with two copies one with the old type and one with the new type (and it gets worse for associations). If the XTM file is the only one changing (i.e. if your persistent store does not get changed too), then you could just delete the topic map in the persistent store and reload from the XTM file. But if you have a more complex system then it is much more difficult - I think you would need to write an application to parse the XTM file and then compare the structures in the parsed topic map to the structures in the persistent topic map and make the appropriate changes. Another thought - can you reduce the complexity by splitting up your topic map ? You could make an "editing" topic map and an "imported" topic map in the persistent store where the "imported" topic map is loaded from the XTM file and the "editing" topic map is the one that can be changed through some user interface on the persistent store. Then you could use the Unified backend to dynamically merge the two maps for your display. In ascii art (fixed-font needed) +----------+ | XTM File | +----------+ | Import +---------------------|-----------+ | Persistent Store v | | +---------+ +----------+ | | | Editing | | Imported | | | | TM | | TM | | | +---------+ +----------+ | | /|\ | | | +----|-----|----------|-----------+ | v V | UNIFIED BACKEND | | +----|---------------|------------+ | | V App.| | EDITING PRESENTATION | +---------------------------------+ Actually, you could go one better and keep your editing topic map in the persistent store and always parse the XTM file into memory when the application starts up - the Unified backend should be able to handle working across the two different backend types. Does this help ? Cheers, Kal On Wed, 2004-02-18 at 20:45, Prudence Au wrote: > Hi all tm4j developers, > = > I am new to TM4J. I would like to know it is possible to update a topic = map that is already loaded in persistence storage? For example, I have alr= eady loaded a topic map in the database, and then I updated the xtm file. = Is there a method which allows me to load in the updates? = > = > Thanks in advance. > = > Prudence > = > = > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dclick > _______________________________________________ > Tm4j-developers mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-developers -- = Kal Ahmed <ka...@te...> techquila |