Package org.apache.axis2.databinding
Class ADBHelperDataSource<T>
java.lang.Object
org.apache.axis2.databinding.ADBHelperDataSource<T>
- All Implemented Interfaces:
org.apache.axiom.om.OMDataSource,org.apache.axiom.om.OMDataSourceExt
-
Field Summary
FieldsFields inherited from interface org.apache.axiom.om.OMDataSourceExt
LOSSY_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionADBHelperDataSource(T bean, QName parentQName, ADBHelper<T> helper) Constructor taking in an ADBBean -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the DataSource and free its resources.org.apache.axiom.om.OMDataSourceExtcopy()Returns the backing Object.getProperty(String key) byte[]getXMLBytes(String encoding) Returns a byte[] representing the xml datagetXMLInputStream(String encoding) Returns a InputStream representing the xml databooleanhasProperty(String key) booleanReturns true if reading the backing object is destructive.booleanReturns true if writing the backing object is destructive.voidserialize(OutputStream output, org.apache.axiom.om.OMOutputFormat format) voidvoidserialize(XMLStreamWriter xmlWriter) This needs to be generated inside the ADB beansetProperty(String key, Object value)
-
Field Details
-
parentQName
-
-
Constructor Details
-
ADBHelperDataSource
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:
serializein interfaceorg.apache.axiom.om.OMDataSource- Specified by:
serializein interfaceorg.apache.axiom.om.OMDataSourceExt- Parameters:
output-format-- Throws:
XMLStreamException- See Also:
-
serialize
public void serialize(Writer writer, org.apache.axiom.om.OMOutputFormat format) throws XMLStreamException - Specified by:
serializein interfaceorg.apache.axiom.om.OMDataSource- Specified by:
serializein interfaceorg.apache.axiom.om.OMDataSourceExt- Parameters:
writer-format-- Throws:
XMLStreamException- See Also:
-
serialize
This needs to be generated inside the ADB bean- Specified by:
serializein interfaceorg.apache.axiom.om.OMDataSource- Specified by:
serializein interfaceorg.apache.axiom.om.OMDataSourceExt- Parameters:
xmlWriter-- Throws:
XMLStreamException- See Also:
-
getReader
- Specified by:
getReaderin interfaceorg.apache.axiom.om.OMDataSource- Specified by:
getReaderin interfaceorg.apache.axiom.om.OMDataSourceExt- Throws:
XMLStreamException- See Also:
-
getObject
Returns the backing Object.- Specified by:
getObjectin interfaceorg.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:
isDestructiveReadin interfaceorg.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:
isDestructiveWritein interfaceorg.apache.axiom.om.OMDataSourceExt- Returns:
- boolean
-
getXMLInputStream
Returns a InputStream representing the xml data- Specified by:
getXMLInputStreamin interfaceorg.apache.axiom.om.OMDataSourceExt- Parameters:
encoding- String encoding of InputStream- Returns:
- InputStream
- Throws:
UnsupportedEncodingException
-
getXMLBytes
Returns a byte[] representing the xml data- Specified by:
getXMLBytesin interfaceorg.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:
closein interfaceorg.apache.axiom.om.OMDataSourceExt
-
copy
public org.apache.axiom.om.OMDataSourceExt copy()- Specified by:
copyin interfaceorg.apache.axiom.om.OMDataSourceExt
-
getProperty
- Specified by:
getPropertyin interfaceorg.apache.axiom.om.OMDataSourceExt
-
setProperty
- Specified by:
setPropertyin interfaceorg.apache.axiom.om.OMDataSourceExt
-
hasProperty
- Specified by:
hasPropertyin interfaceorg.apache.axiom.om.OMDataSourceExt
-