From: Edmund H. <so...@us...> - 2002-05-04 17:07:57
|
Update of /cvsroot/xpg-xml/edu/iicm/xpg/transitions/cvlatex In directory usw-pr-cvs1:/tmp/cvs-serv16510 Added Files: WriteGeneralFooterTransition.java WriteGeneralHeaderTransition.java Log Message: lebenslauf transitionen fuer latex --- NEW FILE: WriteGeneralFooterTransition.java --- /*********************************************************************** * @(#)$RCSfile: WriteGeneralFooterTransition.java,v $ $Revision: 1.1 $ $Date: 2002/05/04 17:07:54 $ * * 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.transitions.cvlatex; import edu.iicm.xpg.statemachine.Transition; import edu.iicm.xpg.statemachine.State; import edu.iicm.xpg.statemachine.StateMachine; import edu.iicm.xpg.statemachine.Input; import edu.iicm.xpg.statemachine.XMLInput; import edu.iicm.xpg.statemachine.DataObject; import edu.iicm.xpg.statemachine.Const; //---------------------------------------------------------------------- /** * @author Klaus Schmaranz * @author Günther Brand * @version $Revision: 1.1 $ */ public class WriteGeneralFooterTransition implements Transition { //---------------------------------------------------------------------- /** * @param input the input that triggered this transition * @param from_state the start state for this transition * @param to_state the destination state for this transition * @param machine the state machine that this transition belongs to * @param data user defined data * @return * @exception Exception whatever an implementation can throw */ public String transitionTriggered(Input input,State from_state,State to_state, StateMachine machine,DataObject data) throws Exception { StringBuffer document = (StringBuffer)data.getObject(Const.RESULT_BUFFER); String place = (String)data.getObject("place"); document.append("\\noindent "+ place + ", \\today\n"+ "\\end{document}"); System.out.println(document.toString()); return(null); } } --- NEW FILE: WriteGeneralHeaderTransition.java --- /*********************************************************************** * @(#)$RCSfile: WriteGeneralHeaderTransition.java,v $ $Revision: 1.1 $ $Date: 2002/05/04 17:07:54 $ * * 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.transitions.cvlatex; import edu.iicm.xpg.statemachine.Transition; import edu.iicm.xpg.statemachine.State; import edu.iicm.xpg.statemachine.StateMachine; import edu.iicm.xpg.statemachine.Input; import edu.iicm.xpg.statemachine.XMLInput; import edu.iicm.xpg.statemachine.DataObject; import edu.iicm.xpg.statemachine.Const; //---------------------------------------------------------------------- /** * @author Klaus Schmaranz * @version $Revision: 1.1 $ */ public class WriteGeneralHeaderTransition implements Transition { //---------------------------------------------------------------------- /** * @param input the input that triggered this transition * @param from_state the start state for this transition * @param to_state the destination state for this transition * @param machine the state machine that this transition belongs to * @param data user defined data * @return * @exception Exception whatever an implementation can throw */ public String transitionTriggered(Input input,State from_state,State to_state, StateMachine machine,DataObject data) throws Exception { StringBuffer document = new StringBuffer(); document.append("\\documentclass[a4paper]{article}\n\n"+ "\\usepackage{tabularx}\n"+ "\\usepackage{german}\n"+ "\\usepackage{isolatin1}\n\n"+ "\\usepackage{ae}\n"+ "\\usepackage[T1]{fontenc}\n"+ "\\usepackage{CV}\n\n"+ "\\begin{document}\n\n"+ "\\pagestyle{empty}\n\n"); data.putObject(Const.RESULT_BUFFER, document); return(null); } } |