From: Lars H. <he...@se...> - 2006-02-15 16:30:10
|
Hi Lars, [...] > I would like to merge topicmaps by using TMAPI and write the result into a > XTM file. So I use the mergIn(TopicMap) method. But when I use the > serialize(OutPutStream, TopicMap) method from the tmapi-utils library I get > the following error: > java.lang.NullPointerException [...] Just for clarification: You don't get the NPE if you export a topic map that has *not* been merged with another topic map? Something like the following works: TopicMap tm = null; try { tm = tmSys.createTopicMap("http://somewhere.com/"); } catch (TMAPIException ex) { // [...] } Topic t = tm.createTopic(); TopicName tn = t.createTopicName("Hello World", null); for (int i=0; i < 5; i++) { Variant var = tn.createVariant("var_" + i, null); } serializeTopicMap(tm); Best regards, Lars -- http://semagia.com http://topicgarden.com/mailinglist/ German Topic Maps mailinglist |