com.sun.org.apache.xerces.internal.dom
public class: DeferredTextImpl [javadoc |
source]
java.lang.Object
com.sun.org.apache.xerces.internal.dom.NodeImpl
com.sun.org.apache.xerces.internal.dom.ChildNode
com.sun.org.apache.xerces.internal.dom.CharacterDataImpl
com.sun.org.apache.xerces.internal.dom.TextImpl
com.sun.org.apache.xerces.internal.dom.DeferredTextImpl
All Implemented Interfaces:
DeferredNode, Text, CharacterData, Cloneable, Node, EventTarget, Serializable, NodeList
Text nodes hold the non-markup, non-Entity content of
an Element or Attribute.
When a document is first made available to the DOM, there is only
one Text object for each block of adjacent plain-text. Users (ie,
applications) may create multiple adjacent Texts during editing --
see org.w3c.dom.Element#normalize for discussion.
Note that CDATASection is a subclass of Text. This is conceptually
valid, since they're really just two different ways of quoting
characters when they're written out as part of an XML stream.
- xerces.internal:
- since:
PR-DOM-Level-1-19980818. -
| Field Summary |
|---|
| static final long | serialVersionUID | Serialization version. |
| protected transient int | fNodeIndex | Node index. |
| Fields inherited from com.sun.org.apache.xerces.internal.dom.NodeImpl: |
|---|
| TREE_POSITION_PRECEDING, TREE_POSITION_FOLLOWING, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_EQUIVALENT, TREE_POSITION_SAME_NODE, TREE_POSITION_DISCONNECTED, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_PRECEDING, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, serialVersionUID, ELEMENT_DEFINITION_NODE, ownerNode, flags, READONLY, SYNCDATA, SYNCCHILDREN, OWNED, FIRSTCHILD, SPECIFIED, IGNORABLEWS, HASSTRING, NORMALIZED, ID |
| Constructor: |
DeferredTextImpl(DeferredDocumentImpl ownerDocument,
int nodeIndex) {
//
// Constructors
//
super(ownerDocument, null);
fNodeIndex = nodeIndex;
needsSyncData(true);
}
This is the deferred constructor. Only the fNodeIndex is given here.
All other data, can be requested from the ownerDocument via the index. |
| Methods from com.sun.org.apache.xerces.internal.dom.TextImpl: |
|---|
|
getNodeName, getNodeType, getWholeText, insertTextContent, isElementContentWhitespace, isIgnorableWhitespace, removeData, replaceData, replaceWholeText, setIgnorableWhitespace, setValues, splitText |
| Methods from com.sun.org.apache.xerces.internal.dom.CharacterDataImpl: |
|---|
|
appendData, deleteData, getChildNodes, getData, getLength, getNodeValue, insertData, internalDeleteData, internalInsertData, replaceData, setData, setNodeValue, setNodeValueInternal, setNodeValueInternal, substringData |
| Methods from com.sun.org.apache.xerces.internal.dom.NodeImpl: |
|---|
|
addEventListener, appendChild, changed, changes, cloneNode, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getBaseURI, getChildNodes, getContainer, getElementAncestor, getFeature, getFirstChild, getLastChild, getLength, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeNumber, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getReadOnly, getTextContent, getTextContent, getUserData, getUserData, getUserDataRecord, hasAttributes, hasChildNodes, hasStringValue, hasStringValue, insertBefore, internalIsIgnorableWhitespace, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIdAttribute, isIdAttribute, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, item, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, normalize, ownerDocument, parentNode, previousSibling, removeChild, removeEventListener, replaceChild, setNodeValue, setOwnerDocument, setPrefix, setReadOnly, setTextContent, setUserData, setUserData, synchronizeData, toString |
| Method from com.sun.org.apache.xerces.internal.dom.DeferredTextImpl Detail: |
public int getNodeIndex() {
return fNodeIndex;
}
|
protected void synchronizeData() {
// no need for future synchronizations
needsSyncData(false);
// get initial text value
DeferredDocumentImpl ownerDocument =
(DeferredDocumentImpl) this.ownerDocument();
data = ownerDocument.getNodeValueString(fNodeIndex);
// NOTE: We used to normalize adjacent text node values here.
// This code has moved to the DeferredDocumentImpl
// getNodeValueString() method. -Ac
// ignorable whitespace
isIgnorableWhitespace(ownerDocument.getNodeExtra(fNodeIndex) == 1);
}
Synchronizes the underlying data. |