From: Conal T. <Con...@vu...> - 2004-09-27 06:38:51
|
I recently switched from Hibernate to the In-Memory back-end and I now = have a slight problem with persistence of subject indicators. With the = In-Memory back-end you have to write the topic map to an XTM file to = persist it. I THINK that all my subject indicators are in the topic map = in memory, but are not written to my XTM, and this causes a problem next = time I load the map.=20 My TM is built by merging a bunch of XTM files which are harvested from = various sources, and also including some ontological topicmaps. For = instance I have an ontology file with a base-locator of = http://www.nzetc.org/tm/harvest/xtm/nzetc-ontology.xtm which includes = for instance a topic with id =3D "pdf-file". When I save my central = (merged) XTM file I get the topic written out just the same way, as a = topic with id=3D"pdf-file", but with no<subjectIdentity>. Because the = base locator of the merged file is different to the base locator of the = ontology, I won't be able to refer to the same topic in a different = file, using a full URI: http://www.nzetc.org/tm/harvest/xtm/nzetc-ontology.xtm#pdf-file ... because this subject indicator just isn't present in the (merged) = XTM file I save. I've looked at the source code of the TopicMapWalker and the XTMWriter = and it looks like it should work, but I get nothing in my output. So long as I have Cocoon running, and my topic map in memory, then I can = merge topic maps into it and everything is fine; the topics merge as = they should (this is why I think the subject indicators ARE present in = memory), but as soon as I save the merged XTM and reload it, then my = original subject indicators are gone and everything turns to custard. Any ideas? Con |
From: Kal A. <ka...@te...> - 2004-09-27 07:20:45
|
Hi Conal, Do your input topic maps have <subjectIndicator> elements in them ? (or if you are harvesting them using TMHarvest, do you set the subjectIndicator property) ? My guess is that you are only setting the sourceLocator property. So your topic with the id pdf-file gets a source locator http://www.nztec.org/tm/harvest/xtm/nztec-ontology.xtm#pdf-file, but does not get a subjectIndicator. By default, the XTM exporter tries to be "clever" and if you export a TM with a base locator http://foo.xtm then all source locators of the format http://foo.xtm#bar get exported as an ID attribute with the value bar. The merging works in memory because if topic A has sourceLocator foo and topic B has a subjectIndicator foo, then the topics must be merged. When you round trip to external files, however you will lose that sourceLocator. My advice is to explicitly set the subject indicators in your ontology topic map. Hope this helps! Cheers, Kal On Mon, 2004-09-27 at 07:35, Conal Tuohy wrote: > I recently switched from Hibernate to the In-Memory back-end and I now have a slight problem with persistence of subject indicators. With the In-Memory back-end you have to write the topic map to an XTM file to persist it. I THINK that all my subject indicators are in the topic map in memory, but are not written to my XTM, and this causes a problem next time I load the map. > > My TM is built by merging a bunch of XTM files which are harvested from various sources, and also including some ontological topicmaps. For instance I have an ontology file with a base-locator of http://www.nzetc.org/tm/harvest/xtm/nzetc-ontology.xtm which includes for instance a topic with id = "pdf-file". When I save my central (merged) XTM file I get the topic written out just the same way, as a topic with id="pdf-file", but with no<subjectIdentity>. Because the base locator of the merged file is different to the base locator of the ontology, I won't be able to refer to the same topic in a different file, using a full URI: > http://www.nzetc.org/tm/harvest/xtm/nzetc-ontology.xtm#pdf-file > ... because this subject indicator just isn't present in the (merged) XTM file I save. > > I've looked at the source code of the TopicMapWalker and the XTMWriter and it looks like it should work, but I get nothing in my output. > > So long as I have Cocoon running, and my topic map in memory, then I can merge topic maps into it and everything is fine; the topics merge as they should (this is why I think the subject indicators ARE present in memory), but as soon as I save the merged XTM and reload it, then my original subject indicators are gone and everything turns to custard. > > Any ideas? > > Con > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users -- Kal Ahmed <ka...@te...> techquila |
From: Christoph F. <cf...@fo...> - 2004-09-27 07:38:15
|
Am Mo, den 27.09.2004 schrieb Kal Ahmed um 9:26: > Hi Conal, > > Do your input topic maps have <subjectIndicator> elements in them ? (or > if you are harvesting them using TMHarvest, do you set the > subjectIndicator property) ? My guess is that you are only setting the > sourceLocator property. If its possible to do the merging and harvesting with tmnav, you should see the subject indicators either when using the section renderer or when using hypergraph/touchgraph renderer with the extended abstractor. The latter two display them with a green circle that is labeled "si" c -- Christoph Froehlich <cf...@fo...> |