Interface OMDataSource

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

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 Details

    • serialize

      void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException
      Serializes element data directly to stream.
      Parameters:
      output - destination stream for element XML text
      format - Output format information. The implementation must use this information to choose the correct character set encoding when writing to the output stream. This parameter must not be null.
      Throws:
      XMLStreamException
    • serialize

      void serialize(Writer writer, OMOutputFormat format) throws 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:
      XMLStreamException
    • serialize

      void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
      Serializes element data directly to StAX writer.
      Parameters:
      xmlWriter - destination writer
      Throws:
      XMLStreamException
    • getReader

      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:
      XMLStreamException