com.objectwave.templateMerge
Class XMLTemplateWriter

java.lang.Object
  |
  +--com.objectwave.templateMerge.XMLTemplateWriter

public class XMLTemplateWriter
extends java.lang.Object

Used to dump the templates into an XML file

Version:
$ID: $
Author:
Zhou Cai

Field Summary
static java.lang.String encoding
          Default encode method.
 
Constructor Summary
XMLTemplateWriter()
           
XMLTemplateWriter(java.util.Enumeration tempList, java.io.BufferedWriter buff)
          Constructor
 
Method Summary
protected  void writeTemplateBody(MergeTemplate template)
          Write the template body
protected  void writeTemplateName(MergeTemplate template)
          Write the template name
protected  void writeTemplatePost(MergeTemplate template)
          Write the template post
protected  void writeTemplatePre(MergeTemplate template)
          Write the template pre
protected  void writeXML()
          Write the template list to the output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encoding

public static final java.lang.String encoding
Default encode method.

See Also:
Constant Field Values
Constructor Detail

XMLTemplateWriter

public XMLTemplateWriter()

XMLTemplateWriter

public XMLTemplateWriter(java.util.Enumeration tempList,
                         java.io.BufferedWriter buff)
                  throws ConfigurationException
Constructor

Parameters:
tempList - Enumeration Template array
buff - BufferedWriter Output Stream
Method Detail

writeXML

protected void writeXML()
                 throws ConfigurationException
Write the template list to the output stream

Throws:
ConfigurationException - If any error happen in the XML file writing

writeTemplateName

protected void writeTemplateName(MergeTemplate template)
                          throws ConfigurationException
Write the template name

Parameters:
template - MergeTemplate the template to be written
Throws:
ConfigurationException - If any error happen in the writing of template name

writeTemplatePre

protected void writeTemplatePre(MergeTemplate template)
                         throws ConfigurationException
Write the template pre

Parameters:
template - MergeTemplate the template to be written
Throws:
ConfigurationException - If any error happen in the writing of template pre

writeTemplateBody

protected void writeTemplateBody(MergeTemplate template)
                          throws ConfigurationException
Write the template body

Parameters:
template - MergeTemplate the template to be written
Throws:
ConfigurationException - If any error happen in the writing of template body

writeTemplatePost

protected void writeTemplatePost(MergeTemplate template)
                          throws ConfigurationException
Write the template post

Parameters:
template - MergeTemplate the template to be written
Throws:
ConfigurationException - If any error happen in the writing of template post