From: Kal A. <ka...@te...> - 2005-05-30 06:34:10
|
Hi Oliver, Thanks for the contribution! I've taken a look over the code and I have a couple of questions: 1) Why is the preparsing step required ? Is there something too complex for antlr to handle in there ? 2) If the preparsing step is really needed, could we use jakarta-regexp as the regular expression library instead of jakarta-oro. It is just that jakarta-regexp is already present in the TM4J distribution and I would prefer not to have two regular expression libraries in there! Great work BTW :-) Cheers, Kal Oliver Leimig wrote: >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 > > |