|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.transform.Transformer
net.sf.joost.trax.TransformerImpl
This class implements the Transformer-Interface for TraX. With a Transformer-object you can proceed transformations, but be careful, because a Transformer-object is not thread- safe. For threads you should use Templates.
| Field Summary | |
boolean |
cancelTransformation
This is a run-time flag (only used when DEBUG_MODE is true).
|
static boolean |
DEBUG_MODE
This is a compile-time flag to enable or disable calling of trace listeners. |
protected TransformationErrListener |
defaultErrorListener
|
private ErrorListener |
errorListener
|
private static org.apache.commons.logging.Log |
log
|
private Processor |
processor
|
private Boolean |
reentryGuard
Synch object to gaurd against setting values from the TrAX interface or reentry while the transform is going on. |
private HashSet |
supportedProperties
|
private TraceManager |
traceManager
The trace manager. |
private URIResolver |
uriRes
|
| Fields inherited from interface net.sf.joost.trax.TrAXConstants |
ALLOW_EXTERNAL_FUNCTIONS, DEBUG_FEATURE, IDENTITY_TRANSFORM, KEY_TH_RESOLVER, KEY_XSLT_FACTORY, MESSAGE_EMITTER_CLASS |
| Fields inherited from interface net.sf.joost.Constants |
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS |
| Constructor Summary | |
protected |
TransformerImpl(Processor processor)
Constructor |
| Method Summary | |
void |
clearParameters()
Clears all parameters |
ErrorListener |
getErrorListener()
Setter for errorListener |
Properties |
getOutputProperties()
Getter for Processor.outputProperties |
String |
getOutputProperty(String name)
Getter for an output property. |
Object |
getParameter(String name)
Getter for parameters. |
Processor |
getStxProcessor()
Getter for processor |
TraceManager |
getTraceManager()
Get an instance of the tracemanager for this transformation. |
URIResolver |
getURIResolver()
Getter for uriRes |
private void |
performResults(Result result,
StxEmitter out)
Performs the Result. |
void |
setErrorListener(ErrorListener listener)
|
void |
setOutputProperties(Properties oformat)
Setter for Processor.outputProperties |
void |
setOutputProperty(String name,
String value)
Setter for an output property. |
void |
setParameter(String name,
Object value)
Setter for parameters. |
void |
setURIResolver(URIResolver resolver)
Setter for uriRes |
void |
transform(Source xmlSource,
Result result)
Transforms a xml-source : SAXSource, DOMSource, StreamSource to SAXResult, DOMResult and StreamResult |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static org.apache.commons.logging.Log log
private Processor processor
private URIResolver uriRes
private ErrorListener errorListener
protected TransformationErrListener defaultErrorListener
private HashSet supportedProperties
private Boolean reentryGuard
public static boolean DEBUG_MODE
public boolean cancelTransformation
DEBUG_MODE is true).
If the value is true, the transformation will be cancelled
at the next possible execution step.
private TraceManager traceManager
| Constructor Detail |
protected TransformerImpl(Processor processor)
processor - A Processor object.| Method Detail |
public TraceManager getTraceManager()
public void transform(Source xmlSource,
Result result)
throws TransformerException
xmlSource - A Sourceresult - A Result
TransformerException
private void performResults(Result result,
StxEmitter out)
Result.
result - A Resultout - StxEmitter.
public String getOutputProperty(String name)
throws IllegalArgumentException
name - The key of the output property.
null if not set.
IllegalArgumentException
public void setOutputProperty(String name,
String value)
throws IllegalArgumentException
name - The key of the outputProperty.value - The value of the outputProperty.
IllegalArgumentExceptionpublic Properties getOutputProperties()
Processor.outputProperties
public void setOutputProperties(Properties oformat)
throws IllegalArgumentException
Processor.outputProperties
oformat - A Properties object, that replaces
the current set of output properties.
IllegalArgumentExceptionpublic URIResolver getURIResolver()
uriRes
URIResolverpublic void setURIResolver(URIResolver resolver)
uriRes
resolver - A URIResolver object.public void clearParameters()
public void setParameter(String name,
Object value)
name - The key of the parameter.value - The value of the parameter.public Object getParameter(String name)
name - The key-value of the parameter.
Object according to the key-value or null.
public void setErrorListener(ErrorListener listener)
throws IllegalArgumentException
listener -
IllegalArgumentExceptionpublic ErrorListener getErrorListener()
errorListener
ErrorListenerpublic Processor getStxProcessor()
processor
Processor object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||