EAF 7.6 Util

org.enhydra.xml
Class CharacterDataImpl

java.lang.Object
  extended by org.enhydra.xml.NodeImpl
      extended by org.enhydra.xml.CharacterDataImpl
All Implemented Interfaces:
org.w3c.dom.CharacterData, org.w3c.dom.Node, org.w3c.dom.NodeList
Direct Known Subclasses:
CommentImpl, TextImpl

public class CharacterDataImpl
extends NodeImpl
implements org.w3c.dom.CharacterData

Version:
1.0
Author:
Tweety A class representing a node in a meta-data tree, which implements the

Field Summary
 
Fields inherited from class org.enhydra.xml.NodeImpl
firstChild, lastChild, nextSibling, nodeName, nodeValue, numChildren, ownerDocument, parent, previousSibling, type
 
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
CharacterDataImpl()
          Constructs an empty CharacterDataImpl.
CharacterDataImpl(org.w3c.dom.Node node)
          Constructs a CharacterDataImpl from the given node as Node.
 
Method Summary
 void appendData(java.lang.String arg)
          Appends data to the node's value.
 void deleteData(int offset, int count)
          Deletes characters from the node's value string.
 java.lang.String getData()
          Returns node value.
 java.lang.String getNamespaceURI()
          Returns the namespace of the node.
 void insertData(int offset, java.lang.String arg)
          Inserts substring into node's value string.
 void replaceData(int offset, int count, java.lang.String arg)
          Replaces characters in the node's value string.
 void setData(java.lang.String data)
          Sets the new value of this node.
 java.lang.String substringData(int offset, int count)
          Returns the substring from the node's value.
 
Methods inherited from class org.enhydra.xml.NodeImpl
appendChild, beginToString, cloneNode, compareDocumentPosition, endToString, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, initNodeImplChildren, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, newCommentInstance, newDefaultInstance, newElementInstance, newTextInstance, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.CharacterData
getLength
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, 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
 

Constructor Detail

CharacterDataImpl

public CharacterDataImpl()
Constructs an empty CharacterDataImpl.


CharacterDataImpl

public CharacterDataImpl(org.w3c.dom.Node node)
Constructs a CharacterDataImpl from the given node as Node.

Parameters:
node, - as a Node.
Method Detail

getData

public java.lang.String getData()
                         throws org.w3c.dom.DOMException
Returns node value.

Specified by:
getData in interface org.w3c.dom.CharacterData
Returns:
node value, as String.
Throws:
org.w3c.dom.DOMException
See Also:
CharacterData.getData().

setData

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

Specified by:
setData in interface org.w3c.dom.CharacterData
Parameters:
data - the new data
Throws:
org.w3c.dom.DOMException
See Also:
CharacterData.setData(String).

substringData

public java.lang.String substringData(int offset,
                                      int count)
                               throws org.w3c.dom.DOMException
Returns the substring from the node's value.

Specified by:
substringData in interface org.w3c.dom.CharacterData
Parameters:
offset - the begin index of the substring.
count - the number of characters.
Returns:
substring of the node's value.
Throws:
org.w3c.dom.DOMException
See Also:
CharacterData.substringData(int, int).

appendData

public void appendData(java.lang.String arg)
Appends data to the node's value.

Specified by:
appendData in interface org.w3c.dom.CharacterData
Parameters:
arg - the data to append to the node's value.
See Also:
CharacterData.appendData(String).

insertData

public void insertData(int offset,
                       java.lang.String arg)
                throws org.w3c.dom.DOMException
Inserts substring into node's value string.

Specified by:
insertData in interface org.w3c.dom.CharacterData
Parameters:
offset - the begin index of the substring.
arg - the String to insert.
Throws:
org.w3c.dom.DOMException
See Also:
CharacterData.insertData(int, String).

deleteData

public void deleteData(int offset,
                       int count)
                throws org.w3c.dom.DOMException
Deletes characters from the node's value string.

Specified by:
deleteData in interface org.w3c.dom.CharacterData
Parameters:
offset - the begin index of the substring.
count - the number of characters.
Throws:
org.w3c.dom.DOMException
See Also:
CharacterData.deleteData(int, int).

replaceData

public void replaceData(int offset,
                        int count,
                        java.lang.String arg)
                 throws org.w3c.dom.DOMException
Replaces characters in the node's value string.

Specified by:
replaceData in interface org.w3c.dom.CharacterData
Parameters:
offset - the begin index of the substring.
count - the number of characters.
arg - the String to insert.
Throws:
org.w3c.dom.DOMException
See Also:
CharacterData.replaceData(int, int, String).

getNamespaceURI

public java.lang.String getNamespaceURI()
Returns the namespace of the node.

Specified by:
getNamespaceURI in interface org.w3c.dom.Node
Overrides:
getNamespaceURI in class NodeImpl
Returns:
the namespace of the node.
See Also:
Node.getNamespaceURI().

EAF 7.6 Util