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
- Author:
- lukas
-
-
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
Constructors Modifier Constructor Description protectedTextImpl(SOAPDocumentImpl ownerDoc, String text)protectedTextImpl(SOAPDocumentImpl ownerDoc, CharacterData data)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description NodeappendChild(Node newChild)voidappendData(String arg)NodecloneNode(boolean deep)shortcompareDocumentPosition(Node other)protected abstract TcreateN(SOAPDocumentImpl ownerDoc, String text)protected abstract TcreateN(SOAPDocumentImpl ownerDoc, CharacterData data)voiddeleteData(int offset, int count)voiddetachNode()Removes thisNodeobject from the tree.protected abstract TextImpl<T>doClone()NamedNodeMapgetAttributes()StringgetBaseURI()NodeListgetChildNodes()StringgetData()TgetDomElement()ObjectgetFeature(String feature, String version)NodegetFirstChild()NodegetLastChild()intgetLength()StringgetLocalName()StringgetNamespaceURI()NodegetNextSibling()StringgetNodeName()shortgetNodeType()StringgetNodeValue()DocumentgetOwnerDocument()SOAPElementgetParentElement()Returns the parent element of thisNodeobject.NodegetParentNode()StringgetPrefix()NodegetPreviousSibling()SOAPDocumentImplgetSoapDocument()StringgetTextContent()ObjectgetUserData(String key)StringgetValue()Returns the value of this node if this is aTextnode or the value of the immediate child of this node otherwise.booleanhasAttributes()booleanhasChildNodes()NodeinsertBefore(Node newChild, Node refChild)voidinsertData(int offset, String arg)booleanisDefaultNamespace(String namespaceURI)booleanisEqualNode(Node arg)booleanisSameNode(Node other)booleanisSupported(String feature, String version)StringlookupNamespaceURI(String prefix)StringlookupPrefix(String namespaceURI)voidnormalize()voidrecycleNode()Notifies the implementation that thisNodeobject 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.NoderemoveChild(Node oldChild)NodereplaceChild(Node newChild, Node oldChild)voidreplaceData(int offset, int count, String arg)voidsetData(String data)voidsetNodeValue(String nodeValue)voidsetParentElement(SOAPElement parent)Sets the parent of thisNodeobject to the givenSOAPElementobject.voidsetPrefix(String prefix)voidsetTextContent(String textContent)ObjectsetUserData(String key, Object data, UserDataHandler handler)voidsetValue(String text)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.StringsubstringData(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 Detail
-
TextImpl
protected TextImpl(SOAPDocumentImpl ownerDoc, String text)
-
TextImpl
protected TextImpl(SOAPDocumentImpl ownerDoc, CharacterData data)
-
-
Method Detail
-
createN
protected abstract T createN(SOAPDocumentImpl ownerDoc, CharacterData data)
-
createN
protected abstract T createN(SOAPDocumentImpl ownerDoc, String text)
-
getDomElement
public T getDomElement()
-
getValue
public String getValue()
Description copied from interface:NodeReturns the value of this node if this is aTextnode or the value of the immediate child of this node otherwise. If there is an immediate child of thisNodethat it is aTextnode then it's value will be returned. If there is more than oneTextnode then the value of the firstTextNode will be returned. Otherwisenullis returned.
-
setValue
public void setValue(String text)
Description copied from interface:NodeIf 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 aTextnode, or if there are no children in which case a childTextnode will be created.
-
setParentElement
public void setParentElement(SOAPElement parent) throws SOAPException
Description copied from interface:NodeSets the parent of thisNodeobject to the givenSOAPElementobject.- Specified by:
setParentElementin interfaceNode- Parameters:
parent- theSOAPElementobject to be set as the parent of thisNodeobject- Throws:
SOAPException- if there is a problem in setting the parent to the given element- See Also:
Node.getParentElement()
-
getParentElement
public SOAPElement getParentElement()
Description copied from interface:NodeReturns the parent element of thisNodeobject. This method can throw anUnsupportedOperationExceptionif the tree is not kept in memory.- Specified by:
getParentElementin interfaceNode- Returns:
- the
SOAPElementobject that is the parent of thisNodeobject ornullif thisNodeobject is root - See Also:
Node.setParentElement(jakarta.xml.soap.SOAPElement)
-
detachNode
public void detachNode()
Description copied from interface:NodeRemoves thisNodeobject from the tree.- Specified by:
detachNodein interfaceNode
-
recycleNode
public void recycleNode()
Description copied from interface:NodeNotifies the implementation that thisNodeobject 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
recycleNodeimplies that the methoddetachNodehas been called previously.- Specified by:
recycleNodein interfaceNode
-
getNodeName
public String getNodeName()
- Specified by:
getNodeNamein interfaceNode
-
getNodeValue
public String getNodeValue() throws DOMException
- Specified by:
getNodeValuein interfaceNode- Throws:
DOMException
-
setNodeValue
public void setNodeValue(String nodeValue) throws DOMException
- Specified by:
setNodeValuein interfaceNode- Throws:
DOMException
-
getNodeType
public short getNodeType()
- Specified by:
getNodeTypein interfaceNode
-
getParentNode
public Node getParentNode()
- Specified by:
getParentNodein interfaceNode
-
getChildNodes
public NodeList getChildNodes()
- Specified by:
getChildNodesin interfaceNode
-
getFirstChild
public Node getFirstChild()
- Specified by:
getFirstChildin interfaceNode
-
getLastChild
public Node getLastChild()
- Specified by:
getLastChildin interfaceNode
-
getPreviousSibling
public Node getPreviousSibling()
- Specified by:
getPreviousSiblingin interfaceNode
-
getNextSibling
public Node getNextSibling()
- Specified by:
getNextSiblingin interfaceNode
-
getAttributes
public NamedNodeMap getAttributes()
- Specified by:
getAttributesin interfaceNode
-
getOwnerDocument
public Document getOwnerDocument()
- Specified by:
getOwnerDocumentin interfaceNode
-
insertBefore
public Node insertBefore(Node newChild, Node refChild) throws DOMException
- Specified by:
insertBeforein interfaceNode- Throws:
DOMException
-
replaceChild
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
- Specified by:
replaceChildin interfaceNode- Throws:
DOMException
-
removeChild
public Node removeChild(Node oldChild) throws DOMException
- Specified by:
removeChildin interfaceNode- Throws:
DOMException
-
appendChild
public Node appendChild(Node newChild) throws DOMException
- Specified by:
appendChildin interfaceNode- Throws:
DOMException
-
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodesin interfaceNode
-
isSupported
public boolean isSupported(String feature, String version)
- Specified by:
isSupportedin interfaceNode
-
getNamespaceURI
public String getNamespaceURI()
- Specified by:
getNamespaceURIin interfaceNode
-
setPrefix
public void setPrefix(String prefix) throws DOMException
- Specified by:
setPrefixin interfaceNode- Throws:
DOMException
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfaceNode
-
hasAttributes
public boolean hasAttributes()
- Specified by:
hasAttributesin interfaceNode
-
getBaseURI
public String getBaseURI()
- Specified by:
getBaseURIin interfaceNode
-
compareDocumentPosition
public short compareDocumentPosition(Node other) throws DOMException
- Specified by:
compareDocumentPositionin interfaceNode- Throws:
DOMException
-
getTextContent
public String getTextContent() throws DOMException
- Specified by:
getTextContentin interfaceNode- Throws:
DOMException
-
setTextContent
public void setTextContent(String textContent) throws DOMException
- Specified by:
setTextContentin interfaceNode- Throws:
DOMException
-
isSameNode
public boolean isSameNode(Node other)
- Specified by:
isSameNodein interfaceNode
-
lookupPrefix
public String lookupPrefix(String namespaceURI)
- Specified by:
lookupPrefixin interfaceNode
-
isDefaultNamespace
public boolean isDefaultNamespace(String namespaceURI)
- Specified by:
isDefaultNamespacein interfaceNode
-
lookupNamespaceURI
public String lookupNamespaceURI(String prefix)
- Specified by:
lookupNamespaceURIin interfaceNode
-
isEqualNode
public boolean isEqualNode(Node arg)
- Specified by:
isEqualNodein interfaceNode
-
getFeature
public Object getFeature(String feature, String version)
- Specified by:
getFeaturein interfaceNode
-
setUserData
public Object setUserData(String key, Object data, UserDataHandler handler)
- Specified by:
setUserDatain interfaceNode
-
getUserData
public Object getUserData(String key)
- Specified by:
getUserDatain interfaceNode
-
getData
public String getData() throws DOMException
- Specified by:
getDatain interfaceCharacterData- Throws:
DOMException
-
setData
public void setData(String data) throws DOMException
- Specified by:
setDatain interfaceCharacterData- Throws:
DOMException
-
getLength
public int getLength()
- Specified by:
getLengthin interfaceCharacterData
-
substringData
public String substringData(int offset, int count) throws DOMException
- Specified by:
substringDatain interfaceCharacterData- Throws:
DOMException
-
appendData
public void appendData(String arg) throws DOMException
- Specified by:
appendDatain interfaceCharacterData- Throws:
DOMException
-
insertData
public void insertData(int offset, String arg) throws DOMException- Specified by:
insertDatain interfaceCharacterData- Throws:
DOMException
-
deleteData
public void deleteData(int offset, int count) throws DOMException- Specified by:
deleteDatain interfaceCharacterData- Throws:
DOMException
-
replaceData
public void replaceData(int offset, int count, String arg) throws DOMException- Specified by:
replaceDatain interfaceCharacterData- Throws:
DOMException
-
getSoapDocument
public SOAPDocumentImpl getSoapDocument()
-
-