org.w3c.tidy
Class DOMTextImpl

java.lang.Object
  extended by org.w3c.tidy.DOMNodeImpl
      extended by org.w3c.tidy.DOMCharacterDataImpl
          extended by org.w3c.tidy.DOMTextImpl
All Implemented Interfaces:
org.w3c.dom.CharacterData, org.w3c.dom.Node, org.w3c.dom.Text
Direct Known Subclasses:
DOMCDATASectionImpl

public class DOMTextImpl
extends DOMCharacterDataImpl
implements org.w3c.dom.Text

DOMTextImpl (c) 1998-2000 (W3C) MIT, INRIA, Keio University See Tidy.java for the copyright notice. Derived from HTML Tidy Release 4 Aug 2000

Version:
1.7, 1999/12/06 Tidy Release 30 Nov 1999, 1.8, 2000/01/22 Tidy Release 13 Jan 2000, 1.9, 2000/06/03 Tidy Release 30 Apr 2000, 1.10, 2000/07/22 Tidy Release 8 Jul 2000, 1.11, 2000/08/16 Tidy Release 4 Aug 2000
Author:
Dave Raggett , Andy Quick (translation to Java)

Field Summary
 
Fields inherited from class org.w3c.tidy.DOMNodeImpl
adaptee
 
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
 
Constructor Summary
protected DOMTextImpl(Node adaptee)
           
 
Method Summary
 java.lang.String getNodeName()
          The name of this node, depending on its type; see the table above.
 short getNodeType()
          A code representing the type of the underlying object, as defined above.
 org.w3c.dom.Text splitText(int offset)
          Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.
 
Methods inherited from class org.w3c.tidy.DOMCharacterDataImpl
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData
 
Methods inherited from class org.w3c.tidy.DOMNodeImpl
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix, supports
 
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.CharacterData
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Constructor Detail

DOMTextImpl

protected DOMTextImpl(Node adaptee)
Method Detail

getNodeName

public java.lang.String getNodeName()
Description copied from interface: org.w3c.dom.Node
The name of this node, depending on its type; see the table above.

Specified by:
getNodeName in interface org.w3c.dom.Node
Overrides:
getNodeName in class DOMNodeImpl
See Also:
Node.getNodeName()

getNodeType

public short getNodeType()
Description copied from interface: org.w3c.dom.Node
A code representing the type of the underlying object, as defined above.

Specified by:
getNodeType in interface org.w3c.dom.Node
Overrides:
getNodeType in class DOMNodeImpl
See Also:
Node.getNodeType()

splitText

public org.w3c.dom.Text splitText(int offset)
                           throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Text
Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings. After being split, this node will contain all the content up to the offset point. A new node of the same type, which contains all the content at and after the offset point, is returned. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When the offset is equal to the length of this node, the new node has no data.

Specified by:
splitText in interface org.w3c.dom.Text
Returns:
The new node, of the same type as this node.
Throws:
org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
See Also:
Text.splitText(int)