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:
javax.xml.transform.Source
,javax.xml.transform.SourceLocator
,ActiveSource
,GroundedValue
,Item
,NodeInfo
,Sequence
,Location
,org.xml.sax.Locator
- Direct Known Subclasses:
TinyDocumentImpl
,TinyElementImpl
public abstract class TinyParentNodeImpl extends TinyNodeImpl
TinyParentNodeImpl is an implementation of a non-leaf node (specifically, an Element node or a Document node)
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.tree.tiny.TinyNodeImpl
NODE_LETTER, nodeNr, parent, tree
-
-
Constructor Summary
Constructors Constructor Description TinyParentNodeImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UnicodeString
getStringValue(TinyTree tree, int nodeNr)
Get the string value of a node.UnicodeString
getUnicodeStringValue()
Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.boolean
hasChildNodes()
Determine 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, setSystemId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materialize
-
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, itemAt, iterate, reduce, subsequence
-
Methods inherited from interface net.sf.saxon.om.NodeInfo
asActiveSource, atomize, attributes, children, children, copy, deliver, getNodeKind, getPublicId, toShortString
-
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
-
-
-
Method Detail
-
hasChildNodes
public boolean hasChildNodes()
Determine if the node has children.- Specified by:
hasChildNodes
in interfaceNodeInfo
- Overrides:
hasChildNodes
in classTinyNodeImpl
- Returns:
true
if this node has any attributes,false
otherwise.
-
getUnicodeStringValue
public UnicodeString getUnicodeStringValue()
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.
-
getStringValue
public static UnicodeString getStringValue(TinyTree tree, int nodeNr)
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
-
-