org.jopendocument.dom.template.engine
Class Processor<E>

java.lang.Object
  extended by org.jopendocument.dom.template.engine.Processor<E>
Type Parameters:
E - type of material this processor uses.

public class Processor<E>
extends Object

Generates the final document content from the preprocessed template content.

The behaviour of the substitution of fields can be controlled with prefixes :

AS_STR
the following expression will be substitued as a String. For an XML element its tree will be outputed.
ENCODE
the following expression will be converted to a String with toString() and then encoded using OOXML.encodeWS(String).
OO_XML
the following expression will be converted to a String with toString() and then parsed as OO XML.
If none of these is specified, an XML element will be treated as OO XML to be grafted (only its children), else the value will simply be set as text of the field.


Field Summary
static String AS_STR
           
static String ENCODE
           
static String OO_XML
           
 
Method Summary
 Material<E> getMaterial()
           
 Parsed<E> getParsed()
           
 Material<E> process()
           
 void transform(org.jdom.Element element)
          Transforms recursively the passed element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OO_XML

public static final String OO_XML
See Also:
Constant Field Values

ENCODE

public static final String ENCODE
See Also:
Constant Field Values

AS_STR

public static final String AS_STR
See Also:
Constant Field Values
Method Detail

getParsed

public final Parsed<E> getParsed()

getMaterial

public Material<E> getMaterial()

process

public Material<E> process()
                    throws TemplateException
Throws:
TemplateException

transform

public void transform(org.jdom.Element element)
               throws TemplateException
Transforms recursively the passed element. That means :

Parameters:
element - the element to be processed.
Throws:
TemplateException


Copyright © 2010 jOpenDocument All Rights Reserved.