public final class TransformerImpl extends Transformer implements DOMCache, ErrorListener
Modifier | Constructor and Description |
---|---|
protected |
TransformerImpl(Properties outputProperties,
int indentNumber,
TransformerFactoryImpl tfactory) |
protected |
TransformerImpl(Translet translet,
Properties outputProperties,
int indentNumber,
TransformerFactoryImpl tfactory) |
Modifier and Type | Method and Description |
---|---|
void |
clearParameters()
Implements JAXP's Transformer.clearParameters()
Clear all parameters set with setParameter.
|
void |
error(TransformerException e)
Receive notification of a recoverable error.
|
void |
fatalError(TransformerException e)
Receive notification of a non-recoverable error.
|
ErrorListener |
getErrorListener()
Implements JAXP's Transformer.getErrorListener()
Get the error event handler in effect for the transformation.
|
SerializationHandler |
getOutputHandler(Result result)
Create an output handler for the transformation output based on
the type and contents of the TrAX Result object passed to the
transform() method.
|
Properties |
getOutputProperties()
Implements JAXP's Transformer.getOutputProperties().
|
String |
getOutputProperty(String name)
Implements JAXP's Transformer.getOutputProperty().
|
Object |
getParameter(String name)
Implements JAXP's Transformer.getParameter()
Returns the value of a given parameter.
|
protected TransformerFactoryImpl |
getTransformerFactory()
Returns the
TransformerFactoryImpl
object that create this Transformer . |
protected AbstractTranslet |
getTranslet()
Returns the translet wrapped inside this Transformer or
null if this is the identity transform.
|
protected TransletOutputHandlerFactory |
getTransletOutputHandlerFactory()
Returns the
TransletOutputHandlerFactory
object that create the TransletOutputHandler . |
URIResolver |
getURIResolver()
Implements JAXP's Transformer.getURIResolver()
Set the object currently used to resolve URIs used in document().
|
boolean |
isIdentity() |
boolean |
isSecureProcessing()
Return the state of the secure processing feature.
|
void |
reset()
This method resets the Transformer to its original configuration
Transformer code is reset to the same state it was when it was
created
|
DOM |
retrieveDocument(String baseURI,
String href,
Translet translet)
This class should only be used as a DOMCache for the translet if the
URIResolver has been set.
|
protected void |
setDOM(DOM dom)
Set the internal DOM that will be used for the next transformation
|
void |
setErrorListener(ErrorListener listener)
Implements JAXP's Transformer.setErrorListener()
Set the error event listener in effect for the transformation.
|
void |
setOutputProperties(Properties properties)
Implements JAXP's Transformer.setOutputProperties().
|
void |
setOutputProperty(String name,
String value)
Implements JAXP's Transformer.setOutputProperty().
|
void |
setParameter(String name,
Object value)
Implements JAXP's Transformer.setParameter()
Add a parameter for the transformation.
|
void |
setSecureProcessing(boolean flag)
Set the state of the secure processing feature.
|
void |
setURIResolver(URIResolver resolver)
Implements JAXP's Transformer.setURIResolver()
Set an object that will be used to resolve URIs used in document().
|
void |
transferOutputProperties(SerializationHandler handler)
This method is used to pass any properties to the output handler
when running the identity transform.
|
void |
transform(Source source,
Result result)
Implements JAXP's Transformer.transform()
|
void |
warning(TransformerException e)
Receive notification of a warning.
|
protected TransformerImpl(Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory)
protected TransformerImpl(Translet translet, Properties outputProperties, int indentNumber, TransformerFactoryImpl tfactory)
public boolean isSecureProcessing()
public void setSecureProcessing(boolean flag)
protected AbstractTranslet getTranslet()
public boolean isIdentity()
public void transform(Source source, Result result) throws TransformerException
transform
in class Transformer
source
- Contains the input XML documentresult
- Will contain the output from the transformationTransformerException
public SerializationHandler getOutputHandler(Result result) throws TransformerException
TransformerException
protected void setDOM(DOM dom)
protected TransformerFactoryImpl getTransformerFactory()
TransformerFactoryImpl
object that create this Transformer
.protected TransletOutputHandlerFactory getTransletOutputHandlerFactory()
TransletOutputHandlerFactory
object that create the TransletOutputHandler
.public ErrorListener getErrorListener()
getErrorListener
in class Transformer
public void setErrorListener(ErrorListener listener) throws IllegalArgumentException
setErrorListener
in class Transformer
listener
- The error event listener to useIllegalArgumentException
public Properties getOutputProperties()
getOutputProperties
in class Transformer
public String getOutputProperty(String name) throws IllegalArgumentException
getOutputProperty
in class Transformer
name
- A non-null string that contains the name of the propertyIllegalArgumentException
- if the property name is not knownpublic void setOutputProperties(Properties properties) throws IllegalArgumentException
setOutputProperties
in class Transformer
properties
- The properties to use for the TransformerIllegalArgumentException
- Never, errors are ignoredpublic void setOutputProperty(String name, String value) throws IllegalArgumentException
setOutputProperty
in class Transformer
name
- The name of the property to setvalue
- The value to assign to the propertyIllegalArgumentException
- Never, errors are ignoredpublic void transferOutputProperties(SerializationHandler handler)
public void setParameter(String name, Object value)
setParameter
in class Transformer
name
- The name of the parametervalue
- The value to assign to the parameterpublic void clearParameters()
clearParameters
in class Transformer
public final Object getParameter(String name)
getParameter
in class Transformer
name
- The name of the parameterpublic URIResolver getURIResolver()
getURIResolver
in class Transformer
public void setURIResolver(URIResolver resolver)
setURIResolver
in class Transformer
resolver
- The URIResolver to use in document()public DOM retrieveDocument(String baseURI, String href, Translet translet)
retrieveDocument
in interface DOMCache
baseURI
- The base URI used by the document call.href
- The href argument passed to the document function.translet
- A reference to the translet requesting the documentpublic void error(TransformerException e) throws TransformerException
error
in interface ErrorListener
e
- The warning information encapsulated in a transformer
exception.TransformerException
- if the application chooses to discontinue
the transformation (always does in our case).public void fatalError(TransformerException e) throws TransformerException
fatalError
in interface ErrorListener
e
- The warning information encapsulated in a transformer
exception.TransformerException
- if the application chooses to discontinue
the transformation (always does in our case).public void warning(TransformerException e) throws TransformerException
warning
in interface ErrorListener
e
- The warning information encapsulated in a transformer
exception.TransformerException
- if the application chooses to discontinue
the transformation (never does in our case).public void reset()
reset
in class Transformer
Copyright © 2018 JBoss by Red Hat. All rights reserved.