From: Oliver L. <ol...@le...> - 2005-05-30 01:33:37
|
Hi there, I'm contributing the AsTMa= importer 4 TM4J, see attachment. -Imports AsTMa= topic maps (.atm) to TM4J -the included jakarta-oro jar is required, J2SE1.3 compliant -creates Topic Maps in TMAPI and also returns Topic Maps in TM4J-API -resides in org/tm4j/topicmap/utils (ATM*) -test cases are provided in org/tm4j/topicmaps/utils/test -further AsTMa= topic maps can be obtained from http://astma.it.bond.edu.au/authoring.xsp e.g. the sumo topic map -Usage: org.tm4j.topicmap.TopicMap t = provider.addTopicMap(new SerializedTopicMapSource(filename.atm)); -ATMPreLexer.java (temporarily?) has a main()-method for easy usage test -Call sequence: YourClass, ATMBuilder, ATMPreLexer, ATMLexer and ATMParser -ASTMAImporter.java is the integration of the AsTMa= importer in tmapi-utils(.sf.net), tmapi-utils usage: org.tmapi.core.TopicMap tMap = astmaImporter.parse(filename.atm); -ATMParser.java, ATMLexer.java and ATMParserTokenTypes.java can be generated from the antlr grammar file ATM.g by executing "java antlr.Tool ATM.g" -tested with tm4j 0.9.6 and 0.9.7 -should work (tm) Oliver Leimig |