org.apache.xerces.impl.xs.opti

Class TextImpl

Implemented Interfaces:
Node, Text

public class TextImpl
extends DefaultText

Version:
$Id: TextImpl.java,v 1.4 2004/10/06 15:14:49 mrglavas Exp $
Author:
Neil Graham, IBM

Constructor Summary

TextImpl(StringBuffer str, SchemaDOM sDOM, int row, int col)

Method Summary

String
getData()
The character data of the node that implements this interface.
int
getLength()
The number of 16-bit units that are available through data and the substringData method below.
Node
getNextSibling()
Node
getParentNode()
Node
getPreviousSibling()
String
substringData(int offset, int count)
Extracts a range of data from the node.

Methods inherited from class org.apache.xerces.impl.xs.opti.DefaultText

appendData, deleteData, getData, getLength, getWholeText, insertData, isElementContentWhitespace, replaceData, replaceWholeText, setData, splitText, substringData

Methods inherited from class org.apache.xerces.impl.xs.opti.NodeImpl

getLocalName, getNamespaceURI, getNodeName, getNodeType, getPrefix, getReadOnly, setReadOnly

Methods inherited from class org.apache.xerces.impl.xs.opti.DefaultNode

appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, 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 Details

TextImpl

public TextImpl(StringBuffer str,
                SchemaDOM sDOM,
                int row,
                int col)

Method Details

getData

public String getData()
            throws DOMException
The character data of the node that implements this interface. The DOM implementation may not put arbitrary limits on the amount of data that may be stored in a CharacterData node. However, implementation limits may mean that the entirety of a node's data may not fit into a single DOMString. In such cases, the user may call substringData to retrieve the data in appropriately sized pieces.
Overrides:
getData in interface DefaultText

getLength

public int getLength()
The number of 16-bit units that are available through data and the substringData method below. This may have the value zero, i.e., CharacterData nodes may be empty.
Overrides:
getLength in interface DefaultText

getNextSibling

public Node getNextSibling()
Overrides:
getNextSibling in interface DefaultNode

getParentNode

public Node getParentNode()
Overrides:
getParentNode in interface DefaultNode

getPreviousSibling

public Node getPreviousSibling()
Overrides:
getPreviousSibling in interface DefaultNode

substringData

public String substringData(int offset,
                            int count)
            throws DOMException
Extracts a range of data from the node.
Overrides:
substringData in interface DefaultText
Parameters:
offset - Start offset of substring to extract.
count - The number of 16-bit units to extract.
Returns:
The specified substring. If the sum of offset and count exceeds the length, then all 16-bit units to the end of the data are returned.

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.