Module com.sun.xml.messaging.saaj
Class TextImpl<T extends CharacterData>
java.lang.Object
com.sun.xml.messaging.saaj.soap.impl.TextImpl<T>
- Type Parameters:
T
- node type
- All Implemented Interfaces:
Node
,Text
,CharacterData
,Node
,Text
- Direct Known Subclasses:
CDATAImpl
,SOAPCommentImpl
,SOAPTextImpl
public abstract class TextImpl<T extends CharacterData>
extends Object
implements Text, CharacterData
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
ModifierConstructorDescriptionprotected
TextImpl
(SOAPDocumentImpl ownerDoc, String text) protected
TextImpl
(SOAPDocumentImpl ownerDoc, CharacterData data) -
Method Summary
Modifier and TypeMethodDescriptionappendChild
(Node newChild) void
appendData
(String arg) cloneNode
(boolean deep) short
compareDocumentPosition
(Node other) protected abstract T
createN
(SOAPDocumentImpl ownerDoc, String text) protected abstract T
createN
(SOAPDocumentImpl ownerDoc, CharacterData data) void
deleteData
(int offset, int count) void
Removes thisNode
object from the tree.doClone()
getData()
getFeature
(String feature, String version) int
short
Returns the parent element of thisNode
object.getUserData
(String key) getValue()
Returns the value of this node if this is aText
node or the value of the immediate child of this node otherwise.boolean
boolean
insertBefore
(Node newChild, Node refChild) void
insertData
(int offset, String arg) boolean
isDefaultNamespace
(String namespaceURI) boolean
isEqualNode
(Node arg) boolean
isSameNode
(Node other) boolean
isSupported
(String feature, String version) lookupNamespaceURI
(String prefix) lookupPrefix
(String namespaceURI) void
void
Notifies the implementation that thisNode
object is no longer being used by the application and that the implementation is free to reuse this object for nodes that may be created later.removeChild
(Node oldChild) replaceChild
(Node newChild, Node oldChild) void
replaceData
(int offset, int count, String arg) void
void
setNodeValue
(String nodeValue) void
setParentElement
(SOAPElement parent) Sets the parent of thisNode
object to the givenSOAPElement
object.void
void
setTextContent
(String textContent) setUserData
(String key, Object data, UserDataHandler handler) void
If this is a Text node then this method will set its value, otherwise it sets the value of the immediate (Text) child of this node.substringData
(int offset, int count) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.w3c.dom.Text
getWholeText, isElementContentWhitespace, replaceWholeText, splitText
-
Constructor Details
-
TextImpl
-
TextImpl
-
-
Method Details
-
createN
-
createN
-
doClone
-
getDomElement
-
getValue
Description copied from interface:Node
Returns the value of this node if this is aText
node or the value of the immediate child of this node otherwise. If there is an immediate child of thisNode
that it is aText
node then it's value will be returned. If there is more than oneText
node then the value of the firstText
Node will be returned. Otherwisenull
is returned. -
setValue
Description copied from interface:Node
If this is a Text node then this method will set its value, otherwise it sets the value of the immediate (Text) child of this node. The value of the immediate child of this node can be set only if, there is one child node and that node is aText
node, or if there are no children in which case a childText
node will be created. -
setParentElement
Description copied from interface:Node
Sets the parent of thisNode
object to the givenSOAPElement
object.- Specified by:
setParentElement
in interfaceNode
- Parameters:
parent
- theSOAPElement
object to be set as the parent of thisNode
object- Throws:
SOAPException
- if there is a problem in setting the parent to the given element- See Also:
-
getParentElement
Description copied from interface:Node
Returns the parent element of thisNode
object. This method can throw anUnsupportedOperationException
if the tree is not kept in memory.- Specified by:
getParentElement
in interfaceNode
- Returns:
- the
SOAPElement
object that is the parent of thisNode
object ornull
if thisNode
object is root - See Also:
-
detachNode
public void detachNode()Description copied from interface:Node
Removes thisNode
object from the tree.- Specified by:
detachNode
in interfaceNode
-
recycleNode
public void recycleNode()Description copied from interface:Node
Notifies the implementation that thisNode
object is no longer being used by the application and that the implementation is free to reuse this object for nodes that may be created later.Calling the method
recycleNode
implies that the methoddetachNode
has been called previously.- Specified by:
recycleNode
in interfaceNode
-
getNodeName
- Specified by:
getNodeName
in interfaceNode
-
getNodeValue
- Specified by:
getNodeValue
in interfaceNode
- Throws:
DOMException
-
setNodeValue
- Specified by:
setNodeValue
in interfaceNode
- Throws:
DOMException
-
getNodeType
public short getNodeType()- Specified by:
getNodeType
in interfaceNode
-
getParentNode
- Specified by:
getParentNode
in interfaceNode
-
getChildNodes
- Specified by:
getChildNodes
in interfaceNode
-
getFirstChild
- Specified by:
getFirstChild
in interfaceNode
-
getLastChild
- Specified by:
getLastChild
in interfaceNode
-
getPreviousSibling
- Specified by:
getPreviousSibling
in interfaceNode
-
getNextSibling
- Specified by:
getNextSibling
in interfaceNode
-
getAttributes
- Specified by:
getAttributes
in interfaceNode
-
getOwnerDocument
- Specified by:
getOwnerDocument
in interfaceNode
-
insertBefore
- Specified by:
insertBefore
in interfaceNode
- Throws:
DOMException
-
replaceChild
- Specified by:
replaceChild
in interfaceNode
- Throws:
DOMException
-
removeChild
- Specified by:
removeChild
in interfaceNode
- Throws:
DOMException
-
appendChild
- Specified by:
appendChild
in interfaceNode
- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()- Specified by:
hasChildNodes
in interfaceNode
-
cloneNode
-
normalize
public void normalize() -
isSupported
- Specified by:
isSupported
in interfaceNode
-
getNamespaceURI
- Specified by:
getNamespaceURI
in interfaceNode
-
getPrefix
-
setPrefix
- Specified by:
setPrefix
in interfaceNode
- Throws:
DOMException
-
getLocalName
- Specified by:
getLocalName
in interfaceNode
-
hasAttributes
public boolean hasAttributes()- Specified by:
hasAttributes
in interfaceNode
-
getBaseURI
- Specified by:
getBaseURI
in interfaceNode
-
compareDocumentPosition
- Specified by:
compareDocumentPosition
in interfaceNode
- Throws:
DOMException
-
getTextContent
- Specified by:
getTextContent
in interfaceNode
- Throws:
DOMException
-
setTextContent
- Specified by:
setTextContent
in interfaceNode
- Throws:
DOMException
-
isSameNode
- Specified by:
isSameNode
in interfaceNode
-
lookupPrefix
- Specified by:
lookupPrefix
in interfaceNode
-
isDefaultNamespace
- Specified by:
isDefaultNamespace
in interfaceNode
-
lookupNamespaceURI
- Specified by:
lookupNamespaceURI
in interfaceNode
-
isEqualNode
- Specified by:
isEqualNode
in interfaceNode
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
setUserData
- Specified by:
setUserData
in interfaceNode
-
getUserData
- Specified by:
getUserData
in interfaceNode
-
getData
- Specified by:
getData
in interfaceCharacterData
- Throws:
DOMException
-
setData
- Specified by:
setData
in interfaceCharacterData
- Throws:
DOMException
-
getLength
public int getLength()- Specified by:
getLength
in interfaceCharacterData
-
substringData
- Specified by:
substringData
in interfaceCharacterData
- Throws:
DOMException
-
appendData
- Specified by:
appendData
in interfaceCharacterData
- Throws:
DOMException
-
insertData
- Specified by:
insertData
in interfaceCharacterData
- Throws:
DOMException
-
deleteData
- Specified by:
deleteData
in interfaceCharacterData
- Throws:
DOMException
-
replaceData
- Specified by:
replaceData
in interfaceCharacterData
- Throws:
DOMException
-
getSoapDocument
-