org.apache.axiom.om.impl.dom
Class CharacterImpl

java.lang.Object
  extended by org.apache.axiom.om.impl.dom.NodeImpl
      extended by org.apache.axiom.om.impl.dom.LeafNode
          extended by org.apache.axiom.om.impl.dom.CharacterImpl
All Implemented Interfaces:
IChildNode, OMNodeEx, OMInformationItem, OMNode, OMSerializable, org.w3c.dom.CharacterData, org.w3c.dom.Node
Direct Known Subclasses:
CommentImpl, TextNodeImpl

public abstract class CharacterImpl
extends LeafNode
implements org.w3c.dom.CharacterData, OMNodeEx

This implements the OMText operations which are to be inherited by TextImpl, CommentImpl, CDATASectionImpl.


Field Summary
protected  java.lang.String textValue
           
 
Fields inherited from class org.apache.axiom.om.impl.dom.NodeImpl
factory, FIRSTCHILD, flags, HAS_PARENT, SPECIFIED
 
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
 
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
protected CharacterImpl(OMFactory factory)
           
  CharacterImpl(java.lang.String value, OMFactory factory)
           
 
Method Summary
 void appendData(java.lang.String value)
           
 void deleteData(int offset, int count)
           
 java.lang.String getData()
          Returns the value of the data.
 int getLength()
          Returns the length of the string value.
 void insertData(int offset, java.lang.String data)
          Inserts a string at the specified offset.
 void replaceData(int offset, int count, java.lang.String data)
          If the given data is null the content will be deleted.
 void setData(java.lang.String data)
          Sets the text value of data.
 java.lang.String substringData(int offset, int count)
          Extracts a range of data from the node.
 
Methods inherited from class org.apache.axiom.om.impl.dom.LeafNode
appendChild, build, discard, getBuilder, getChildNodes, getIParentNode, getNextOMSibling, getNextSibling, insertBefore, isComplete, lookupNamespaceURI, removeChild, replaceChild, setComplete
 
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl
buildWithAttachments, clone, cloneNode, close, compareDocumentPosition, detach, getAttributes, getBaseURI, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextOMSiblingIfAvailable, getNodeValue, getOMFactory, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousOMSibling, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerialize, internalSerializeAndConsume, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupPrefix, normalize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setNextOMSibling, setNodeValue, setParent, setParent, setPrefix, setPreviousOMSibling, setTextContent, setUserData
 
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.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.apache.axiom.om.impl.OMNodeEx
getNextOMSiblingIfAvailable, internalSerialize, internalSerialize, internalSerializeAndConsume, setComplete, setNextOMSibling, setParent, setPreviousOMSibling
 
Methods inherited from interface org.apache.axiom.om.OMNode
buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, isComplete, serialize, serialize, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMInformationItem
clone, getOMFactory
 

Field Detail

textValue

protected java.lang.String textValue
Constructor Detail

CharacterImpl

protected CharacterImpl(OMFactory factory)

CharacterImpl

public CharacterImpl(java.lang.String value,
                     OMFactory factory)
Method Detail

appendData

public void appendData(java.lang.String value)
                throws org.w3c.dom.DOMException
Specified by:
appendData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

deleteData

public void deleteData(int offset,
                       int count)
                throws org.w3c.dom.DOMException
Specified by:
deleteData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

replaceData

public void replaceData(int offset,
                        int count,
                        java.lang.String data)
                 throws org.w3c.dom.DOMException
If the given data is null the content will be deleted.

Specified by:
replaceData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

getData

public java.lang.String getData()
                         throws org.w3c.dom.DOMException
Returns the value of the data.

Specified by:
getData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

insertData

public void insertData(int offset,
                       java.lang.String data)
                throws org.w3c.dom.DOMException
Inserts a string at the specified offset.

Specified by:
insertData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

setData

public void setData(java.lang.String data)
             throws org.w3c.dom.DOMException
Sets the text value of data.

Specified by:
setData in interface org.w3c.dom.CharacterData
Throws:
org.w3c.dom.DOMException

substringData

public java.lang.String substringData(int offset,
                                      int count)
                               throws org.w3c.dom.DOMException
Extracts a range of data from the node.

Specified by:
substringData in interface org.w3c.dom.CharacterData
Returns:
Returns the specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.
Throws:
org.w3c.dom.DOMException

getLength

public int getLength()
Returns the length of the string value.

Specified by:
getLength in interface org.w3c.dom.CharacterData


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.