org.millscript.millscript.render
Class TXTRenderer

java.lang.Object
  extended by org.millscript.millscript.render.AbstractRenderer
      extended by org.millscript.millscript.render.TXTRenderer
All Implemented Interfaces:
Renderer

public final class TXTRenderer
extends AbstractRenderer

This class implements MillScripts TXT renderer. It renders to a plain text file.


Field Summary
protected  java.io.PrintWriter outputPrintWriter
          The writer we are rendering into.
 
Fields inherited from class org.millscript.millscript.render.AbstractRenderer
availableEntities, config, outputCharset, outputEncoder, outputVFile, outputWriter
 
Constructor Summary
TXTRenderer(Configuration conf, org.millscript.commons.vfs.VFile file)
          Constructs a new TXT renderer, to render to the specified virtual file using the given confguration.
 
Method Summary
 void append(char ch)
          Appends the specified character, allowing the character to be escaped as appropriate for this renderer.
 void append(java.lang.CharSequence cs)
          Appends the specified character sequence, allowing any the sequences characters to be escaped as appropriate for this renderer.
 void appendEscapeFor(char ch)
          Appends the escape sequence for the specified character.
 void appendNoEscape(char ch)
          Appends the specified character, without using an escape sequence.
 void appendNoEscape(java.lang.CharSequence cs)
          Appends the specified character sequence, without escaping any characters in the sequence.
 void render(java.lang.Object o)
          Renders the specified object with this renderer.
 void renderDocumentFooter()
          Renders the required document footer for this renderer.
 void renderDocumentHeader()
          Renders the required document header for this renderer.
 void renderObject(java.lang.Object o)
          Renders the specified object using this renderer.
 void renderXMLElement(XmlElement e)
          Renders the specified XML element using this renderer.
 
Methods inherited from class org.millscript.millscript.render.AbstractRenderer
canEncode, renderAsDocument, renderAsFragment, renderCDATA, renderXMLComment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputPrintWriter

protected final java.io.PrintWriter outputPrintWriter
The writer we are rendering into.

Constructor Detail

TXTRenderer

public TXTRenderer(Configuration conf,
                   org.millscript.commons.vfs.VFile file)
Constructs a new TXT renderer, to render to the specified virtual file using the given confguration.

Parameters:
conf - the configuration to get rendering parameters from
file - the virtual output file
Method Detail

append

public void append(char ch)
Description copied from interface: Renderer
Appends the specified character, allowing the character to be escaped as appropriate for this renderer.

Parameters:
ch - the character to append, allowing it to be escaped
See Also:
Renderer.append(char)

append

public void append(java.lang.CharSequence cs)
Description copied from interface: Renderer
Appends the specified character sequence, allowing any the sequences characters to be escaped as appropriate for this renderer.

Specified by:
append in interface Renderer
Overrides:
append in class AbstractRenderer
See Also:
Renderer.append(java.lang.CharSequence)

appendEscapeFor

public void appendEscapeFor(char ch)
Description copied from interface: Renderer
Appends the escape sequence for the specified character.

Parameters:
ch - the character to append an escape sequence for
See Also:
Renderer.appendEscapeFor(char)

appendNoEscape

public void appendNoEscape(char ch)
Description copied from interface: Renderer
Appends the specified character, without using an escape sequence. This method will raise an alert if the character cannot be appended without an escape sequence.

Parameters:
ch - the character to append, without using an escape sequence.
See Also:
Renderer.appendNoEscape(char)

appendNoEscape

public void appendNoEscape(java.lang.CharSequence cs)
Description copied from interface: Renderer
Appends the specified character sequence, without escaping any characters in the sequence. This method will raise an alert if any of the characters cannot be appended without an escape sequence.

Specified by:
appendNoEscape in interface Renderer
Overrides:
appendNoEscape in class AbstractRenderer
See Also:
Renderer.appendNoEscape(java.lang.CharSequence)

render

public void render(java.lang.Object o)
Description copied from interface: Renderer
Renders the specified object with this renderer.

Specified by:
render in interface Renderer
Overrides:
render in class AbstractRenderer
Parameters:
o - the object to render
See Also:
Renderer.render(java.lang.Object)

renderDocumentFooter

public void renderDocumentFooter()
Description copied from interface: Renderer
Renders the required document footer for this renderer.

See Also:
Renderer.renderDocumentFooter()

renderDocumentHeader

public void renderDocumentHeader()
Description copied from interface: Renderer
Renders the required document header for this renderer.

See Also:
Renderer.renderDocumentHeader()

renderObject

public void renderObject(java.lang.Object o)
Description copied from interface: Renderer
Renders the specified object using this renderer.

Parameters:
o - the object to render
See Also:
Renderer.renderObject(java.lang.Object)

renderXMLElement

public void renderXMLElement(XmlElement e)
Description copied from interface: Renderer
Renders the specified XML element using this renderer.

Parameters:
e - the XML element to render
See Also:
Renderer.renderXMLElement(org.millscript.millscript.datatypes.XmlElement)


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.