Class Index | File Index

Classes


Class zwt.tpl.Transformer


Extends zwt.Object.

This is the base class for JSON transformation processor.

Instances of this class can be obtained with zwt.tpl.Template#newTransformer and then be used to transform a JSON object into another data representation or directly into the document.

A transformer may be used multiple times, parameters are preserved across processing.


Defined in: Transformer.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Clear the parameters of the transformer.
 
getParameter(String_name)
Return the value for the specified parameter.
 
setParameter(String_name, String_value)
Set the specified parameter in the transformer.
 
transform(Object_data)
Transform the specified object into another data representation.
 
transformIntoDocument(Object_data, Element_element)
Transform the specified object and put the resulting data representation into the document under the specified node.
Class Detail
zwt.tpl.Transformer()

Author: Jeremy KUHN.
Method Detail
clearParameters()
Clear the parameters of the transformer.

{String} getParameter(String_name)
Return the value for the specified parameter.
Parameters:
String_name
Returns:
The parameter value or null

setParameter(String_name, String_value)
Set the specified parameter in the transformer.
Parameters:
{String} String_name
The name of the parameter to set.
{String} String_value
The the parameter value to set.

{Object} transform(Object_data)
Transform the specified object into another data representation.

The resulting data representation depends on the implementation.

This default implementation does nothing.

Parameters:
{Object} Object_data
The input data to transform
Returns:
A resulting data object

transformIntoDocument(Object_data, Element_element)
Transform the specified object and put the resulting data representation into the document under the specified node.

This default implementation does nothing.

Parameters:
{Object} Object_data
The input data to transform
{Element} Element_element
The document element under which resulting data should be inserted

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jan 12 2012 02:07:53 GMT+0100 (CET)