org.apache.axis2.jaxws.message.databinding.impl
Class XMLStringBlockImpl
java.lang.Object
org.apache.axis2.jaxws.message.impl.BlockImpl
org.apache.axis2.jaxws.message.databinding.impl.XMLStringBlockImpl
- All Implemented Interfaces:
- org.apache.axiom.om.OMDataSource, org.apache.axiom.om.OMDataSourceExt, Block, XMLStringBlock
public class XMLStringBlockImpl
- extends BlockImpl
- implements XMLStringBlock
XMLStringBlock
Block containing a business object that is a String of xml text
Fields inherited from interface org.apache.axiom.om.OMDataSourceExt |
LOSSY_PREFIX |
Methods inherited from class org.apache.axis2.jaxws.message.impl.BlockImpl |
_getBOFromBO, _getOMFromBO, _getReaderFromOM, _outputFromOM, _outputFromReader, _postPivot_getXMLStreamReader, _postPivot_outputTo, getBlockFactory, getBusinessContext, getBusinessObject, getOMElement, getParent, getProperty, getQName, getReader, getXMLStreamReader, hasProperty, isBusinessObject, isConsumed, isQNameAvailable, outputTo, serialize, serialize, serialize, setConsumed, setParent, setProperty, setQName, traceString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.axis2.jaxws.message.Block |
getBlockFactory, getBusinessContext, getBusinessObject, getOMElement, getParent, getQName, getXMLStreamReader, isConsumed, isQNameAvailable, outputTo, setParent, traceString |
Methods inherited from interface org.apache.axiom.om.OMDataSourceExt |
getProperty, getReader, hasProperty, serialize, serialize, serialize, setProperty |
XMLStringBlockImpl
public XMLStringBlockImpl(org.apache.axiom.om.OMElement omElement,
QName qName,
BlockFactory factory)
- Constructor called from factory
- Parameters:
reader
- qName
- factory
-
_getBOFromReader
protected Object _getBOFromReader(XMLStreamReader reader,
Object busContext)
throws XMLStreamException
- Description copied from class:
BlockImpl
- The derived class must provide an implementation that builds the business object from the
reader
- Specified by:
_getBOFromReader
in class BlockImpl
- Parameters:
reader
- XMLStreamReader, which is consumed
- Returns:
-
- Throws:
XMLStreamException
_getBOFromOM
protected Object _getBOFromOM(org.apache.axiom.om.OMElement omElement,
Object busContext)
throws XMLStreamException,
WebServiceException
- Description copied from class:
BlockImpl
- Default method for getting business object from OM.
Derived classes may override this method to get the business object from a
data source.
- Overrides:
_getBOFromOM
in class BlockImpl
- Returns:
- Business Object
- Throws:
XMLStreamException
WebServiceException
_getReaderFromBO
protected XMLStreamReader _getReaderFromBO(Object busObj,
Object busContext)
throws XMLStreamException
- Description copied from class:
BlockImpl
- Get an XMLStreamReader for the BusinessObject The derived Block must implement this method
- Specified by:
_getReaderFromBO
in class BlockImpl
- Returns:
-
- Throws:
XMLStreamException
_outputFromBO
protected void _outputFromBO(Object busObject,
Object busContext,
XMLStreamWriter writer)
throws XMLStreamException
- Description copied from class:
BlockImpl
- Output BusinessObject contents to a Writer.
Derived classes must provide this implementation
- Specified by:
_outputFromBO
in class BlockImpl
- Throws:
XMLStreamException
isElementData
public boolean isElementData()
- Specified by:
isElementData
in interface Block
- Returns:
- true if data is always an element; false if possibly mixed content or multiple
elements
close
public void close()
- Specified by:
close
in interface org.apache.axiom.om.OMDataSourceExt
getXMLInputStream
public InputStream getXMLInputStream(String encoding)
throws UnsupportedEncodingException
- Specified by:
getXMLInputStream
in interface org.apache.axiom.om.OMDataSourceExt
- Throws:
UnsupportedEncodingException
getObject
public Object getObject()
- Specified by:
getObject
in interface org.apache.axiom.om.OMDataSourceExt
isDestructiveRead
public boolean isDestructiveRead()
- Specified by:
isDestructiveRead
in interface org.apache.axiom.om.OMDataSourceExt
isDestructiveWrite
public boolean isDestructiveWrite()
- Specified by:
isDestructiveWrite
in interface org.apache.axiom.om.OMDataSourceExt
copy
public org.apache.axiom.om.OMDataSourceExt copy()
throws org.apache.axiom.om.OMException
- Specified by:
copy
in interface org.apache.axiom.om.OMDataSourceExt
- Overrides:
copy
in class BlockImpl
- Throws:
org.apache.axiom.om.OMException
getXMLBytes
public byte[] getXMLBytes(String encoding)
throws UnsupportedEncodingException
- Specified by:
getXMLBytes
in interface org.apache.axiom.om.OMDataSourceExt
- Throws:
UnsupportedEncodingException
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.