From: G?nther B. <br...@us...> - 2002-04-04 05:42:27
|
Update of /cvsroot/xpg-xml/edu/iicm/xpg/generator In directory usw-pr-cvs1:/tmp/cvs-serv31375/generator Modified Files: DocumentGenerator.java Generator.java Log Message: a little exception handling added Index: DocumentGenerator.java =================================================================== RCS file: /cvsroot/xpg-xml/edu/iicm/xpg/generator/DocumentGenerator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DocumentGenerator.java 8 Mar 2002 19:04:37 -0000 1.6 --- DocumentGenerator.java 4 Apr 2002 05:42:24 -0000 1.7 *************** *** 31,35 **** * @author Klaus Schmaranz * @author Heimo Haub ! * @author Günther Brand * @version $revision$ */ --- 31,35 ---- * @author Klaus Schmaranz * @author Heimo Haub ! * @author Guenther Brand * @version $revision$ */ *************** *** 57,90 **** generator.setHandlers(); generator.parseFile( args[1] ); - // String result = ( String ) generator.getResult(); - // FIXXME: writing result-buffer to outputfile - // should be a user defineable transition - /* try - { - String result_filename; - if ( args.length > 2 ) - result_filename = args[2]; - else - { - int dot_index = args[1].lastIndexOf('.'); - if (dot_index != -1) - result_filename = args[1].substring(0, dot_index) + ".html"; - else result_filename = args[1] + ".html"; - } - File result_file = new File ( result_filename ); - if ( result_file.exists() ) - result_file.delete(); - result_file.createNewFile(); - FileWriter file_writer = new FileWriter ( result_file ); - file_writer.write ( result, 0, result.length() ); - file_writer.flush(); - file_writer.close(); - } - catch ( IOException exc ) - { - System.err.println ( exc ); - } - */ System.exit(0); } --- 57,61 ---- Index: Generator.java =================================================================== RCS file: /cvsroot/xpg-xml/edu/iicm/xpg/generator/Generator.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Generator.java 8 Mar 2002 19:04:38 -0000 1.8 --- Generator.java 4 Apr 2002 05:42:24 -0000 1.9 *************** *** 33,37 **** * @author Klaus Schmaranz * @author Heimo Haub ! * @author Günther Brand * @author Stefan Thalauer * @version $revision$ --- 33,37 ---- * @author Klaus Schmaranz * @author Heimo Haub ! * @author Guenther Brand * @author Stefan Thalauer * @version $revision$ *************** *** 44,47 **** --- 44,48 ---- //---------------------------------------------------------------------- /** + * set up a new generator with the configfile * @param configfile the filename of the configfile */ *************** *** 55,68 **** initializer_ = new InitParser(config_file); initializer_.initialize(state_machine_); - } - - //---------------------------------------------------------------------- - /** - * @return the object that has been generated - */ - - public Object getResult() - { - return(data_.getObject(Const.RESULT_BUFFER).toString()); } --- 56,59 ---- |