Public Member Functions | |
FileRenderer () | |
Creates a new instance of FileRenderer. | |
void | setParam (String paramName, Object value) throws IllegalParamterTypeException |
Add an initialization parameter to the File Renderer. | |
void | checkParams () throws InvalidValueException, MissingArgumentException, ResourceUnavailableException |
Checks that the parameters are correct for this File Record Set. | |
void | init () throws InitializationException, ResourceUnavailableException |
File Renderer needs no initialization. | |
void | execute (ResultNode doc) throws ResourceUnavailableException |
Main method of the File Renderer. | |
void | addDocumentSection (DocumentSection docsection, String key) |
Add a document section for this Renderer. | |
Protected Attributes | |
String | OUTPUT_FILE = "outputfile" |
HashMap< String, Object > | params = new HashMap<String,Object>() |
Hashtable< String, DocumentSection > | docsections |
Private Member Functions | |
String | render (ResultNode node) |
Recursive method to create a String based on the passed in tree. |
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.
Definition at line 33 of file FileRenderer.java.
dochelper.FileRenderer.FileRenderer | ( | ) |
void dochelper.FileRenderer.setParam | ( | String | paramName, | |
Object | value | |||
) | throws IllegalParamterTypeException |
Add an initialization parameter to the File Renderer.
These parameters are used during the call to init to Establish - Initialize the Renderer. In this specific case, this call is used to set the output file parameter.
paramName | String Name of the paramter to be stored | |
value | String value of the named param |
IllegalParamterTypeException |
Implements dochelper.Configurable.
Definition at line 72 of file FileRenderer.java.
void dochelper.FileRenderer.checkParams | ( | ) | throws InvalidValueException, MissingArgumentException, ResourceUnavailableException |
Checks that the parameters are correct for this File Record Set.
Validate required parameters and semantic and format rules.
This method will not return a boolean indicating success, rather, it will fire an Exception indicating error type
InvalidValueException | ||
ResourceUnavailableException | ||
MissingArgumentException |
Implements dochelper.Configurable.
Definition at line 92 of file FileRenderer.java.
void dochelper.FileRenderer.init | ( | ) | throws InitializationException, ResourceUnavailableException |
File Renderer needs no initialization.
InitializationException | ||
ResourceUnavailableException |
Implements dochelper.Configurable.
Definition at line 107 of file FileRenderer.java.
void dochelper.FileRenderer.execute | ( | ResultNode | doc | ) | throws ResourceUnavailableException |
Main method of the File Renderer.
This method will convert the input ResultNode</code node into a flat file as output. The node passed in as input represents the root of the tree to convert.
doc The node that represent the root of the tree to process.
ResourceUnavailableException Exception
Implements dochelper.Renderer.
Definition at line 120 of file FileRenderer.java.
void dochelper.FileRenderer.addDocumentSection | ( | DocumentSection | docsection, | |
String | key | |||
) |
Add a document section for this Renderer.
Key it according to the name of the object this Docsection should be applied to.
docsection | DocSection to add. |
Implements dochelper.Renderer.
Definition at line 150 of file FileRenderer.java.
String dochelper.FileRenderer.render | ( | ResultNode | node | ) | [private] |
Recursive method to create a String based on the passed in tree.
This method will fetch the correct document section. Append the getSTART() result, then recurse to children if any, or get the value if no children.
node | Result Node to process. |
Definition at line 164 of file FileRenderer.java.
String dochelper.FileRenderer.OUTPUT_FILE = "outputfile" [protected] |
Definition at line 41 of file FileRenderer.java.
HashMap<String,Object> dochelper.FileRenderer.params = new HashMap<String,Object>() [protected] |
Definition at line 47 of file FileRenderer.java.
Hashtable<String,DocumentSection> dochelper.FileRenderer.docsections [protected] |
Definition at line 53 of file FileRenderer.java.