org.jopendocument.dom.template.engine
Class Processor<E>
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 :
- evaluating text-input and replacing them with the result.
- executing the tags (if, for, set).
- Parameters:
element
- the element to be processed.
- Throws:
TemplateException
Copyright © 2010 jOpenDocument All Rights Reserved.