org.apache.axiom.om
Interface OMDataSource

All Known Subinterfaces:
OMDataSourceExt
All Known Implementing Classes:
ByteArrayDataSource, CharArrayDataSource, InputStreamDataSource, OMDataSourceExtBase

public interface OMDataSource

Interface to arbitrary source of XML element data. This provides the hook for using a general data source (such as data binding frameworks) as the backing source of data for an element.


Method Summary
 javax.xml.stream.XMLStreamReader getReader()
          Get parser for element data.
 void serialize(java.io.OutputStream output, OMOutputFormat format)
          Serializes element data directly to stream.
 void serialize(java.io.Writer writer, OMOutputFormat format)
          Serializes element data directly to writer.
 void serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
          Serializes element data directly to StAX writer.
 

Method Detail

serialize

void serialize(java.io.OutputStream output,
               OMOutputFormat format)
               throws javax.xml.stream.XMLStreamException
Serializes element data directly to stream.

Parameters:
output - destination stream for element XML text
format - output format information (null if none; may be ignored if not supported by data binding even if supplied)
Throws:
javax.xml.stream.XMLStreamException

serialize

void serialize(java.io.Writer writer,
               OMOutputFormat format)
               throws javax.xml.stream.XMLStreamException
Serializes element data directly to writer.

Parameters:
writer - destination writer for element XML text
format - output format information (null if none; may be ignored if not supported by data binding even if supplied)
Throws:
javax.xml.stream.XMLStreamException

serialize

void serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
               throws javax.xml.stream.XMLStreamException
Serializes element data directly to StAX writer.

Parameters:
xmlWriter - destination writer
Throws:
javax.xml.stream.XMLStreamException

getReader

javax.xml.stream.XMLStreamReader getReader()
                                           throws javax.xml.stream.XMLStreamException
Get parser for element data. In the general case this may require the data source to serialize data as XML text and then parse that text.

Returns:
element parser
Throws:
javax.xml.stream.XMLStreamException