Xindice API
version 1.1

org.apache.xindice.xml.dom
Class TextImpl

java.lang.Object
  |
  +--org.apache.xindice.xml.dom.NodeImpl
        |
        +--org.apache.xindice.xml.dom.CharacterDataImpl
              |
              +--org.apache.xindice.xml.dom.TextImpl
All Implemented Interfaces:
org.w3c.dom.CharacterData, CompressedNode, DBNode, org.w3c.dom.Node, org.w3c.dom.Text
Direct Known Subclasses:
CDATASectionImpl

public class TextImpl
extends CharacterDataImpl
implements org.w3c.dom.Text

TextImpl

Version:
$Revision: 511426 $, $Date: 2007-02-24 22:25:02 -0500 (Sat, 24 Feb 2007) $

Fields inherited from class org.apache.xindice.xml.dom.NodeImpl
data, dirty, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, EX_DOMSTRING_SIZE, EX_HIERARCHY_REQUEST, EX_INDEX_SIZE, EX_INUSE_ATTRIBUTE, EX_INVALID_STATE, EX_NO_DATA_ALLOWED, EX_NO_MODIFICATION_ALLOWED, EX_NOT_FOUND, EX_WRONG_DOCUMENT, handlers, key, len, loaded, nodeName, nodeValue, nsURI, OBJECT_HREF, OBJECT_NS, OBJECT_TYPE, ownerDocument, parentNode, pos, source, TYPE_APPEND, TYPE_CONTENT, TYPE_INSERT, TYPE_REPLACE, userData, XMLNS_PREFIX, XMLNS_URI
 
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
TextImpl()
           
TextImpl(NodeImpl parentNode, boolean dirty)
           
TextImpl(NodeImpl parentNode, byte[] data, int pos, int len)
           
TextImpl(NodeImpl parentNode, String nodeValue)
           
 
Method Summary
 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.
 String getWholeText()
           
 boolean isElementContentWhitespace()
           
 org.w3c.dom.Text replaceWholeText(String content)
           
 org.w3c.dom.Text splitText(int offset)
          Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings.
 
Methods inherited from class org.apache.xindice.xml.dom.CharacterDataImpl
appendData, checkLoaded, deleteData, getData, getLength, insertData, replaceData, setData, setNodeValue, substringData
 
Methods inherited from class org.apache.xindice.xml.dom.NodeImpl
appendChild, checkReadOnly, cloneNode, cloneNode, compareDocumentPosition, expandSource, getAttributes, getBaseURI, getChildNodes, getDataBytes, getDataLen, getDataPos, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getPreviousSibling, getSource, getSymbolID, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, invokeHandlers, invokeHandlers, isDefaultNamespace, isDefined, isDirty, isEqualNode, isLoaded, isSameNode, isSupported, load, lookupDefaultNamespaceURI, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setDataBytes, setDataBytes, setDataLen, setDataPos, setDirty, setNodeName, setParentNode, setPrefix, setSource, setTextContent, setUserData, toString, unload
 
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
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

TextImpl

public TextImpl()

TextImpl

public TextImpl(NodeImpl parentNode,
                byte[] data,
                int pos,
                int len)

TextImpl

public TextImpl(NodeImpl parentNode,
                boolean dirty)

TextImpl

public TextImpl(NodeImpl parentNode,
                String nodeValue)
Method Detail

getNodeType

public short getNodeType()
Description copied from class: NodeImpl
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 NodeImpl

getNodeName

public String getNodeName()
Description copied from class: NodeImpl
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 NodeImpl

splitText

public final org.w3c.dom.Text splitText(int offset)
                                 throws org.w3c.dom.DOMException
Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the content at and after the offset point.
Specified by:
splitText in interface org.w3c.dom.Text
Parameters:
offset - The offset at which to split, starting from 0.
Returns:
The new Text node.
Throws:
org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of characters in data.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

isElementContentWhitespace

public boolean isElementContentWhitespace()
Since:
DOM Level 3

getWholeText

public String getWholeText()
Since:
DOM Level 3

replaceWholeText

public org.w3c.dom.Text replaceWholeText(String content)
                                  throws org.w3c.dom.DOMException
Since:
DOM Level 3

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.