org.apache.servicemix.jbi.jaxp
Class StAXSourceTransformer

java.lang.Object
  extended by org.apache.servicemix.jbi.jaxp.SourceTransformer
      extended by org.apache.servicemix.jbi.jaxp.StAXSourceTransformer

public class StAXSourceTransformer
extends SourceTransformer

An enhanced SourceTransformer which adds support for converting from and to StaxSource instances. Since this class introduces a runtime dependency on StAX which some users may not use/require, this class is separated out from the core JAXP transformer.

Version:
$Revision: 564900 $

Field Summary
 
Fields inherited from class org.apache.servicemix.jbi.jaxp.SourceTransformer
DEFAULT_CHARSET_PROPERTY, DEFAULT_VALIDATING_DTD_PROPERTY
 
Constructor Summary
StAXSourceTransformer()
           
 
Method Summary
protected  javax.xml.stream.XMLInputFactory createInputFactory()
           
protected  javax.xml.stream.XMLOutputFactory createOutputFactory()
           
 javax.xml.stream.XMLInputFactory getInputFactory()
           
 javax.xml.stream.XMLOutputFactory getOutputFactory()
           
 void setInputFactory(javax.xml.stream.XMLInputFactory inputFactory)
           
 void setOutputFactory(javax.xml.stream.XMLOutputFactory outputFactory)
           
 javax.xml.transform.dom.DOMSource toDOMSource(javax.xml.transform.Source source)
          Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 javax.xml.transform.dom.DOMSource toDOMSourceFromStax(StaxSource source)
           
 javax.xml.transform.sax.SAXSource toSAXSource(javax.xml.transform.Source source)
          Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 javax.xml.transform.sax.SAXSource toSAXSourceFromStax(StaxSource source)
           
 StaxSource toStaxSource(javax.xml.transform.Source source)
          Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).
 javax.xml.stream.XMLStreamReader toXMLStreamReader(javax.xml.transform.Source source)
           
 
Methods inherited from class org.apache.servicemix.jbi.jaxp.SourceTransformer
contentToString, createDocument, createDocumentBuilder, createDocumentBuilderFactory, createTransfomer, createTransformerFactory, getDefaultCharset, getDefaultValidatingDtd, getDocumentBuilderFactory, getTransformerFactory, setDefaultCharset, setDefaultValidatingDtd, setDocumentBuilderFactory, setTransformerFactory, toDOMDocument, toDOMDocument, toDOMDocument, toDOMElement, toDOMElement, toDOMElement, toDOMNode, toDOMNode, toDOMNodeFromSAX, toDOMSource, toDOMSourceFromSAX, toDOMSourceFromStream, toReaderFromSource, toResult, toResult, toSAXSourceFromDOM, toSAXSourceFromStream, toStreamSource, toStreamSourceFromDOM, toStreamSourceFromSAX, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StAXSourceTransformer

public StAXSourceTransformer()
Method Detail

toStaxSource

public StaxSource toStaxSource(javax.xml.transform.Source source)
                        throws javax.xml.stream.XMLStreamException
Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Throws:
javax.xml.stream.XMLStreamException

toXMLStreamReader

public javax.xml.stream.XMLStreamReader toXMLStreamReader(javax.xml.transform.Source source)
                                                   throws javax.xml.stream.XMLStreamException,
                                                          javax.xml.transform.TransformerException
Throws:
javax.xml.stream.XMLStreamException
javax.xml.transform.TransformerException

toDOMSource

public javax.xml.transform.dom.DOMSource toDOMSource(javax.xml.transform.Source source)
                                              throws javax.xml.parsers.ParserConfigurationException,
                                                     java.io.IOException,
                                                     org.xml.sax.SAXException,
                                                     javax.xml.transform.TransformerException
Description copied from class: SourceTransformer
Converts the source instance to a DOMSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Overrides:
toDOMSource in class SourceTransformer
Throws:
javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
javax.xml.transform.TransformerException

toSAXSource

public javax.xml.transform.sax.SAXSource toSAXSource(javax.xml.transform.Source source)
                                              throws java.io.IOException,
                                                     org.xml.sax.SAXException,
                                                     javax.xml.transform.TransformerException
Description copied from class: SourceTransformer
Converts the source instance to a SAXSource or returns null if the conversion is not supported (making it easy to derive from this class to add new kinds of conversion).

Overrides:
toSAXSource in class SourceTransformer
Throws:
java.io.IOException
org.xml.sax.SAXException
javax.xml.transform.TransformerException

toDOMSourceFromStax

public javax.xml.transform.dom.DOMSource toDOMSourceFromStax(StaxSource source)
                                                      throws javax.xml.transform.TransformerException
Throws:
javax.xml.transform.TransformerException

toSAXSourceFromStax

public javax.xml.transform.sax.SAXSource toSAXSourceFromStax(StaxSource source)

getInputFactory

public javax.xml.stream.XMLInputFactory getInputFactory()

setInputFactory

public void setInputFactory(javax.xml.stream.XMLInputFactory inputFactory)

getOutputFactory

public javax.xml.stream.XMLOutputFactory getOutputFactory()

setOutputFactory

public void setOutputFactory(javax.xml.stream.XMLOutputFactory outputFactory)

createInputFactory

protected javax.xml.stream.XMLInputFactory createInputFactory()

createOutputFactory

protected javax.xml.stream.XMLOutputFactory createOutputFactory()


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.