|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ikasan.framework.component.transformation.XMLReaderTransformer
public class XMLReaderTransformer
This class is a Transformer that acts on incoming Payloads within an Event and transforms
the content to XML based on the supplied XMLReader instance.
This is a copy transform working off of the SAX call backs on the reader to provide an output XML.
NOTE: This is not a stylesheet transformer. This implementation is notable for the following reasons:
1) It is intended to be thread safe with respect to the underlying javax.xml.transform.Transformer as a
new instance is created every time the business method (onEvent) is called.
2) Its intended use is to transform non-xml Payloads to XML through the configuration of a content
specific XMLReader. e.g. an XMLReader implementation capable of reading fixed length flat
files can be injected on construction thus allowing flat file (fixed length) payloads to be transformed to XML.
3) Rather than relying on the default ErrorListener this transformer supplies its own implementation
designed to propagate the exceptions thrown for parse time errors and warnings
| Constructor Summary | |
|---|---|
XMLReaderTransformer(TransformerFactory transformerFactory,
XMLReader xmlReader)
Constructor |
|
| Method Summary | |
|---|---|
void |
onEvent(Event event)
Transforms or otherwise changes the passed in Event |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLReaderTransformer(TransformerFactory transformerFactory,
XMLReader xmlReader)
transformerFactory - The transformer factory that provides the transformersxmlReader - The XML REader to use| Method Detail |
|---|
public void onEvent(Event event)
throws TransformationException
TransformerEvent
onEvent in interface Transformerevent - Event to transform
TransformationException - Exception if we could not transform
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||