From: Lars H. <he...@se...> - 2006-05-18 13:09:50
|
Hi, > I'm using the TMAPI and want to have the following codes be created. > <topic> > <occurrence> > <instanceOf> > <topicRef xlink href="#description"/> > </instanceOf> > <resourceData>chapter1</resourceData> > </occurrence> > </topic> The TMAPI code would look like: // Assuming that "tm" is your org.tmapi.core.TopicMap instance // Topic that should be used as type for the occurrence Topic descr = tm.createTopic(); // Creates a topic name with the value "description" in the // unconstrained scope descr.createTopicName("description", null); // The topic "t" is the topic that should contain the occurrence Topic t = tm.createTopic(); // Create the occurrence with type "descr" in the unconstrained // scope Occurrence occ = t.createOccurrence("chapter1", descr, null); [...] > I want to create the "occurrence" in Java but I have looked up the TMAPI > indexs and haven't find the appropriate method. Can you help me? Thanks! The TMAPI indexes are for lookup operations only. You cannot modify the topic map instance with the indexes. Best regards, Lars -- http://semagia.com http://topicgarden.com/mailinglist/ German Topic Maps mailinglist |