Class AbstractRootNode
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.AbstractNode
com.puppycrawl.tools.checkstyle.xpath.AbstractRootNode
- All Implemented Interfaces:
Source,SourceLocator,net.sf.saxon.lib.ActiveSource,net.sf.saxon.om.GNode,net.sf.saxon.om.GroundedValue,net.sf.saxon.om.Item,net.sf.saxon.om.NodeInfo,net.sf.saxon.om.Sequence,net.sf.saxon.s9api.Location,Locator
- Direct Known Subclasses:
RootNode
Represents root node of Xpath-tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AbstractNode[]Constant for optimization.private static final StringName of the root element. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newAbstractRootNodeinstance. -
Method Summary
Modifier and TypeMethodDescriptionintcompareOrder(net.sf.saxon.om.GNode other) Compares current object with specified for order.private static net.sf.saxon.om.SequenceIteratorCreates an iterator without items.getAttributeValue(net.sf.saxon.om.NamespaceUri namespace, String localPart) Returns attribute value.intgetDepth()Getter method for node depth.Returns local part.intReturns type of the node.net.sf.saxon.om.NodeInfoReturns parent.net.sf.saxon.om.NodeInfogetRoot()Returns root of the tree.net.sf.saxon.om.SequenceIteratoriterateAncestorAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns ancestor axis iterator.net.sf.saxon.om.SequenceIteratoriterateAncestorOrSelfAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns ancestor-or-self axis iterator.net.sf.saxon.om.SequenceIteratoriterateAttributeAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Attribute axis is not supported for the root node.net.sf.saxon.om.SequenceIteratoriterateChildAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns child axis iterator.net.sf.saxon.om.SequenceIteratoriterateDescendantAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns descendant axis iterator.net.sf.saxon.om.SequenceIteratoriterateDescendantOrSelfAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns descendant-or-self axis iterator.net.sf.saxon.om.SequenceIteratoriterateFollowingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns following axis iterator.net.sf.saxon.om.SequenceIteratoriterateFollowingSiblingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns following-sibling axis iterator.net.sf.saxon.om.SequenceIteratoriterateNamespaceAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Namespace axis is not supported for the root node.net.sf.saxon.om.SequenceIteratoriterateParentAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns parent axis iterator.net.sf.saxon.om.SequenceIteratoriteratePrecedingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns preceding axis iterator.net.sf.saxon.om.SequenceIteratoriteratePrecedingSiblingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns preceding-sibling axis iterator.net.sf.saxon.om.SequenceIteratoriterateSelfAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns self axis iterator.private static UnsupportedOperationExceptionReturns UnsupportedOperationException exception.Methods inherited from class com.puppycrawl.tools.checkstyle.xpath.AbstractNode
atomize, copy, createChildren, filter, generateId, getAllNamespaces, getBaseURI, getChildren, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getNamespaceUri, getPrefix, getPublicId, getSchemaType, getStringValue, getSystemId, getTokenType, getTreeInfo, getUnderlyingNode, getUnicodeStringValue, getURI, hasFingerprint, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, saveLocation, setSystemIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.om.GNode
iterateFollowingOrSelfAxis, iterateFollowingSiblingOrSelfAxis, iteratePrecedingOrSelfAxis, iteratePrecedingSiblingOrSelfAxisMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, effectiveBooleanValue, materializeMethods inherited from interface net.sf.saxon.om.Item
getLabel, getLength, head, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.NodeInfo
asActiveSource, attributes, children, children, deliver, equals, getColumnNumber, getGenre, getLineNumber, getQName, hasChildNodes, hashCode, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Field Details
-
ROOT_NAME
Name of the root element.- See Also:
-
EMPTY_ABSTRACT_NODE_ARRAY
Constant for optimization.
-
-
Constructor Details
-
AbstractRootNode
protected AbstractRootNode()Creates a newAbstractRootNodeinstance.
-
-
Method Details
-
compareOrder
Compares current object with specified for order. ThrowsUnsupportedOperationExceptionbecause functionality not required here.- Parameters:
other- anotherGNodeobject- Returns:
- number representing order of current object to specified one
-
getAttributeValue
Returns attribute value. ThrowsUnsupportedOperationExceptionbecause root node has no attributes.- Parameters:
namespace- namespacelocalPart- actual name of the attribute- Returns:
- attribute value
-
getLocalPart
Returns local part.- Returns:
- local part
-
getNodeKind
Returns type of the node.- Returns:
- node kind
-
getParent
Returns parent.- Returns:
- parent
-
getRoot
Returns root of the tree.- Returns:
- root of the tree
-
iterateAncestorAxis
public net.sf.saxon.om.SequenceIterator iterateAncestorAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns ancestor axis iterator. Root has no ancestors.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- empty iterator
-
iterateParentAxis
public net.sf.saxon.om.SequenceIterator iterateParentAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns parent axis iterator. Root has no parent.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- empty iterator
-
iterateFollowingAxis
public net.sf.saxon.om.SequenceIterator iterateFollowingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns following axis iterator. Root has no following nodes.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- empty iterator
-
iterateFollowingSiblingAxis
public net.sf.saxon.om.SequenceIterator iterateFollowingSiblingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns following-sibling axis iterator. Root has no siblings.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- empty iterator
-
iteratePrecedingAxis
public net.sf.saxon.om.SequenceIterator iteratePrecedingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns preceding axis iterator. Root has no preceding nodes.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- empty iterator
-
iteratePrecedingSiblingAxis
public net.sf.saxon.om.SequenceIterator iteratePrecedingSiblingAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns preceding-sibling axis iterator. Root has no siblings.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- empty iterator
-
iterateAncestorOrSelfAxis
public net.sf.saxon.om.SequenceIterator iterateAncestorOrSelfAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns ancestor-or-self axis iterator.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- iterator over the current node
-
iterateSelfAxis
public net.sf.saxon.om.SequenceIterator iterateSelfAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns self axis iterator.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- iterator over the current node
-
iterateChildAxis
public net.sf.saxon.om.SequenceIterator iterateChildAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns child axis iterator.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- iterator over the children
-
iterateDescendantAxis
public net.sf.saxon.om.SequenceIterator iterateDescendantAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns descendant axis iterator.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- iterator over the descendants
-
iterateDescendantOrSelfAxis
public net.sf.saxon.om.SequenceIterator iterateDescendantOrSelfAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Returns descendant-or-self axis iterator.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- iterator over the current node and its descendants
-
iterateAttributeAxis
public net.sf.saxon.om.SequenceIterator iterateAttributeAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Attribute axis is not supported for the root node.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- never
-
iterateNamespaceAxis
public net.sf.saxon.om.SequenceIterator iterateNamespaceAxis(net.sf.saxon.pattern.nodetest.NodePredicate predicate) Namespace axis is not supported for the root node.- Parameters:
predicate- filter for the iterator, may be null- Returns:
- never
-
getDepth
Getter method for node depth.- Specified by:
getDepthin classAbstractNode- Returns:
- always
0
-
createEmptyIterator
Creates an iterator without items.- Returns:
- the shared empty iterator
-
throwUnsupportedOperationException
Returns UnsupportedOperationException exception.- Returns:
- UnsupportedOperationException exception
-