Class ADBDataSource

java.lang.Object
org.apache.axis2.databinding.ADBDataSource
All Implemented Interfaces:
org.apache.axiom.om.OMDataSource, org.apache.axiom.om.OMDataSourceExt

public class ADBDataSource extends Object implements org.apache.axiom.om.OMDataSourceExt
  • Field Details

    • parentQName

      protected QName parentQName
  • Constructor Details

    • ADBDataSource

      public ADBDataSource(ADBBean bean, QName parentQName)
      Constructor taking in an ADBBean
      Parameters:
      bean -
  • Method Details

    • serialize

      public void serialize(OutputStream output, org.apache.axiom.om.OMOutputFormat format) throws XMLStreamException
      Specified by:
      serialize in interface org.apache.axiom.om.OMDataSource
      Specified by:
      serialize in interface org.apache.axiom.om.OMDataSourceExt
      Parameters:
      output -
      format -
      Throws:
      XMLStreamException
      See Also:
      • OMDataSource.serialize(java.io.OutputStream, org.apache.axiom.om.OMOutputFormat)
    • serialize

      public void serialize(Writer writer, org.apache.axiom.om.OMOutputFormat format) throws XMLStreamException
      Specified by:
      serialize in interface org.apache.axiom.om.OMDataSource
      Specified by:
      serialize in interface org.apache.axiom.om.OMDataSourceExt
      Parameters:
      writer -
      format -
      Throws:
      XMLStreamException
      See Also:
      • OMDataSource.serialize(java.io.Writer, org.apache.axiom.om.OMOutputFormat)
    • serialize

      public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
      This needs to be generated inside the ADB bean
      Specified by:
      serialize in interface org.apache.axiom.om.OMDataSource
      Specified by:
      serialize in interface org.apache.axiom.om.OMDataSourceExt
      Parameters:
      xmlWriter -
      Throws:
      XMLStreamException
      See Also:
      • OMDataSource.serialize(javax.xml.stream.XMLStreamWriter)
    • getReader

      public XMLStreamReader getReader() throws XMLStreamException
      Specified by:
      getReader in interface org.apache.axiom.om.OMDataSource
      Specified by:
      getReader in interface org.apache.axiom.om.OMDataSourceExt
      Throws:
      XMLStreamException
      See Also:
      • OMDataSource.getReader()
    • getObject

      public Object getObject()
      Returns the backing Object.
      Specified by:
      getObject in interface org.apache.axiom.om.OMDataSourceExt
      Returns:
      Object
    • isDestructiveRead

      public boolean isDestructiveRead()
      Returns true if reading the backing object is destructive. An example of an object with a destructive read is an InputSteam. The owning OMSourcedElement uses this information to detemine if OM tree expansion is needed when reading the OMDataSourceExt.
      Specified by:
      isDestructiveRead in interface org.apache.axiom.om.OMDataSourceExt
      Returns:
      boolean
    • isDestructiveWrite

      public boolean isDestructiveWrite()
      Returns true if writing the backing object is destructive. An example of an object with a destructive write is an InputStream. The owning OMSourcedElement uses this information to detemine if OM tree expansion is needed when writing the OMDataSourceExt.
      Specified by:
      isDestructiveWrite in interface org.apache.axiom.om.OMDataSourceExt
      Returns:
      boolean
    • getXMLInputStream

      public InputStream getXMLInputStream(String encoding) throws UnsupportedEncodingException
      Returns a InputStream representing the xml data
      Specified by:
      getXMLInputStream in interface org.apache.axiom.om.OMDataSourceExt
      Parameters:
      encoding - String encoding of InputStream
      Returns:
      InputStream
      Throws:
      UnsupportedEncodingException
    • getXMLBytes

      public byte[] getXMLBytes(String encoding) throws UnsupportedEncodingException
      Returns a byte[] representing the xml data
      Specified by:
      getXMLBytes in interface org.apache.axiom.om.OMDataSourceExt
      Parameters:
      encoding - String encoding of InputStream
      Returns:
      byte[]
      Throws:
      UnsupportedEncodingException
      See Also:
    • close

      public void close()
      Close the DataSource and free its resources.
      Specified by:
      close in interface org.apache.axiom.om.OMDataSourceExt
    • copy

      public org.apache.axiom.om.OMDataSourceExt copy()
      Specified by:
      copy in interface org.apache.axiom.om.OMDataSourceExt
    • getProperty

      public Object getProperty(String key)
      Specified by:
      getProperty in interface org.apache.axiom.om.OMDataSourceExt
    • setProperty

      public Object setProperty(String key, Object value)
      Specified by:
      setProperty in interface org.apache.axiom.om.OMDataSourceExt
    • hasProperty

      public boolean hasProperty(String key)
      Specified by:
      hasProperty in interface org.apache.axiom.om.OMDataSourceExt