Modifier and Type | Field and Description |
---|---|
Vector |
_cdata |
String |
_doctypePublic |
String |
_doctypeSystem |
protected DOMImplementation |
_domImplementation
DOMImplementation caching for basis library
|
String |
_encoding |
Hashtable |
_formatSymbols
Decimal number format symbol handling
|
protected boolean |
_hasIdCall |
boolean |
_indent |
int |
_indentamount |
String |
_mediaType |
String |
_method |
boolean |
_omitHeader |
String |
_standalone |
protected Templates |
_templates |
String |
_version |
static int |
CURRENT_TRANSLET_VERSION |
static int |
FIRST_TRANSLET_VERSION |
protected String[] |
namesArray |
protected String[] |
namespaceArray |
protected ArrayList |
paramsStack |
protected int |
pbase
Parameter handling
|
protected int |
pframe
Parameter handling
|
protected StringValueHandler |
stringValueHandler |
protected int |
transletVersion |
protected int[] |
typesArray |
protected String[] |
urisArray |
static int |
VER_SPLIT_NAMES_ARRAY |
Constructor and Description |
---|
AbstractTranslet() |
Modifier and Type | Method and Description |
---|---|
void |
addAuxiliaryClass(Class auxClass) |
void |
addCdataElement(String name)
Add's a name of an element whose text contents should be output as CDATA
|
void |
addDecimalFormat(String name,
DecimalFormatSymbols symbols)
Adds a DecimalFormat object to the _formatSymbols hashtable.
|
Object |
addParameter(String name,
Object value)
Add a new global parameter if not already in the current frame.
|
Object |
addParameter(String name,
Object value,
boolean isDefault)
Add a new global or local parameter if not already in the current frame.
|
void |
buildKeyIndex(String name,
DOM dom)
Create an empty KeyIndex in the DOM case
|
void |
buildKeyIndex(String name,
int node,
Object value)
Adds a value to a key/id index
|
void |
buildKeys(DOM document,
DTMAxisIterator iterator,
SerializationHandler handler,
int root)
This method builds key indexes - it is overridden in the compiled
translet in cases where the
|
void |
characters(String string,
SerializationHandler handler)
Used by some compiled code as a shortcut for passing strings to the
output handler
|
void |
clearParameters()
Clears the parameter stack.
|
void |
closeOutputHandler(SerializationHandler handler) |
KeyIndex |
createKeyIndex()
Creates a KeyIndex object of the desired size - don't want to resize!!!
|
void |
displayMessage(String msg)
Pass a message to the message handler - used by Message class.
|
Class |
getAuxiliaryClass(String className) |
DecimalFormat |
getDecimalFormat(String name)
Retrieves a named DecimalFormat object from _formatSymbols hashtable.
|
DOMCache |
getDOMCache()
Returns the DOM cache used for this translet.
|
KeyIndex |
getKeyIndex(String name)
Returns the index for a given key (or id).
|
String[] |
getNamesArray() |
String[] |
getNamespaceArray() |
Object |
getParameter(String name)
Get the value of a parameter from the current frame or
null if undefined.
|
Templates |
getTemplates() |
int[] |
getTypesArray() |
String[] |
getUrisArray() |
boolean |
hasIdCall() |
DOMAdapter |
makeDOMAdapter(DOM dom)
Wrap the initial input DOM in a dom adapter.
|
Document |
newDocument(String uri,
String qname) |
SerializationHandler |
openOutputHandler(String filename) |
SerializationHandler |
openOutputHandler(String filename,
boolean append)
Multiple output document extension.
|
void |
popParamFrame()
Pop the topmost parameter frame.
|
void |
postInitialization()
After constructing the translet object, this method must be called to
perform any version-specific post-initialization that's required.
|
void |
prepassDocument(DOM document)
Give the translet an opportunity to perform a prepass on the document
to extract any information that it can store in an optimized form.
|
void |
printInternalState()
Debugging
|
void |
pushParamFrame()
Push a new parameter frame.
|
void |
setAuxiliaryClasses(Hashtable auxClasses) |
void |
setDOMCache(DOMCache cache)
Sets the DOM cache used for additional documents loaded using the
document() function.
|
void |
setIndexSize(int size)
This method is used to pass the largest DOM size to the translet.
|
void |
setKeyIndexDom(String name,
DOM document)
This method builds key indexes - it is overridden in the compiled
translet in cases where the
|
void |
setMessageHandler(MessageHandler handler)
Set the translet's message handler - must implement MessageHandler
|
void |
setTemplates(Templates templates) |
protected void |
transferOutputSettings(SerializationHandler handler)
Transfer the output settings to the output post-processor
|
abstract void |
transform(DOM document,
DTMAxisIterator iterator,
SerializationHandler handler)
Main transform() method - this is overridden by the compiled translet
|
void |
transform(DOM document,
SerializationHandler handler)
Calls transform() with a given output handler
|
public String _version
public String _method
public String _encoding
public boolean _omitHeader
public String _standalone
public String _doctypePublic
public String _doctypeSystem
public boolean _indent
public String _mediaType
public Vector _cdata
public int _indentamount
public static final int FIRST_TRANSLET_VERSION
public static final int VER_SPLIT_NAMES_ARRAY
public static final int CURRENT_TRANSLET_VERSION
protected int transletVersion
protected String[] namesArray
protected String[] urisArray
protected int[] typesArray
protected String[] namespaceArray
protected Templates _templates
protected boolean _hasIdCall
protected StringValueHandler stringValueHandler
protected int pbase
protected int pframe
protected ArrayList paramsStack
public Hashtable _formatSymbols
protected DOMImplementation _domImplementation
public void printInternalState()
public final DOMAdapter makeDOMAdapter(DOM dom) throws TransletException
TransletException
public final void pushParamFrame()
public final void popParamFrame()
public final Object addParameter(String name, Object value)
addParameter
in interface Translet
public final Object addParameter(String name, Object value, boolean isDefault)
public void clearParameters()
public final Object getParameter(String name)
public final void setMessageHandler(MessageHandler handler)
public final void displayMessage(String msg)
public void addDecimalFormat(String name, DecimalFormatSymbols symbols)
public final DecimalFormat getDecimalFormat(String name)
public final void prepassDocument(DOM document)
public final void postInitialization()
public void setIndexSize(int size)
public KeyIndex createKeyIndex()
public void buildKeyIndex(String name, int node, Object value)
name
- is the name of the index (the key or ##id)node
- is the node handle of the node to insertvalue
- is the value that will look up the node in the given indexpublic void buildKeyIndex(String name, DOM dom)
name
- is the name of the index (the key or ##id)dom
- is the DOMpublic KeyIndex getKeyIndex(String name)
public void buildKeys(DOM document, DTMAxisIterator iterator, SerializationHandler handler, int root) throws TransletException
buildKeys
in interface Translet
TransletException
public void setKeyIndexDom(String name, DOM document)
public void setDOMCache(DOMCache cache)
public DOMCache getDOMCache()
public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException
TransletException
public SerializationHandler openOutputHandler(String filename) throws TransletException
TransletException
public void closeOutputHandler(SerializationHandler handler)
public abstract void transform(DOM document, DTMAxisIterator iterator, SerializationHandler handler) throws TransletException
transform
in interface Translet
TransletException
public final void transform(DOM document, SerializationHandler handler) throws TransletException
transform
in interface Translet
TransletException
public final void characters(String string, SerializationHandler handler) throws TransletException
TransletException
public void addCdataElement(String name)
protected void transferOutputSettings(SerializationHandler handler)
public void addAuxiliaryClass(Class auxClass)
addAuxiliaryClass
in interface Translet
public void setAuxiliaryClasses(Hashtable auxClasses)
public Class getAuxiliaryClass(String className)
getAuxiliaryClass
in interface Translet
public String[] getNamesArray()
getNamesArray
in interface Translet
public String[] getUrisArray()
getUrisArray
in interface Translet
public int[] getTypesArray()
getTypesArray
in interface Translet
public String[] getNamespaceArray()
getNamespaceArray
in interface Translet
public boolean hasIdCall()
public Templates getTemplates()
public void setTemplates(Templates templates)
public Document newDocument(String uri, String qname) throws ParserConfigurationException
ParserConfigurationException
Copyright © 2020 JBoss by Red Hat. All rights reserved.