Package net.sf.saxon.tree.tiny
Class TinyParentNodeImpl
java.lang.Object
net.sf.saxon.tree.tiny.TinyNodeImpl
net.sf.saxon.tree.tiny.TinyParentNodeImpl
- All Implemented Interfaces:
Source,SourceLocator,GroundedValue,Item,NodeInfo,Sequence,Location,Locator
- Direct Known Subclasses:
TinyDocumentImpl,TinyElementImpl
TinyParentNodeImpl is an implementation of a non-leaf node (specifically, an Element node
or a Document node)
- Author:
- Michael H. Kay
-
Field Summary
Fields inherited from class net.sf.saxon.tree.tiny.TinyNodeImpl
NODE_LETTER, nodeNr, parent, treeFields inherited from interface net.sf.saxon.om.NodeInfo
IS_DTD_TYPE, IS_NILLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.Get the value of the item as a CharSequence.static CharSequencegetStringValueCS(TinyTree tree, int nodeNr) Get the string value of a node.booleanDetermine if the node has children.Methods inherited from class net.sf.saxon.tree.tiny.TinyNodeImpl
compareOrder, equals, generateId, getAllNamespaces, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getGenre, getLineNumber, getLocalPart, getNamePool, getNodeNumber, getParent, getParentNodeNr, getPrefix, getRoot, getSchemaType, getSequenceNumber, getSystemId, getTree, getTreeInfo, getURI, hasFingerprint, hashCode, head, isAncestorOrSelf, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, iterateAxis, iterateAxis, saveLocation, setParentNode, setSystemIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
getLength, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.NodeInfo
atomize, attributes, children, children, copy, getNodeKind, getPublicId, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
TinyParentNodeImpl
public TinyParentNodeImpl()
-
-
Method Details
-
hasChildNodes
public boolean hasChildNodes()Determine if the node has children.- Specified by:
hasChildNodesin interfaceNodeInfo- Overrides:
hasChildNodesin classTinyNodeImpl- Returns:
trueif this node has any attributes,falseotherwise.
-
getStringValue
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.- Returns:
- the accumulated character content of the element, including descendant elements.
- See Also:
-
getStringValueCS
Get the value of the item as a CharSequence. This is in some cases more efficient than the version of the method that returns a String.- Specified by:
getStringValueCSin interfaceGroundedValue- Specified by:
getStringValueCSin interfaceItem- Overrides:
getStringValueCSin classTinyNodeImpl- Returns:
- the string value of the item
- See Also:
-
getStringValueCS
Get the string value of a node. This static method allows the string value of a node to be obtained without instantiating the node as a Java object. The method also returns a CharSequence rather than a string, which means it can sometimes avoid copying the data.- Parameters:
tree- The containing documentnodeNr- identifies the node whose string value is required. This must be a document or element node. The caller is trusted to ensure this.- Returns:
- the string value of the node, as a CharSequence
-