Class AbstractNode
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.AbstractNode
- All Implemented Interfaces:
Source
,SourceLocator
,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:
AttributeNode
,ElementNode
,RootNode
Represents general class for
ElementNode
, RootNode
and AttributeNode
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<AbstractNode> The children.private final net.sf.saxon.om.TreeInfo
TheTreeInfo
object.Fields inherited from interface net.sf.saxon.om.NodeInfo
IS_DTD_TYPE, IS_NILLED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractNode
(net.sf.saxon.om.TreeInfo treeInfo) Constructor of the abstract classAbstractNode
. -
Method Summary
Modifier and TypeMethodDescriptionfinal net.sf.saxon.om.AtomicSequence
atomize()
Returns AtomicSequence.final void
copy
(net.sf.saxon.event.Receiver receiver, int index, net.sf.saxon.s9api.Location location) Copy method.protected abstract List
<AbstractNode> Creates nodes for children.private static UnsupportedOperationException
Returns UnsupportedOperationException exception.final void
generateId
(net.sf.saxon.tree.util.FastStringBuffer fastStringBuffer) Generate id method.net.sf.saxon.om.NamespaceMap
Returns namespace array.final String
Returns base uri.protected List
<AbstractNode> Getter method for children.final net.sf.saxon.Configuration
Returns configuration.final net.sf.saxon.om.NamespaceBinding[]
getDeclaredNamespaces
(net.sf.saxon.om.NamespaceBinding[] namespaceBindings) Returns namespace array.abstract int
getDepth()
Getter method for node depth.final String
Returns display name.final int
Returns fingerprint.final String
Returns prefix.final String
Returns public id.final net.sf.saxon.type.SchemaType
Returns type of the schema.Returns string value.final CharSequence
Returns CharSequence string value.final String
Returns system id.abstract int
Getter method for token type.final net.sf.saxon.om.TreeInfo
Returns tree info.abstract DetailAST
Returns underlying node.getURI()
Returns uri of the namespace for the current node.boolean
Returns if implementation provides fingerprints.final boolean
isId()
Returns boolean.final boolean
isIdref()
Returns boolean.final boolean
isNilled()
Returns boolean.boolean
isSameNodeInfo
(net.sf.saxon.om.NodeInfo nodeInfo) Returns true if nodes are same, false otherwise.final boolean
Returns boolean.net.sf.saxon.tree.iter.AxisIterator
iterateAxis
(int axisNumber, Predicate<? super net.sf.saxon.om.NodeInfo> nodeTest) Determines axis iteration algorithm.final net.sf.saxon.s9api.Location
Returns location.final void
setSystemId
(String systemId) Sets system id.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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, head, itemAt, iterate, reduce, subsequence
Methods inherited from interface net.sf.saxon.om.NodeInfo
attributes, children, children, compareOrder, equals, getAttributeValue, getColumnNumber, getGenre, getLineNumber, getLocalPart, getNodeKind, getParent, getRoot, hasChildNodes, hashCode, iterateAxis, toShortString
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Field Details
-
treeInfo
private final net.sf.saxon.om.TreeInfo treeInfoTheTreeInfo
object. -
children
The children.
-
-
Constructor Details
-
AbstractNode
protected AbstractNode(net.sf.saxon.om.TreeInfo treeInfo) Constructor of the abstract classAbstractNode
.- Parameters:
treeInfo
-TreeInfo
object
-
-
Method Details
-
getTokenType
public abstract int getTokenType()Getter method for token type.- Returns:
- token type
-
getUnderlyingNode
Returns underlying node.- Returns:
- underlying node
-
getDepth
public abstract int getDepth()Getter method for node depth.- Returns:
- depth
-
createChildren
Creates nodes for children.- Returns:
- children list
-
getChildren
Getter method for children.- Returns:
- children list
-
isSameNodeInfo
public boolean isSameNodeInfo(net.sf.saxon.om.NodeInfo nodeInfo) Returns true if nodes are same, false otherwise.- Specified by:
isSameNodeInfo
in interfacenet.sf.saxon.om.NodeInfo
- Parameters:
nodeInfo
- other node- Returns:
TreeInfo
-
hasFingerprint
public boolean hasFingerprint()Returns if implementation provides fingerprints.- Specified by:
hasFingerprint
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
boolean
-
getURI
Returns uri of the namespace for the current node.- Specified by:
getURI
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- uri
-
iterateAxis
public net.sf.saxon.tree.iter.AxisIterator iterateAxis(int axisNumber, Predicate<? super net.sf.saxon.om.NodeInfo> nodeTest) Determines axis iteration algorithm.- Specified by:
iterateAxis
in interfacenet.sf.saxon.om.NodeInfo
- Parameters:
axisNumber
- element fromAxisInfo
nodeTest
- filter for iterator- Returns:
AxisIterator
object
-
getTreeInfo
public final net.sf.saxon.om.TreeInfo getTreeInfo()Returns tree info.- Specified by:
getTreeInfo
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- tree info
-
getStringValue
Returns string value. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getStringValue
in interfacenet.sf.saxon.om.GroundedValue
- Specified by:
getStringValue
in interfacenet.sf.saxon.om.Item
- Specified by:
getStringValue
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- string value
-
getDeclaredNamespaces
public final net.sf.saxon.om.NamespaceBinding[] getDeclaredNamespaces(net.sf.saxon.om.NamespaceBinding[] namespaceBindings) Returns namespace array. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getDeclaredNamespaces
in interfacenet.sf.saxon.om.NodeInfo
- Parameters:
namespaceBindings
- namespace array- Returns:
- namespace array
-
getAllNamespaces
public net.sf.saxon.om.NamespaceMap getAllNamespaces()Returns namespace array. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getAllNamespaces
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- namespace map
-
isId
public final boolean isId()Returns boolean. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
isId
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- boolean
-
isIdref
public final boolean isIdref()Returns boolean. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
isIdref
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- boolean
-
isNilled
public final boolean isNilled()Returns boolean. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
isNilled
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- boolean
-
isStreamed
public final boolean isStreamed()Returns boolean. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
isStreamed
in interfacenet.sf.saxon.om.Item
- Specified by:
isStreamed
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- boolean
-
getConfiguration
public final net.sf.saxon.Configuration getConfiguration()Returns configuration. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getConfiguration
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- configuration
-
setSystemId
Sets system id. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
setSystemId
in interfaceSource
- Parameters:
systemId
- system id
-
getSystemId
Returns system id. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getSystemId
in interfacenet.sf.saxon.s9api.Location
- Specified by:
getSystemId
in interfaceLocator
- Specified by:
getSystemId
in interfacenet.sf.saxon.om.NodeInfo
- Specified by:
getSystemId
in interfaceSource
- Specified by:
getSystemId
in interfaceSourceLocator
- Returns:
- system id
-
getPublicId
Returns public id. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getPublicId
in interfacenet.sf.saxon.s9api.Location
- Specified by:
getPublicId
in interfaceLocator
- Specified by:
getPublicId
in interfacenet.sf.saxon.om.NodeInfo
- Specified by:
getPublicId
in interfaceSourceLocator
- Returns:
- public id
-
getBaseURI
Returns base uri. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getBaseURI
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- base uri
-
saveLocation
public final net.sf.saxon.s9api.Location saveLocation()Returns location. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
saveLocation
in interfacenet.sf.saxon.s9api.Location
- Returns:
- location
-
getStringValueCS
Returns CharSequence string value. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getStringValueCS
in interfacenet.sf.saxon.om.GroundedValue
- Specified by:
getStringValueCS
in interfacenet.sf.saxon.om.Item
- Returns:
- CharSequence string value
-
getFingerprint
public final int getFingerprint()Returns fingerprint. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getFingerprint
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- fingerprint
-
getDisplayName
Returns display name. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getDisplayName
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- display name
-
getPrefix
Returns prefix. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getPrefix
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- prefix
-
getSchemaType
public final net.sf.saxon.type.SchemaType getSchemaType()Returns type of the schema. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
getSchemaType
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- type of the schema
-
atomize
public final net.sf.saxon.om.AtomicSequence atomize()Returns AtomicSequence. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
atomize
in interfacenet.sf.saxon.om.Item
- Specified by:
atomize
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- AtomicSequence
-
generateId
public final void generateId(net.sf.saxon.tree.util.FastStringBuffer fastStringBuffer) Generate id method. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
generateId
in interfacenet.sf.saxon.om.NodeInfo
- Parameters:
fastStringBuffer
- fastStringBuffer
-
copy
public final void copy(net.sf.saxon.event.Receiver receiver, int index, net.sf.saxon.s9api.Location location) Copy method. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
copy
in interfacenet.sf.saxon.om.NodeInfo
- Parameters:
receiver
- receiverindex
- indexlocation
- location
-
createUnsupportedOperationException
Returns UnsupportedOperationException exception. Methods which throws this exception are not supported for all nodes.- Returns:
- UnsupportedOperationException exception
-