electric.xml
Class CharacterData

java.lang.Object
  extended byelectric.xml.Node
      extended byelectric.xml.Child
          extended byelectric.xml.CharacterData
All Implemented Interfaces:
org.w3c.dom.CharacterData, java.lang.Cloneable, IDOMConstants, IXMLConstants, org.w3c.dom.Node, java.io.Serializable
Direct Known Subclasses:
Comment, Text

public abstract class CharacterData
extends Child
implements org.w3c.dom.CharacterData

CharacterData.

Author:
webMethods
See Also:
Serialized Form

Field Summary
protected  java.lang.String string
           
 
Fields inherited from class electric.xml.Child
parent
 
Fields inherited from class electric.xml.Node
list, next, prev
 
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 electric.xml.IXMLConstants
ATTLIST_START, ATTLIST_STOP, CDATA, CDATA_START, CDATA_STOP, CLOSE_TAG, COLON, COMMENT_START, COMMENT_STOP, DOCTYPE_START, DOCTYPE_STOP, ELEMENTDECL_START, ELEMENTDECL_STOP, ENCODING, ENTITYDECL_START, ENTITYDECL_STOP, ID, ID_CASE, INSTRUCTION_START, INSTRUCTION_STOP, NEGATIVE_INFINITY, NOT_A_NUMBER, NOTATIONDECL_START, NOTATIONDECL_STOP, NULL, OPEN_TAG, POSITIVE_INFINITY, PUBLIC, SPECIALS, STANDALONE, SUBSTITUTES, SYSTEM, UNDEFINED, VERSION, XML, XML_NAMESPACE, XMLDECL_START, XMLDECL_STOP, XMLNS, XMLNS_NAMESPACE
 
Fields inherited from interface electric.xml.IDOMConstants
CDATA_SECTION_NAME, COMMENT_NAME, CORE, DOCUMENT_FRAGMENT_NAME, DOCUMENT_NAME, HIERARCHY_REQUEST_ERR, TEXT_NAME
 
Constructor Summary
CharacterData(Parent parent)
          Construct a CharacterData with the specified parent.
CharacterData(java.lang.String string)
          Construct a CharacterData with the specified string.
 
Method Summary
 void appendData(java.lang.String arg)
          Append the string to the end of the character data of this node.
 void deleteData(int offset, int count)
          Remove a range of characters from the node.
 java.lang.String getData()
          Return my string.
 int getLength()
          Return the length of the string.
 java.lang.String getNodeValue()
          Return the string.
 void insertData(int offset, java.lang.String arg)
          Insert a string at the specified offset.
 void replaceData(int offset, int count, java.lang.String arg)
          Replace the characters starting at the specified offset with the specified string.
 void setData(java.lang.String string)
          Set the new string.
 void setNodeValue(java.lang.String nodeValue)
          Set the string to the specified value.
 int size()
           
 java.lang.String substringData(int offset, int count)
          Return the specified substring.
 
Methods inherited from class electric.xml.Child
clone, cloneNode, getByteArray, getByteArray, getByteArray, getBytes, getBytes, getBytes, getDocument, getNextSiblingChild, getOwnerDocument, getParent, getParentNode, getPreviousSiblingChild, getRoot, replaceWith, setNextSiblingChild, setParent, setPreviousSiblingChild, toString, toString, write, write, write
 
Methods inherited from class electric.xml.Node
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNextSiblingNode, getNode, getNode, getNodeName, getNodes, getNodeType, getPrefix, getPreviousSibling, getPreviousSiblingNode, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, read, remove, removeChild, replaceChild, setNextSiblingNode, setPrefix, setPreviousSiblingNode, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix
 

Field Detail

string

protected java.lang.String string
Constructor Detail

CharacterData

public CharacterData(Parent parent)
Construct a CharacterData with the specified parent.

Parameters:
parent - The parent.

CharacterData

public CharacterData(java.lang.String string)
Construct a CharacterData with the specified string.

Parameters:
string - The string.
Method Detail

size

public int size()
Overrides:
size in class Node

getNodeValue

public java.lang.String getNodeValue()
Return the string.

Specified by:
getNodeValue in interface org.w3c.dom.Node
Overrides:
getNodeValue in class Node

setNodeValue

public void setNodeValue(java.lang.String nodeValue)
Set the string to the specified value.

Specified by:
setNodeValue in interface org.w3c.dom.Node
Overrides:
setNodeValue in class Node
Parameters:
nodeValue - The new string.

getData

public java.lang.String getData()
Return my string.

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

getLength

public int getLength()
Return the length of the string.

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

setData

public void setData(java.lang.String string)
Set the new string.

Specified by:
setData in interface org.w3c.dom.CharacterData
Parameters:
string - The new string.

appendData

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

Specified by:
appendData in interface org.w3c.dom.CharacterData
Parameters:
arg - The string to append.

deleteData

public void deleteData(int offset,
                       int count)
                throws org.w3c.dom.DOMException
Remove a range of characters from the node.

Specified by:
deleteData in interface org.w3c.dom.CharacterData
Parameters:
offset - The offset from which to start removing.
count - The number of characters to delete. If the sum of offset and count exceeds length then all characters units from offset to the end of the data are deleted.
Throws:
org.w3c.dom.DOMException - If the specified offset is negative or greater than the number of characters, or if the specified count is negative.

insertData

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

Specified by:
insertData in interface org.w3c.dom.CharacterData
Parameters:
offset - The character offset at which to insert.
arg - The string to insert.
Throws:
org.w3c.dom.DOMException - If the specified offset is negative or greater than the length of the data.

replaceData

public void replaceData(int offset,
                        int count,
                        java.lang.String arg)
                 throws org.w3c.dom.DOMException
Replace the characters starting at the specified offset with the specified string.

Specified by:
replaceData in interface org.w3c.dom.CharacterData
Parameters:
offset - The offset from which to start replacing.
count - The number of characters to replace. If the sum of offset and count exceeds length, then all characters to the end of the data are replaced; (i.e., the effect is the same as a remove method call with the same range, followed by an append method invocation).
arg - The string with which the range must be replaced.
Throws:
org.w3c.dom.DOMException - If the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.

substringData

public java.lang.String substringData(int offset,
                                      int count)
                               throws org.w3c.dom.DOMException
Return the specified substring. If the sum of offset and count exceeds the length, then all characters to the end of the data are returned.

Specified by:
substringData in interface org.w3c.dom.CharacterData
Parameters:
offset - The offset of substring to extract.
count - The number of characters to extract.
Throws:
org.w3c.dom.DOMException - If the specified offset is negative or greater than the number of characters in data, or if the specified count is negative.


copyright© 2001-2004 by webMethods All Rights Reserved.