com.plumtree.openfoundation.xml.dom
Class XPCharacterData

java.lang.Object
  extended by com.plumtree.openfoundation.xml.dom.XPNode
      extended by com.plumtree.openfoundation.xml.dom.XPCharacterData
Direct Known Subclasses:
XPCDATASection, XPComment, XPText

public abstract class XPCharacterData
extends XPNode

The XPCharacterData class is a wrapper for objects implementing org.w3c.dom.CharacterData interface. Please refer to CharacterData (Java 2 Platform SE v1.4.2) for detail information.

Author:
djc

Field Summary
 
Fields inherited from class com.plumtree.openfoundation.xml.dom.XPNode
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
XPCharacterData(org.w3c.dom.CharacterData cData)
          Creates a new XPCharacterData object.
 
Method Summary
 void AppendData(java.lang.String arg)
          Append the string to the end of the character data of the node.
 void DeleteData(int offset, int count)
          Remove a range of 16-bit units from the node.
 java.lang.String GetData()
          The character data of the node.
 int GetLength()
          The number of 16-bit units that are available through data and the substringData method below.
 org.w3c.dom.Node GetUnderlyingObject()
          Retrieve the underlying Node object.
 void InsertData(int offset, java.lang.String arg)
          Insert a string at the specified 16-bit unit offset.
 void ReplaceData(int offset, int count, java.lang.String arg)
          Replace the characters starting at the specified 16-bit unit offset with the specified string.
 void SetData(java.lang.String data)
          Set the character data of the node.
 java.lang.String SubStringData(int offset, int count)
          Extracts a range of data from the node.
 
Methods inherited from class com.plumtree.openfoundation.xml.dom.XPNode
AppendChild, CloneNode, GetAttributes, GetChildNodes, GetFirstChild, GetLastChild, GetLocalName, GetNamespaceURI, GetNextSibling, GetNodeName, GetNodeType, GetNodeValue, GetOwnerDocument, GetParentNode, GetPrefix, GetPreviousSibling, HasAttributes, HasChildNodes, InsertBefore, IsAttributeNode, IsCDATASectionNode, IsCommentNode, IsDocumentFragmentNode, IsDocumentNode, IsDocumentTypeNode, IsElementNode, IsProcessingInstructionNode, IsSupported, IsTextNode, Normalize, RemoveChild, ReplaceChild, SetNodeValue, SetPrefix, StoreNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPCharacterData

public XPCharacterData(org.w3c.dom.CharacterData cData)
Creates a new XPCharacterData object.

Parameters:
cData - - underlying characterdata obj
Method Detail

AppendData

public void AppendData(java.lang.String arg)
Append the string to the end of the character data of the node.

Parameters:
arg - - string to append

DeleteData

public void DeleteData(int offset,
                       int count)
Remove a range of 16-bit units from the node.

Parameters:
offset - - offset from which to start removing
count - - number of 16-bit units to delete.

GetData

public java.lang.String GetData()
The character data of the node.

Returns:
the character's data

GetLength

public int GetLength()
The number of 16-bit units that are available through data and the substringData method below.

Returns:
character length

GetUnderlyingObject

public org.w3c.dom.Node GetUnderlyingObject()
Retrieve the underlying Node object.

Overrides:
GetUnderlyingObject in class XPNode
Returns:
the underlying CharacterData object cast to Node.

InsertData

public void InsertData(int offset,
                       java.lang.String arg)
Insert a string at the specified 16-bit unit offset.

Parameters:
offset - - character offset at which to insert.
arg - - DOMString to insert.

ReplaceData

public void ReplaceData(int offset,
                        int count,
                        java.lang.String arg)
Replace the characters starting at the specified 16-bit unit offset with the specified string.

Parameters:
offset - - offset from which to start replacing.
count - - number of 16-bit units to replace
arg - - DOMString with which the range must be replaced.

SetData

public void SetData(java.lang.String data)
Set the character data of the node.

Parameters:
data - - data to be set

SubStringData

public java.lang.String SubStringData(int offset,
                                      int count)
Extracts a range of data from the node.

Parameters:
offset - - offset of substring to extract.
count - - number of 16-bit units to extract.
Returns:
a substring given the offset


Copyright © 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.