org.apache.xerces.impl.xs.opti
Class TextImpl
java.lang.Object
org.apache.xerces.impl.xs.opti.DefaultNode
org.apache.xerces.impl.xs.opti.NodeImpl
org.apache.xerces.impl.xs.opti.DefaultText
org.apache.xerces.impl.xs.opti.TextImpl
- All Implemented Interfaces:
- CharacterData, Node, Text
public class TextImpl
- extends DefaultText
- Version:
- $Id: TextImpl.java 446728 2006-09-15 20:43:46Z mrglavas $
- Author:
- Neil Graham, IBM
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 |
TextImpl(java.lang.StringBuffer str,
SchemaDOM sDOM,
int row,
int col)
|
Method Summary |
java.lang.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()
The node immediately following this node. |
Node |
getParentNode()
The parent of this node. |
Node |
getPreviousSibling()
The node immediately preceding this node. |
java.lang.String |
substringData(int offset,
int count)
Extracts a range of data from the node. |
Methods inherited from class org.apache.xerces.impl.xs.opti.DefaultNode |
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNodeValue, getOwnerDocument, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
TextImpl
public TextImpl(java.lang.StringBuffer str,
SchemaDOM sDOM,
int row,
int col)
getParentNode
public Node getParentNode()
- Description copied from interface:
Node
- The parent of this node. All nodes, except
Attr
,
Document
, DocumentFragment
,
Entity
, and Notation
may have a parent.
However, if a node has just been created and not yet added to the
tree, or if it has been removed from the tree, this is
null
.
- Specified by:
getParentNode
in interface Node
- Overrides:
getParentNode
in class DefaultNode
getPreviousSibling
public Node getPreviousSibling()
- Description copied from interface:
Node
- The node immediately preceding this node. If there is no such node,
this returns
null
.
- Specified by:
getPreviousSibling
in interface Node
- Overrides:
getPreviousSibling
in class DefaultNode
getNextSibling
public Node getNextSibling()
- Description copied from interface:
Node
- The node immediately following this node. If there is no such node,
this returns
null
.
- Specified by:
getNextSibling
in interface Node
- Overrides:
getNextSibling
in class DefaultNode
getData
public java.lang.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.
- Specified by:
getData
in interface CharacterData
- Overrides:
getData
in class DefaultText
- Throws:
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
DOMException
- DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString
variable on the implementation
platform.
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.
- Specified by:
getLength
in interface CharacterData
- Overrides:
getLength
in class DefaultText
substringData
public java.lang.String substringData(int offset,
int count)
throws DOMException
- Extracts a range of data from the node.
- Specified by:
substringData
in interface CharacterData
- Overrides:
substringData
in class 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.
- Throws:
DOMException
- INDEX_SIZE_ERR: Raised if the specified offset
is
negative or greater than the number of 16-bit units in
data
, or if the specified count
is
negative.
DOMSTRING_SIZE_ERR: Raised if the specified range of text does
not fit into a DOMString
.