| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc on Wed Apr 14 08:26:35 EDT 2004 --> |
| <TITLE> |
| Velocity 1.4 API: Class Generator |
| </TITLE> |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| </HEAD> |
| <BODY BGCOLOR="white"> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Generator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV CLASS |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="Generator.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.velocity.texen</FONT> |
| <BR> |
| Class Generator</H2> |
| <PRE> |
| java.lang.Object |
| | |
| +--<B>org.apache.velocity.texen.Generator</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT>public class <B>Generator</B><DT>extends java.lang.Object</DL> |
| |
| <P> |
| A text/code generator class |
| <P> |
| <DL> |
| <DT><B>Version: </B><DD>$Id: Generator.java,v 1.20.4.1 2004/03/03 23:23:07 geirm Exp $</DD> |
| <DT><B>Author: </B><DD><a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>, <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a></DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- ======== INNER CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private <A HREF="../../../../org/apache/velocity/context/Context.html">Context</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#controlContext">controlContext</A></B></CODE> |
| |
| <BR> |
| Context used for generating the texen output.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#DEFAULT_TEXEN_PROPERTIES">DEFAULT_TEXEN_PROPERTIES</A></B></CODE> |
| |
| <BR> |
| Default properties file used for controlling the |
| tools placed in the context.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#inputEncoding">inputEncoding</A></B></CODE> |
| |
| <BR> |
| This is the encoding for the input file(s) |
| (templates).</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private static <A HREF="../../../../org/apache/velocity/texen/Generator.html">Generator</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#instance">instance</A></B></CODE> |
| |
| <BR> |
| The generator tools used for creating additional |
| output withing the control template.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#OUTPUT_PATH">OUTPUT_PATH</A></B></CODE> |
| |
| <BR> |
| Where the texen output will placed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#outputEncoding">outputEncoding</A></B></CODE> |
| |
| <BR> |
| This is the encoding for the output file(s).</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private java.util.Properties</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#props">props</A></B></CODE> |
| |
| <BR> |
| Default properties used by texen.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#TEMPLATE_PATH">TEMPLATE_PATH</A></B></CODE> |
| |
| <BR> |
| Where the velocity templates live.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/apache/velocity/app/VelocityEngine.html">VelocityEngine</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#ve">ve</A></B></CODE> |
| |
| <BR> |
| Velocity engine.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private java.util.Hashtable</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#writers">writers</A></B></CODE> |
| |
| <BR> |
| Keep track of the file writers used for outputting |
| to files.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>private </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#Generator()">Generator</A></B>()</CODE> |
| |
| <BR> |
| Default constructor.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#Generator(java.util.Properties)">Generator</A></B>(java.util.Properties props)</CODE> |
| |
| <BR> |
| Create a new Generator object with a given property |
| set.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#Generator(java.lang.String)">Generator</A></B>(java.lang.String propFile)</CODE> |
| |
| <BR> |
| Create a new generator object with properties loaded from |
| a file.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#fillContextDefaults(org.apache.velocity.context.Context)">fillContextDefaults</A></B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> context)</CODE> |
| |
| <BR> |
| Add properties that will aways be in the context by default</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#fillContextHash(org.apache.velocity.context.Context, java.util.Hashtable)">fillContextHash</A></B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> context, |
| java.util.Hashtable objs)</CODE> |
| |
| <BR> |
| Add all the contents of a Hashtable to the context.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#fillContextProperties(org.apache.velocity.context.Context)">fillContextProperties</A></B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> context)</CODE> |
| |
| <BR> |
| Add objects to the context from the current properties.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected <A HREF="../../../../org/apache/velocity/context/Context.html">Context</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#getContext(java.util.Hashtable)">getContext</A></B>(java.util.Hashtable objs)</CODE> |
| |
| <BR> |
| Create a new context and fill it with the elements of the |
| objs Hashtable.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/velocity/texen/Generator.html">Generator</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#getInstance()">getInstance</A></B>()</CODE> |
| |
| <BR> |
| Create a new generator object with default properties.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#getOutputPath()">getOutputPath</A></B>()</CODE> |
| |
| <BR> |
| Get the output path for the generated |
| output.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/velocity/Template.html">Template</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#getTemplate(java.lang.String, java.lang.String)">getTemplate</A></B>(java.lang.String templateName, |
| java.lang.String encoding)</CODE> |
| |
| <BR> |
| Returns a template, based on encoding and path.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#getTemplatePath()">getTemplatePath</A></B>()</CODE> |
| |
| <BR> |
| Get the template path.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.io.Writer</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#getWriter(java.lang.String, java.lang.String)">getWriter</A></B>(java.lang.String path, |
| java.lang.String encoding)</CODE> |
| |
| <BR> |
| Returns a writer, based on encoding and path.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#parse(java.lang.String, org.apache.velocity.context.Context)">parse</A></B>(java.lang.String controlTemplate, |
| <A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> controlContext)</CODE> |
| |
| <BR> |
| Parse the control template and merge it with the control |
| context.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#parse(java.lang.String, java.lang.String)">parse</A></B>(java.lang.String inputTemplate, |
| java.lang.String outputFile)</CODE> |
| |
| <BR> |
| Parse an input and write the output to an output file.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#parse(java.lang.String, java.lang.String, java.lang.String, java.lang.Object)">parse</A></B>(java.lang.String inputTemplate, |
| java.lang.String outputFile, |
| java.lang.String objectID, |
| java.lang.Object object)</CODE> |
| |
| <BR> |
| Parse an input and write the output to an output file.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#parse(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)">parse</A></B>(java.lang.String inputTemplate, |
| java.lang.String intputEncoding, |
| java.lang.String outputFile, |
| java.lang.String outputEncoding, |
| java.lang.String objectID, |
| java.lang.Object object)</CODE> |
| |
| <BR> |
| Parse an input and write the output to an output file.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#setDefaultProps()">setDefaultProps</A></B>()</CODE> |
| |
| <BR> |
| Set default properties.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#setInputEncoding(java.lang.String)">setInputEncoding</A></B>(java.lang.String inputEncoding)</CODE> |
| |
| <BR> |
| Set the input (template) encoding.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#setOutputEncoding(java.lang.String)">setOutputEncoding</A></B>(java.lang.String outputEncoding)</CODE> |
| |
| <BR> |
| Set the output encoding.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#setOutputPath(java.lang.String)">setOutputPath</A></B>(java.lang.String outputPath)</CODE> |
| |
| <BR> |
| Set the output path for the generated |
| output.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#setTemplatePath(java.lang.String)">setTemplatePath</A></B>(java.lang.String templatePath)</CODE> |
| |
| <BR> |
| Set the template path, where Texen will look |
| for Velocity templates.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#setVelocityEngine(org.apache.velocity.app.VelocityEngine)">setVelocityEngine</A></B>(<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html">VelocityEngine</A> ve)</CODE> |
| |
| <BR> |
| Set the velocity engine.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/velocity/texen/Generator.html#shutdown()">shutdown</A></B>()</CODE> |
| |
| <BR> |
| Properly shut down the generator, right now |
| this is simply flushing and closing the file |
| writers that we have been holding on to.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.lang.Object</B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><clinit>, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="OUTPUT_PATH"><!-- --></A><H3> |
| OUTPUT_PATH</H3> |
| <PRE> |
| public static final java.lang.String <B>OUTPUT_PATH</B></PRE> |
| <DL> |
| <DD>Where the texen output will placed.</DL> |
| <HR> |
| |
| <A NAME="TEMPLATE_PATH"><!-- --></A><H3> |
| TEMPLATE_PATH</H3> |
| <PRE> |
| public static final java.lang.String <B>TEMPLATE_PATH</B></PRE> |
| <DL> |
| <DD>Where the velocity templates live.</DL> |
| <HR> |
| |
| <A NAME="DEFAULT_TEXEN_PROPERTIES"><!-- --></A><H3> |
| DEFAULT_TEXEN_PROPERTIES</H3> |
| <PRE> |
| private static final java.lang.String <B>DEFAULT_TEXEN_PROPERTIES</B></PRE> |
| <DL> |
| <DD>Default properties file used for controlling the |
| tools placed in the context.</DL> |
| <HR> |
| |
| <A NAME="props"><!-- --></A><H3> |
| props</H3> |
| <PRE> |
| private java.util.Properties <B>props</B></PRE> |
| <DL> |
| <DD>Default properties used by texen.</DL> |
| <HR> |
| |
| <A NAME="controlContext"><!-- --></A><H3> |
| controlContext</H3> |
| <PRE> |
| private <A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> <B>controlContext</B></PRE> |
| <DL> |
| <DD>Context used for generating the texen output.</DL> |
| <HR> |
| |
| <A NAME="writers"><!-- --></A><H3> |
| writers</H3> |
| <PRE> |
| private java.util.Hashtable <B>writers</B></PRE> |
| <DL> |
| <DD>Keep track of the file writers used for outputting |
| to files. If we come across a file writer more |
| then once then the additional output will be |
| appended to the file instead of overwritting |
| the contents.</DL> |
| <HR> |
| |
| <A NAME="instance"><!-- --></A><H3> |
| instance</H3> |
| <PRE> |
| private static <A HREF="../../../../org/apache/velocity/texen/Generator.html">Generator</A> <B>instance</B></PRE> |
| <DL> |
| <DD>The generator tools used for creating additional |
| output withing the control template. This could |
| use some cleaning up.</DL> |
| <HR> |
| |
| <A NAME="outputEncoding"><!-- --></A><H3> |
| outputEncoding</H3> |
| <PRE> |
| protected java.lang.String <B>outputEncoding</B></PRE> |
| <DL> |
| <DD>This is the encoding for the output file(s).</DL> |
| <HR> |
| |
| <A NAME="inputEncoding"><!-- --></A><H3> |
| inputEncoding</H3> |
| <PRE> |
| protected java.lang.String <B>inputEncoding</B></PRE> |
| <DL> |
| <DD>This is the encoding for the input file(s) |
| (templates).</DL> |
| <HR> |
| |
| <A NAME="ve"><!-- --></A><H3> |
| ve</H3> |
| <PRE> |
| protected <A HREF="../../../../org/apache/velocity/app/VelocityEngine.html">VelocityEngine</A> <B>ve</B></PRE> |
| <DL> |
| <DD>Velocity engine.</DL> |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="Generator()"><!-- --></A><H3> |
| Generator</H3> |
| <PRE> |
| private <B>Generator</B>()</PRE> |
| <DL> |
| <DD>Default constructor.</DL> |
| <HR> |
| |
| <A NAME="Generator(java.lang.String)"><!-- --></A><H3> |
| Generator</H3> |
| <PRE> |
| public <B>Generator</B>(java.lang.String propFile)</PRE> |
| <DL> |
| <DD>Create a new generator object with properties loaded from |
| a file. If the file does not exist or any other exception |
| occurs during the reading operation the default properties |
| are used.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - properties used to help populate the control context.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="Generator(java.util.Properties)"><!-- --></A><H3> |
| Generator</H3> |
| <PRE> |
| public <B>Generator</B>(java.util.Properties props)</PRE> |
| <DL> |
| <DD>Create a new Generator object with a given property |
| set. The property set will be duplicated.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>Properties</CODE> - properties object to help populate the control context.</DL> |
| </DD> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="getInstance()"><!-- --></A><H3> |
| getInstance</H3> |
| <PRE> |
| public static <A HREF="../../../../org/apache/velocity/texen/Generator.html">Generator</A> <B>getInstance</B>()</PRE> |
| <DL> |
| <DD>Create a new generator object with default properties.<DD><DL> |
| <DT><B>Returns:</B><DD>Generator generator used in the control context.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setVelocityEngine(org.apache.velocity.app.VelocityEngine)"><!-- --></A><H3> |
| setVelocityEngine</H3> |
| <PRE> |
| public void <B>setVelocityEngine</B>(<A HREF="../../../../org/apache/velocity/app/VelocityEngine.html">VelocityEngine</A> ve)</PRE> |
| <DL> |
| <DD>Set the velocity engine.</DL> |
| <HR> |
| |
| <A NAME="setDefaultProps()"><!-- --></A><H3> |
| setDefaultProps</H3> |
| <PRE> |
| protected void <B>setDefaultProps</B>()</PRE> |
| <DL> |
| <DD>Set default properties.</DL> |
| <HR> |
| |
| <A NAME="setTemplatePath(java.lang.String)"><!-- --></A><H3> |
| setTemplatePath</H3> |
| <PRE> |
| public void <B>setTemplatePath</B>(java.lang.String templatePath)</PRE> |
| <DL> |
| <DD>Set the template path, where Texen will look |
| for Velocity templates.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - template path for velocity templates.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getTemplatePath()"><!-- --></A><H3> |
| getTemplatePath</H3> |
| <PRE> |
| public java.lang.String <B>getTemplatePath</B>()</PRE> |
| <DL> |
| <DD>Get the template path.<DD><DL> |
| <DT><B>Returns:</B><DD>String template path for velocity templates.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setOutputPath(java.lang.String)"><!-- --></A><H3> |
| setOutputPath</H3> |
| <PRE> |
| public void <B>setOutputPath</B>(java.lang.String outputPath)</PRE> |
| <DL> |
| <DD>Set the output path for the generated |
| output.<DD><DL> |
| <DT><B>Returns:</B><DD>String output path for texen output.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getOutputPath()"><!-- --></A><H3> |
| getOutputPath</H3> |
| <PRE> |
| public java.lang.String <B>getOutputPath</B>()</PRE> |
| <DL> |
| <DD>Get the output path for the generated |
| output.<DD><DL> |
| <DT><B>Returns:</B><DD>String output path for texen output.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setOutputEncoding(java.lang.String)"><!-- --></A><H3> |
| setOutputEncoding</H3> |
| <PRE> |
| public void <B>setOutputEncoding</B>(java.lang.String outputEncoding)</PRE> |
| <DL> |
| <DD>Set the output encoding.</DL> |
| <HR> |
| |
| <A NAME="setInputEncoding(java.lang.String)"><!-- --></A><H3> |
| setInputEncoding</H3> |
| <PRE> |
| public void <B>setInputEncoding</B>(java.lang.String inputEncoding)</PRE> |
| <DL> |
| <DD>Set the input (template) encoding.</DL> |
| <HR> |
| |
| <A NAME="getWriter(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| getWriter</H3> |
| <PRE> |
| public java.io.Writer <B>getWriter</B>(java.lang.String path, |
| java.lang.String encoding) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Returns a writer, based on encoding and path.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>path</CODE> - path to the output file<DD><CODE>encoding</CODE> - output encoding</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getTemplate(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| getTemplate</H3> |
| <PRE> |
| public <A HREF="../../../../org/apache/velocity/Template.html">Template</A> <B>getTemplate</B>(java.lang.String templateName, |
| java.lang.String encoding) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Returns a template, based on encoding and path.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>templateName</CODE> - name of the template<DD><CODE>encoding</CODE> - template encoding</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parse(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| parse</H3> |
| <PRE> |
| public java.lang.String <B>parse</B>(java.lang.String inputTemplate, |
| java.lang.String outputFile) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Parse an input and write the output to an output file. If the |
| output file parameter is null or an empty string the result is |
| returned as a string object. Otherwise an empty string is returned.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - input template<DD><CODE>String</CODE> - output file</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parse(java.lang.String, java.lang.String, java.lang.String, java.lang.Object)"><!-- --></A><H3> |
| parse</H3> |
| <PRE> |
| public java.lang.String <B>parse</B>(java.lang.String inputTemplate, |
| java.lang.String outputFile, |
| java.lang.String objectID, |
| java.lang.Object object) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Parse an input and write the output to an output file. If the |
| output file parameter is null or an empty string the result is |
| returned as a string object. Otherwise an empty string is returned. |
| You can add objects to the context with the objs Hashtable.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - input template<DD><CODE>String</CODE> - output file<DD><CODE>String</CODE> - id for object to be placed in the control context<DD><CODE>String</CODE> - object to be placed in the context<DT><B>Returns:</B><DD>String generated output from velocity</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parse(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)"><!-- --></A><H3> |
| parse</H3> |
| <PRE> |
| public java.lang.String <B>parse</B>(java.lang.String inputTemplate, |
| java.lang.String intputEncoding, |
| java.lang.String outputFile, |
| java.lang.String outputEncoding, |
| java.lang.String objectID, |
| java.lang.Object object) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Parse an input and write the output to an output file. If the |
| output file parameter is null or an empty string the result is |
| returned as a string object. Otherwise an empty string is returned. |
| You can add objects to the context with the objs Hashtable.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - input template<DD><CODE>String</CODE> - inputEncoding template encoding<DD><CODE>String</CODE> - output file<DD><CODE>String</CODE> - outputEncoding encoding of output file<DD><CODE>String</CODE> - id for object to be placed in the control context<DD><CODE>String</CODE> - object to be placed in the context<DT><B>Returns:</B><DD>String generated output from velocity</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parse(java.lang.String, org.apache.velocity.context.Context)"><!-- --></A><H3> |
| parse</H3> |
| <PRE> |
| public java.lang.String <B>parse</B>(java.lang.String controlTemplate, |
| <A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> controlContext) |
| throws java.lang.Exception</PRE> |
| <DL> |
| <DD>Parse the control template and merge it with the control |
| context. This is the starting point in texen.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>String</CODE> - control template<DD><CODE>Context</CODE> - control context<DT><B>Returns:</B><DD>String generated output</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getContext(java.util.Hashtable)"><!-- --></A><H3> |
| getContext</H3> |
| <PRE> |
| protected <A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> <B>getContext</B>(java.util.Hashtable objs)</PRE> |
| <DL> |
| <DD>Create a new context and fill it with the elements of the |
| objs Hashtable. Default objects and objects that comes from |
| the properties of this Generator object is also added.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>Hashtable</CODE> - objects to place in the control context<DT><B>Returns:</B><DD>Context context filled with objects</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="fillContextHash(org.apache.velocity.context.Context, java.util.Hashtable)"><!-- --></A><H3> |
| fillContextHash</H3> |
| <PRE> |
| protected void <B>fillContextHash</B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> context, |
| java.util.Hashtable objs)</PRE> |
| <DL> |
| <DD>Add all the contents of a Hashtable to the context.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>Context</CODE> - context to fill with objects<DD><CODE>Hashtable</CODE> - source of objects</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="fillContextDefaults(org.apache.velocity.context.Context)"><!-- --></A><H3> |
| fillContextDefaults</H3> |
| <PRE> |
| protected void <B>fillContextDefaults</B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> context)</PRE> |
| <DL> |
| <DD>Add properties that will aways be in the context by default<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>Context</CODE> - control context to fill with default values.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="fillContextProperties(org.apache.velocity.context.Context)"><!-- --></A><H3> |
| fillContextProperties</H3> |
| <PRE> |
| protected void <B>fillContextProperties</B>(<A HREF="../../../../org/apache/velocity/context/Context.html">Context</A> context)</PRE> |
| <DL> |
| <DD>Add objects to the context from the current properties.<DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>Context</CODE> - control context to fill with objects |
| that are specified in the default.properties |
| file</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="shutdown()"><!-- --></A><H3> |
| shutdown</H3> |
| <PRE> |
| public void <B>shutdown</B>()</PRE> |
| <DL> |
| <DD>Properly shut down the generator, right now |
| this is simply flushing and closing the file |
| writers that we have been holding on to.</DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Generator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV CLASS |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="Generator.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| Copyright © 2002 Apache Software Foundation. All Rights Reserved. |
| </BODY> |
| </HTML> |