org.millscript.millscript.render
Interface Renderer

All Known Implementing Classes:
AbstractRenderer, DatafileRenderer, HTMLCDATARenderer, HTMLRenderer, LinesRenderer, PropertiesRenderer, TXTRenderer, XML10Renderer, XMLCDATARenderer, XSLTRenderer

public interface Renderer

This is MillScripts rendering interface. Implementations of this are used to render objects to the different output formats MillScript provides.


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.
 boolean canEncode(char ch)
          Checks if the specified character can be encoded by this renderer.
 void render(java.lang.Object o)
          Renders the specified object with this renderer.
 void renderAsDocument(java.lang.Object o)
          Renders the specified object to the output file and then closes it.
 void renderAsFragment(org.millscript.commons.util.IList<?> l)
          Renders the specified object to the output file as a fragment of a complete document.
 void renderCDATA(CDATA c)
          Renders the specified CDATA object using 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 renderXMLComment(XmlComment c)
          Renders the specified XML comment using this renderer.
 void renderXMLElement(XmlElement e)
          Renders the specified XML element using this renderer.
 

Method Detail

append

void append(char ch)
            throws java.io.IOException
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
Throws:
java.io.IOException - thrown if an IO problem occurs

append

void append(java.lang.CharSequence cs)
            throws java.io.IOException
Appends the specified character sequence, allowing any the sequences characters to be escaped as appropriate for this renderer.

Parameters:
ch - the character sequence to append, allowing its characters to be escaped
Throws:
java.io.IOException - thrown if an IO problem occurs

appendEscapeFor

void appendEscapeFor(char ch)
                     throws java.io.IOException
Appends the escape sequence for the specified character.

Parameters:
ch - the character to append an escape sequence for
Throws:
java.io.IOException - thrown if an IO problem occurs

appendNoEscape

void appendNoEscape(char ch)
                    throws java.io.IOException
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.
Throws:
java.io.IOException - thrown if an IO problem occurs

appendNoEscape

void appendNoEscape(java.lang.CharSequence cs)
                    throws java.io.IOException
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.

Parameters:
ch - the character sequence to append, without escaping any of the characters in the sequence
Throws:
java.io.IOException - thrown if an IO problem occurs

canEncode

boolean canEncode(char ch)
Checks if the specified character can be encoded by this renderer.

Parameters:
ch - the character to check
Returns:
true if the character can be encoded by this renderer

render

void render(java.lang.Object o)
            throws java.io.IOException
Renders the specified object with this renderer.

Parameters:
o - the object to render
Throws:
java.io.IOException - thrown if an IO problem occurs

renderAsDocument

void renderAsDocument(java.lang.Object o)
Renders the specified object to the output file and then closes it. A document will have a DOCTYPE relevant to the specific type of file being rendered.

Parameters:
o - the object to render to the file

renderAsFragment

void renderAsFragment(org.millscript.commons.util.IList<?> l)
Renders the specified object to the output file as a fragment of a complete document. A fragment will not have a DOCTYPE, just the incomplete fragment of a complete document.

Parameters:
l - the list of objects to write to the file

renderCDATA

void renderCDATA(CDATA c)
                 throws java.io.IOException
Renders the specified CDATA object using this renderer.

Parameters:
c - the CDATA object to render
Throws:
java.io.IOException - thrown if an IO problem occurs

renderDocumentFooter

void renderDocumentFooter()
                          throws java.io.IOException
Renders the required document footer for this renderer.

Throws:
java.io.IOException - thrown if an IO problem occurs

renderDocumentHeader

void renderDocumentHeader()
                          throws java.io.IOException
Renders the required document header for this renderer.

Throws:
java.io.IOException - thrown if an IO problem occurs

renderObject

void renderObject(java.lang.Object o)
                  throws java.io.IOException
Renders the specified object using this renderer.

Parameters:
o - the object to render
Throws:
java.io.IOException - thrown if an IO problem occurs

renderXMLComment

void renderXMLComment(XmlComment c)
                      throws java.io.IOException
Renders the specified XML comment using this renderer.

Parameters:
c - the XML comment to render
Throws:
java.io.IOException - thrown if an IO problem occurs

renderXMLElement

void renderXMLElement(XmlElement e)
                      throws java.io.IOException
Renders the specified XML element using this renderer.

Parameters:
e - the XML element to render
Throws:
java.io.IOException - thrown if an IO problem occurs


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