org.apache.axis2.om.impl.llom
Class OMTextImpl

java.lang.Object
  extended byorg.apache.axis2.om.impl.llom.OMNodeImpl
      extended byorg.apache.axis2.om.impl.llom.OMTextImpl
All Implemented Interfaces:
OMConstants, OMNode, OMNodeEx, OMText

public class OMTextImpl
extends OMNodeImpl
implements OMText, OMConstants


Field Summary
protected  OMAttribute attribute
          Field attributes used when serialising Binary stuff as MTOM optimised
protected  boolean isBinary
           
protected  java.lang.String localName
          Field localName used when serialising Binary stuff as MTOM optimised
protected  java.lang.String mimeType
           
protected  OMNamespace ns
          Field nameSpace used when serialising Binary stuff as MTOM optimised
protected  boolean optimize
           
protected  java.lang.String value
           
 
Fields inherited from class org.apache.axis2.om.impl.llom.OMNodeImpl
builder, done, nextSibling, nodeType, parent, previousSibling
 
Fields inherited from interface org.apache.axis2.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Fields inherited from interface org.apache.axis2.om.OMConstants
ARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DEFAULT_CHAR_SET_ENCODING, DEFAULT_XML_VERSION, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER
 
Constructor Summary
OMTextImpl(java.lang.Object dataHandler)
           
OMTextImpl(java.lang.Object dataHandler, boolean optimize)
           
OMTextImpl(OMElement parent, java.lang.String text)
          Constructor OMTextImpl
OMTextImpl(OMElement parent, java.lang.String s, java.lang.String mimeType, boolean optimize)
           
OMTextImpl(java.lang.String s)
          Constructor OMTextImpl
OMTextImpl(java.lang.String s, int nodeType)
           
OMTextImpl(java.lang.String contentID, OMElement parent, OMXMLParserWrapper builder)
           
OMTextImpl(java.lang.String s, java.lang.String mimeType, boolean optimize)
           
 
Method Summary
 void discard()
          Slightly different implementation of the discard method
 java.lang.String getContentID()
          get the content id
 java.lang.Object getDataHandler()
          To get the datahandler
 java.io.InputStream getInputStream()
           
 java.lang.String getLocalName()
           
 java.lang.String getText()
          Returns the value
 boolean isComplete()
          this will indicate whether parser has parsed this information item completely or not.
 boolean isOptimized()
           
 void serialize(OMOutputImpl omOutput)
           
 void serializeWithCache(OMOutputImpl omOutput)
           
 void setOptimize(boolean value)
          set the optimize flag
 
Methods inherited from class org.apache.axis2.om.impl.llom.OMNodeImpl
build, detach, getNextSibling, getParent, getPreviousSibling, getType, insertSiblingAfter, insertSiblingBefore, serialize, serializeWithCache, setComplete, setNextSibling, setParent, setPreviousSibling, setType
 
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.om.OMNode
build, detach, getNextSibling, getParent, getPreviousSibling, getType, insertSiblingAfter, insertSiblingBefore, serialize, serializeWithCache
 

Field Detail

value

protected java.lang.String value

mimeType

protected java.lang.String mimeType

optimize

protected boolean optimize

isBinary

protected boolean isBinary

ns

protected OMNamespace ns
Field nameSpace used when serialising Binary stuff as MTOM optimised


localName

protected java.lang.String localName
Field localName used when serialising Binary stuff as MTOM optimised


attribute

protected OMAttribute attribute
Field attributes used when serialising Binary stuff as MTOM optimised

Constructor Detail

OMTextImpl

public OMTextImpl(java.lang.String s)
Constructor OMTextImpl

Parameters:
s -

OMTextImpl

public OMTextImpl(java.lang.String s,
                  int nodeType)
Parameters:
s -
nodeType - - OMText can handler CHARACTERS, SPACES, CDATA and ENTITY REFERENCES. Constants for this can be found in OMNode.

OMTextImpl

public OMTextImpl(OMElement parent,
                  java.lang.String text)
Constructor OMTextImpl

Parameters:
parent -
text -

OMTextImpl

public OMTextImpl(java.lang.String s,
                  java.lang.String mimeType,
                  boolean optimize)
Parameters:
s - - base64 encoded String representation of Binary
mimeType - of the Binary

OMTextImpl

public OMTextImpl(OMElement parent,
                  java.lang.String s,
                  java.lang.String mimeType,
                  boolean optimize)
Parameters:
parent -
s - - base64 encoded String representation of Binary
mimeType - of the Binary

OMTextImpl

public OMTextImpl(java.lang.Object dataHandler)
Parameters:
dataHandler - To send binary optimised content Created programatically.

OMTextImpl

public OMTextImpl(java.lang.Object dataHandler,
                  boolean optimize)
Parameters:
dataHandler -
optimize - To send binary content. Created progrmatically.

OMTextImpl

public OMTextImpl(java.lang.String contentID,
                  OMElement parent,
                  OMXMLParserWrapper builder)
Parameters:
contentID -
parent -
builder - Used when the builder is encountered with a XOP:Include tag Stores a reference to the builder and the content-id. Supports deffered parsing of MIME messages
Method Detail

serializeWithCache

public void serializeWithCache(OMOutputImpl omOutput)
                        throws XMLStreamException
Overrides:
serializeWithCache in class OMNodeImpl
Parameters:
omOutput -
Throws:
XMLStreamException
See Also:
#serializeWithCache(org.apache.axis2.om.impl.OMOutputImpl)

getText

public java.lang.String getText()
                         throws OMException
Returns the value

Specified by:
getText in interface OMText
Returns:
string
Throws:
OMException

isOptimized

public boolean isOptimized()
Specified by:
isOptimized in interface OMText
Returns:
boolean flag saying whether the node contains an optimized text or not

setOptimize

public void setOptimize(boolean value)
Description copied from interface: OMText
set the optimize flag

Specified by:
setOptimize in interface OMText
Parameters:
value -

getDataHandler

public java.lang.Object getDataHandler()
To get the datahandler

Specified by:
getDataHandler in interface OMText
Returns:
javax.activation.DataHandler

getLocalName

public java.lang.String getLocalName()

getInputStream

public java.io.InputStream getInputStream()
                                   throws OMException
Throws:
OMException

getContentID

public java.lang.String getContentID()
Description copied from interface: OMText
get the content id

Specified by:
getContentID in interface OMText
Returns:
string

isComplete

public boolean isComplete()
Description copied from interface: OMNode
this will indicate whether parser has parsed this information item completely or not. If somethings info are not available in the item, one has to check this attribute to make sure that, this item has been parsed completely or not.

Specified by:
isComplete in interface OMNode
Overrides:
isComplete in class OMNodeImpl
Returns:
boolean

serialize

public void serialize(OMOutputImpl omOutput)
               throws XMLStreamException
Overrides:
serialize in class OMNodeImpl
Parameters:
omOutput -
Throws:
XMLStreamException
See Also:
#serialize(org.apache.axis2.om.impl.OMOutputImpl)

discard

public void discard()
             throws OMException
Slightly different implementation of the discard method

Specified by:
discard in interface OMNode
Throws:
OMException