|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdochelper.FileRenderer
public class FileRenderer
The class File Renderer is an implementation of the renderer interface. It is responsible for converting a result tree into a flat file for output. It will write the file to the path given in its parameter. The same params mechanism is used to set the renderer options.
Field Summary | |
---|---|
protected java.util.Hashtable<java.lang.String,DocumentSection> |
docsections
|
protected java.lang.String |
OUTPUT_FILE
|
protected java.util.HashMap<java.lang.String,java.lang.Object> |
params
|
Constructor Summary | |
---|---|
FileRenderer()
Creates a new instance of FileRenderer |
Method Summary | |
---|---|
void |
addDocumentSection(DocumentSection docsection,
java.lang.String key)
Add a document section for this Renderer. |
void |
checkParams()
Checks that the parameters are correct for this File Record Set. |
void |
execute(ResultNode doc)
Main method of the File Renderer. |
void |
init()
File Renderer needs no initialization. |
private java.lang.String |
render(ResultNode node)
Recursive method to create a String based on the passed in tree. |
void |
setParam(java.lang.String paramName,
java.lang.Object value)
Add an initialization parameter to the File Renderer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String OUTPUT_FILE
protected java.util.HashMap<java.lang.String,java.lang.Object> params
protected java.util.Hashtable<java.lang.String,DocumentSection> docsections
Constructor Detail |
---|
public FileRenderer()
Method Detail |
---|
public void setParam(java.lang.String paramName, java.lang.Object value) throws IllegalParamterTypeException
setParam
in interface Configurable
paramName
- String Name of the paramter to be storedvalue
- String value of the named param
IllegalParamterTypeException
public void checkParams() throws InvalidValueException, MissingArgumentException, ResourceUnavailableException
checkParams
in interface Configurable
InvalidValueException
ResourceUnavailableException
MissingArgumentException
public void init() throws InitializationException, ResourceUnavailableException
init
in interface Configurable
InitializationException
ResourceUnavailableException
public void execute(ResultNode doc) throws ResourceUnavailableException
ResultNode
execute
in interface Renderer
doc
- The node that represent the root of the tree to process.
ResourceUnavailableException
java.lang.Exception
public void addDocumentSection(DocumentSection docsection, java.lang.String key)
addDocumentSection
in interface Renderer
docsection
- DocSection
to add.key
- String representing the object we wish to apply this Document Section to.private java.lang.String render(ResultNode node)
node
- Result Node to process.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |