org.apache.axiom.om.impl.dom
Class TextImpl
java.lang.Object
org.apache.axiom.om.impl.dom.NodeImpl
org.apache.axiom.om.impl.dom.ChildNode
org.apache.axiom.om.impl.dom.CharacterImpl
org.apache.axiom.om.impl.dom.TextImpl
- All Implemented Interfaces:
- org.w3c.dom.CharacterData, java.lang.Cloneable, org.w3c.dom.Node, org.w3c.dom.NodeList, org.apache.axiom.om.OMNode, org.apache.axiom.om.impl.OMNodeEx, org.apache.axiom.om.OMText, org.w3c.dom.Text
- public class TextImpl
- extends CharacterImpl
- implements org.w3c.dom.Text, org.apache.axiom.om.OMText
Field Summary |
protected org.apache.axiom.om.OMAttribute |
attribute
Field attribute is used when serializing Binary stuff as MTOM optimized. |
protected char[] |
charArray
|
protected java.lang.String |
localName
Field localName is used when serializing Binary stuff as MTOM optimized. |
protected org.apache.axiom.om.OMNamespace |
ns
Field nameSpace is used when serializing Binary stuff as MTOM optimized. |
protected org.apache.axiom.om.OMNamespace |
textNS
|
static org.apache.axiom.om.OMNamespace |
XOP_NS
Field nameSpace used when serializing Binary stuff as MTOM optimized. |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from interface org.apache.axiom.om.OMNode |
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE |
Constructor Summary |
TextImpl(DocumentImpl ownerNode,
char[] value,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(DocumentImpl ownerNode,
java.lang.Object dataHandler,
boolean optimize,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(DocumentImpl ownerNode,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(DocumentImpl ownerNode,
java.lang.String value,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(DocumentImpl ownerNode,
java.lang.String value,
java.lang.String mimeType,
boolean optimize,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(org.apache.axiom.om.OMContainer parent,
javax.xml.namespace.QName text,
int nodeType,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(org.apache.axiom.om.OMContainer parent,
javax.xml.namespace.QName text,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(java.lang.String contentID,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMXMLParserWrapper builder,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(java.lang.String text,
org.apache.axiom.om.OMFactory factory)
Creates a text node with the given text required by the OMDOMFactory. |
TextImpl(java.lang.String text,
java.lang.String mimeType,
boolean optimize,
boolean isBinary,
org.apache.axiom.om.OMFactory factory)
|
TextImpl(java.lang.String text,
java.lang.String mimeType,
boolean optimize,
org.apache.axiom.om.OMFactory factory)
|
Methods inherited from class org.apache.axiom.om.impl.dom.ChildNode |
detach, getNextOMSibling, getNextSibling, getParent, getParentNode, getPreviousOMSibling, getPreviousSibling, insertSiblingAfter, insertSiblingBefore, setNextOMSibling, setParent, setPreviousOMSibling |
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
appendChild, build, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getOMFactory, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, internalSerializeWithCache, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNodeValue, setOwnerDocument, setPrefix, setTextContent, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.CharacterData |
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData |
Methods inherited from interface org.w3c.dom.Node |
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Methods inherited from interface org.apache.axiom.om.OMNode |
build, detach, getNextOMSibling, getOMFactory, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume |
textNS
protected org.apache.axiom.om.OMNamespace textNS
charArray
protected char[] charArray
ns
protected org.apache.axiom.om.OMNamespace ns
- Field nameSpace is used when serializing Binary stuff as MTOM optimized.
localName
protected java.lang.String localName
- Field localName is used when serializing Binary stuff as MTOM optimized.
attribute
protected org.apache.axiom.om.OMAttribute attribute
- Field attribute is used when serializing Binary stuff as MTOM optimized.
XOP_NS
public static final org.apache.axiom.om.OMNamespace XOP_NS
- Field nameSpace used when serializing Binary stuff as MTOM optimized.
TextImpl
public TextImpl(java.lang.String text,
org.apache.axiom.om.OMFactory factory)
- Creates a text node with the given text required by the OMDOMFactory. The owner document
should be set properly when appending this to a DOM tree.
- Parameters:
text
-
TextImpl
public TextImpl(java.lang.String contentID,
org.apache.axiom.om.OMContainer parent,
org.apache.axiom.om.OMXMLParserWrapper builder,
org.apache.axiom.om.OMFactory factory)
- 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
TextImpl
public TextImpl(java.lang.String text,
java.lang.String mimeType,
boolean optimize,
org.apache.axiom.om.OMFactory factory)
TextImpl
public TextImpl(java.lang.String text,
java.lang.String mimeType,
boolean optimize,
boolean isBinary,
org.apache.axiom.om.OMFactory factory)
TextImpl
public TextImpl(DocumentImpl ownerNode,
java.lang.Object dataHandler,
boolean optimize,
org.apache.axiom.om.OMFactory factory)
- Parameters:
dataHandler
- optimize
- To send binary content. Created progrmatically.
TextImpl
public TextImpl(DocumentImpl ownerNode,
org.apache.axiom.om.OMFactory factory)
- Parameters:
ownerNode
-
TextImpl
public TextImpl(DocumentImpl ownerNode,
java.lang.String value,
org.apache.axiom.om.OMFactory factory)
- Parameters:
ownerNode
- value
-
TextImpl
public TextImpl(DocumentImpl ownerNode,
char[] value,
org.apache.axiom.om.OMFactory factory)
TextImpl
public TextImpl(DocumentImpl ownerNode,
java.lang.String value,
java.lang.String mimeType,
boolean optimize,
org.apache.axiom.om.OMFactory factory)
- Parameters:
ownerNode
- value
-
TextImpl
public TextImpl(org.apache.axiom.om.OMContainer parent,
javax.xml.namespace.QName text,
org.apache.axiom.om.OMFactory factory)
TextImpl
public TextImpl(org.apache.axiom.om.OMContainer parent,
javax.xml.namespace.QName text,
int nodeType,
org.apache.axiom.om.OMFactory factory)
splitText
public org.w3c.dom.Text splitText(int offset)
throws org.w3c.dom.DOMException
- Breaks this node into two nodes at the specified offset, keeping both in the tree as
siblings. After being split, this node will contain all the content up to the offset point. A
new node of the same type, which contains all the content at and after the offset point, is
returned. If the original node had a parent node, the new node is inserted as the next
sibling of the original node. When the offset is equal to the length of this node, the new
node has no data.
- Specified by:
splitText
in interface org.w3c.dom.Text
- Throws:
org.w3c.dom.DOMException
getNodeName
public java.lang.String getNodeName()
- Specified by:
getNodeName
in interface org.w3c.dom.Node
getNodeType
public short getNodeType()
- Specified by:
getNodeType
in interface org.w3c.dom.Node
getType
public int getType()
throws org.apache.axiom.om.OMException
- Specified by:
getType
in interface org.apache.axiom.om.OMNode
- Throws:
org.apache.axiom.om.OMException
setType
public void setType(int nodeType)
throws org.apache.axiom.om.OMException
- Specified by:
setType
in interface org.apache.axiom.om.impl.OMNodeEx
- Throws:
org.apache.axiom.om.OMException
internalSerialize
public void internalSerialize(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
- Specified by:
internalSerialize
in interface org.apache.axiom.om.impl.OMNodeEx
- Throws:
javax.xml.stream.XMLStreamException
internalSerializeAndConsume
public void internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
- Specified by:
internalSerializeAndConsume
in interface org.apache.axiom.om.impl.OMNodeEx
- Throws:
javax.xml.stream.XMLStreamException
isOptimized
public boolean isOptimized()
- Specified by:
isOptimized
in interface org.apache.axiom.om.OMText
setOptimize
public void setOptimize(boolean value)
- Specified by:
setOptimize
in interface org.apache.axiom.om.OMText
discard
public void discard()
throws org.apache.axiom.om.OMException
- Specified by:
discard
in interface org.apache.axiom.om.OMNode
- Overrides:
discard
in class ChildNode
- Throws:
org.apache.axiom.om.OMException
getText
public java.lang.String getText()
- Specified by:
getText
in interface org.apache.axiom.om.OMText
getTextCharacters
public char[] getTextCharacters()
- Specified by:
getTextCharacters
in interface org.apache.axiom.om.OMText
isCharacters
public boolean isCharacters()
- Specified by:
isCharacters
in interface org.apache.axiom.om.OMText
getTextAsQName
public javax.xml.namespace.QName getTextAsQName()
- Specified by:
getTextAsQName
in interface org.apache.axiom.om.OMText
getNodeValue
public java.lang.String getNodeValue()
throws org.w3c.dom.DOMException
- Specified by:
getNodeValue
in interface org.w3c.dom.Node
- Overrides:
getNodeValue
in class NodeImpl
- Throws:
org.w3c.dom.DOMException
getContentID
public java.lang.String getContentID()
- Specified by:
getContentID
in interface org.apache.axiom.om.OMText
getDataHandler
public java.lang.Object getDataHandler()
- Specified by:
getDataHandler
in interface org.apache.axiom.om.OMText
getInputStream
public java.io.InputStream getInputStream()
throws org.apache.axiom.om.OMException
- Throws:
org.apache.axiom.om.OMException
cloneNode
public org.w3c.dom.Node cloneNode(boolean deep)
- Specified by:
cloneNode
in interface org.w3c.dom.Node
- Overrides:
cloneNode
in class ChildNode
getLocalName
public java.lang.String getLocalName()
- Specified by:
getLocalName
in interface org.w3c.dom.Node
- Overrides:
getLocalName
in class NodeImpl
getWholeText
public java.lang.String getWholeText()
isElementContentWhitespace
public boolean isElementContentWhitespace()
replaceWholeText
public org.w3c.dom.Text replaceWholeText(java.lang.String arg0)
throws org.w3c.dom.DOMException
- Throws:
org.w3c.dom.DOMException
toString
public java.lang.String toString()
buildWithAttachments
public void buildWithAttachments()
- Description copied from class:
NodeImpl
- Parses this node and builds the object structure in memory. AXIOM supports two levels of
deffered building. First is deffered building of AXIOM using StAX. Second level is the deffered
building of attachments. AXIOM reads in the attachements from the stream only when user asks by
calling getDataHandler(). build() method builds the OM without the attachments. buildAll()
builds the OM together with attachement data. This becomes handy when user wants to free the
input stream.
- Specified by:
buildWithAttachments
in interface org.apache.axiom.om.OMNode
- Overrides:
buildWithAttachments
in class NodeImpl
isBinary
public boolean isBinary()
- Specified by:
isBinary
in interface org.apache.axiom.om.OMText
setBinary
public void setBinary(boolean value)
- Receiving binary can happen as either MTOM attachments or as Base64 Text In the case of Base64
user has to explicitly specify that the content is binary, before calling getDataHandler(),
getInputStream()....
- Specified by:
setBinary
in interface org.apache.axiom.om.OMText
getNamespace
public org.apache.axiom.om.OMNamespace getNamespace()
- Specified by:
getNamespace
in interface org.apache.axiom.om.OMText
Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.