From: Stefan T. <th...@us...> - 2002-01-30 16:33:24
|
Update of /cvsroot/xpg-xml/edu/iicm/xpg/generator In directory usw-pr-cvs1:/tmp/cvs-serv8793 Modified Files: DocumentGenerator.java Log Message: dos2unix Index: DocumentGenerator.java =================================================================== RCS file: /cvsroot/xpg-xml/edu/iicm/xpg/generator/DocumentGenerator.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** DocumentGenerator.java 2002/01/29 10:43:15 1.1.1.1 --- DocumentGenerator.java 2002/01/30 16:33:20 1.2 *************** *** 1,79 **** ! /*********************************************************************** ! * @(#)$RCSfile$ $Revision$ $Date$ ! * ! * Copyright (c) 2001 IICM, Graz University of Technology ! * Schiesstattgasse 4a, A-8010 Graz, Austria. ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU Lesser General Public License (LGPL) ! * as published by the Free Software Foundation; either version 2.1 of ! * the License, or (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this program; if not, write to the ! * Free Software Foundation, Inc., ! * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! ***********************************************************************/ ! ! ! package edu.iicm.xpg.generator; ! ! import java.io.FileWriter; ! import java.io.File; ! import java.io.IOException; ! ! //---------------------------------------------------------------------- ! /** ! * @author Klaus Schmaranz ! * @author Heimo Haub ! * @author Günther Brand ! * @version $revision$ ! */ ! ! public class DocumentGenerator ! { ! ! //---------------------------------------------------------------------- ! /** ! * @param args command line arguments ! * @return the exit value ! */ ! ! public static void main(String[] args) ! { ! if (args.length <= 1) ! { ! System.err.println("usage: DocumentGenerator <config_file> <xml_filename>"); ! System.exit(-1); ! } ! ! Generator generator = new Generator( args[0] + ".xml", args[1] + ".xml" ); ! String result = ( String ) generator.getResult(); ! ! // write resultstring to file ! try ! { ! File result_file = new File ( args[1] + ".html" ); ! 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); ! } ! } ! ! --- 1,78 ---- ! /*********************************************************************** ! * @(#)$RCSfile$ $Revision$ $Date$ ! * ! * Copyright (c) 2001 IICM, Graz University of Technology ! * Schiesstattgasse 4a, A-8010 Graz, Austria. ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU Lesser General Public License (LGPL) ! * as published by the Free Software Foundation; either version 2.1 of ! * the License, or (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public ! * License along with this program; if not, write to the ! * Free Software Foundation, Inc., ! * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! ***********************************************************************/ ! ! package edu.iicm.xpg.generator; ! ! import java.io.FileWriter; ! import java.io.File; ! import java.io.IOException; ! ! //---------------------------------------------------------------------- ! /** ! * @author Klaus Schmaranz ! * @author Heimo Haub ! * @author Günther Brand ! * @version $revision$ ! */ ! ! public class DocumentGenerator ! { ! ! //---------------------------------------------------------------------- ! /** ! * @param args command line arguments ! * @return the exit value ! */ ! ! public static void main(String[] args) ! { ! if (args.length <= 1) ! { ! System.err.println("usage: DocumentGenerator <config_file> <xml_filename>"); ! System.exit(-1); ! } ! ! Generator generator = new Generator( args[0] + ".xml", args[1] + ".xml" ); ! String result = ( String ) generator.getResult(); ! ! // write resultstring to file ! try ! { ! File result_file = new File ( args[1] + ".html" ); ! 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); ! } ! } ! ! |