Importing XML Topic Maps (XTM)ΒΆ
To import topic maps encoded in XTM, tinyTiM offers the XTM10TopicMapReader to deserialize XTM 1.0 topic maps, the XTM20TopicMapReader to read XTM 2.0 topic maps, and the XTMTopicMapReader which provides support for XTM 1.0 and 2.0. All implementations require the semagia-mio-0.9.3.jar and the semagia-mio-xtm-0.9.3.jar in the classpath. If the source should be validated the jing.jar is needed as well.
Basic usage of the XTM20TopicMapReader:
import org.tinytim.mio.TopicMapReader;
import org.tinytim.mio.XTM20TopicMapReader;
// ``tm`` is an instance of org.tmapi.core.TopicMap
File source = new File("./mymap.xtm");
TopicMapReader reader = new XTM20TopicMapReader(tm, source);
reader.read();
Basic usage of the XTM10TopicMapReader:
import org.tinytim.mio.TopicMapReader;
import org.tinytim.mio.XTM10TopicMapReader;
// ``tm`` is an instance of org.tmapi.core.TopicMap
File source = new File("./mymap.xtm");
TopicMapReader reader = new XTM10TopicMapReader(tm, source);
reader.read();

