From: Lars H. <he...@se...> - 2006-06-12 14:13:12
|
Hi, [...] >> I want to use tolog in TMAPI to do some query about my topic map.How can I >> do it? And is there any reference manual? > The current TM4J tolog implementation uses the TM4J native model (but > you can use the tolog implementation with topic maps created with > TMAPI). > http://tm4j.org/docs/devguide/ch08.html#N11776 Note, that you've to "unwrap" the TMAPI topic map instance. Your code has to look like this: import org.tm4j.tmapi.helpers.Wrapper; // [...] // tmSystem points to your TopicMapSystem instance TopicMap tm = tmSystem.getTopicMap("http://example.org/"); QueryEvaluator qe = QueryEvaluatorFactory.newQueryEvaluator(Wrapper.unwrap(tm)); The Wrapper.unwrap call is important because the QueryEval.Fac. expects an instance of "org.tm4j.topicmap.TopicMap" (the native TM4j model). Best regards, Lars -- http://www.semagia.com http://www.topicgarden.com/mailinglist/ German Topic Maps mailinglist |