Class TextImpl
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.opti.DefaultNode
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.opti.NodeImpl
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.opti.DefaultText
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.opti.TextImpl
-
- All Implemented Interfaces:
CharacterData
,Node
,Text
public class TextImpl extends DefaultText
- Version:
- $Id$
- Author:
- Neil Graham, IBM
-
-
Field Summary
-
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
Constructors Constructor Description TextImpl(StringBuffer str, SchemaDOM sDOM, int row, int col)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getData()
The character data of the node that implements this interface.int
getLength()
The number of 16-bit units that are available throughdata
and thesubstringData
method below.Node
getNextSibling()
String
getNodeName()
Node
getParentNode()
Node
getPreviousSibling()
String
substringData(int offset, int count)
Extracts a range of data from the node.-
Methods inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.opti.DefaultText
appendData, deleteData, getWholeText, insertData, isElementContentWhitespace, replaceData, replaceWholeText, setData, splitText
-
Methods inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.opti.NodeImpl
getLocalName, getNamespaceURI, getNodeType, getPrefix, getReadOnly, setReadOnly, toString
-
Methods inherited from class org.smooks.engine.delivery.sax.ng.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeType, getNodeValue, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
-
-
-
Constructor Detail
-
TextImpl
public TextImpl(StringBuffer str, SchemaDOM sDOM, int row, int col)
-
-
Method Detail
-
getNodeName
public String getNodeName()
- Specified by:
getNodeName
in interfaceNode
- Overrides:
getNodeName
in classNodeImpl
-
getParentNode
public Node getParentNode()
- Specified by:
getParentNode
in interfaceNode
- Overrides:
getParentNode
in classDefaultNode
-
getPreviousSibling
public Node getPreviousSibling()
- Specified by:
getPreviousSibling
in interfaceNode
- Overrides:
getPreviousSibling
in classDefaultNode
-
getNextSibling
public Node getNextSibling()
- Specified by:
getNextSibling
in interfaceNode
- Overrides:
getNextSibling
in classDefaultNode
-
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 aCharacterData
node. However, implementation limits may mean that the entirety of a node's data may not fit into a singleDOMString
. In such cases, the user may callsubstringData
to retrieve the data in appropriately sized pieces.- Specified by:
getData
in interfaceCharacterData
- Overrides:
getData
in classDefaultText
- 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 aDOMString
variable on the implementation platform.
-
getLength
public int getLength()
The number of 16-bit units that are available throughdata
and thesubstringData
method below. This may have the value zero, i.e.,CharacterData
nodes may be empty.- Specified by:
getLength
in interfaceCharacterData
- Overrides:
getLength
in classDefaultText
-
substringData
public String substringData(int offset, int count) throws DOMException
Extracts a range of data from the node.- Specified by:
substringData
in interfaceCharacterData
- Overrides:
substringData
in classDefaultText
- 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
andcount
exceeds thelength
, then all 16-bit units to the end of the data are returned. - Throws:
DOMException
- INDEX_SIZE_ERR: Raised if the specifiedoffset
is negative or greater than the number of 16-bit units indata
, or if the specifiedcount
is negative.
DOMSTRING_SIZE_ERR: Raised if the specified range of text does not fit into aDOMString
.
-
-