From: Felipe M. A. <fm...@er...> - 2005-01-30 22:04:09
|
Hello all: Could you help me with locators? How can I reference topics in other Topic Map? Locator base = miProvider.getLocatorFactory().createLocator("URI", "topicmapbase"); tmBBDD = miProvider.createTopicMap(base); Topic t1 = tmBBDD.createTopic("topicbase1"); Topic t2 = tmBBDD.createTopic("topicbase2"); t2.addType(t1); Locator locProyecto = miProvider.getLocatorFactory().createLocator("URI", anagrama); TopicMap tmProy = miProvider.createTopicMap(locProyecto); Topic tActual = tmProy.createTopic("Prueba"); tActual.addType(t1); <?xml version="1.0" encoding="UTF-8"?> <topicMap id="x1kigidtb7-0" xml:base="topicmapbase" xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink"> <topic id="topicbase1"/> <topic id="topicbase2"> <instanceOf> <topicRef xlink:href="#topicbase1"/> </instanceOf> </topic> </topicMap> <?xml version="1.0" encoding="UTF-8"?> <topicMap id="x1kigidtb7-1" xml:base="proyectoxxx" xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink"> <topic id="Prueba"> <instanceOf> <topicRef xlink:href="#topicbase1"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="kkk"/> </subjectIdentity> </topic> </topicMap> and I want: <topic id="Prueba"> <instanceOf> <topicRef xlink:href="topicmapbase#topicbase1"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="kkk"/> </subjectIdentity> </topic> I'am using tm4j-0.9.7 and hibernate backend. Thanks in advance. Felipe |