Class AbstractNode
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.xpath.AbstractNode
-
- All Implemented Interfaces:
Iterable
,Source
,SourceLocator
,net.sf.saxon.expr.parser.Location
,net.sf.saxon.om.GroundedValue
,net.sf.saxon.om.Item
,net.sf.saxon.om.NodeInfo
,net.sf.saxon.om.Sequence
,Locator
- Direct Known Subclasses:
AttributeNode
,ElementNode
,RootNode
public abstract class AbstractNode extends Object implements net.sf.saxon.om.NodeInfo
Represents general class forElementNode
,RootNode
andAttributeNode
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNode(net.sf.saxon.om.TreeInfo treeInfo)
Constructor of the abstract classAbstractNode
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addChild(AbstractNode node)
Add new child node to children list.net.sf.saxon.om.AtomicSequence
atomize()
Returns AtomicSequence.int
compareOrder(net.sf.saxon.om.NodeInfo nodeInfo)
Compares current object with specified for order.void
copy(net.sf.saxon.event.Receiver receiver, int index, net.sf.saxon.expr.parser.Location location)
Copy method.void
generateId(net.sf.saxon.tree.util.FastStringBuffer fastStringBuffer)
Generate id method.String
getBaseURI()
Returns base uri.protected List<AbstractNode>
getChildren()
Getter method for children.net.sf.saxon.Configuration
getConfiguration()
Returns configuration.net.sf.saxon.om.NamespaceBinding[]
getDeclaredNamespaces(net.sf.saxon.om.NamespaceBinding[] namespaceBindings)
Returns namespace array.String
getDisplayName()
Returns display name.int
getFingerprint()
Returns fingerprint.String
getPrefix()
Returns prefix.String
getPublicId()
Returns public id.net.sf.saxon.type.SchemaType
getSchemaType()
Returns type of the schema.CharSequence
getStringValueCS()
Returns CharSequence string value.String
getSystemId()
Returns system id.abstract int
getTokenType()
Getter method for token type.net.sf.saxon.om.TreeInfo
getTreeInfo()
Returns tree info.abstract DetailAST
getUnderlyingNode()
Returns underlying node.String
getURI()
Returns uri of the namespace for the current node.boolean
hasChildNodes()
Returns if current node has children.boolean
hasFingerprint()
Returns if implementation provides fingerprints.net.sf.saxon.om.Item
head()
Returns head.boolean
isId()
Returns boolean.boolean
isIdref()
Returns boolean.boolean
isNilled()
Returns boolean.boolean
isSameNodeInfo(net.sf.saxon.om.NodeInfo nodeInfo)
Returns true if nodes are same, false otherwise.boolean
isStreamed()
Returns boolean.net.sf.saxon.tree.iter.UnfailingIterator
iterate()
Returns iterator.net.sf.saxon.tree.iter.AxisIterator
iterateAxis(byte axisNumber, net.sf.saxon.pattern.NodeTest nodeTest)
Determines axis iteration algorithm.net.sf.saxon.expr.parser.Location
saveLocation()
Returns location.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, effectiveBooleanValue, materialize
-
Methods inherited from interface net.sf.saxon.om.Item
getLength, itemAt, iterator, reduce, subsequence
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getTokenType
public abstract int getTokenType()
Getter method for token type.- Returns:
- token type
-
getUnderlyingNode
public abstract DetailAST getUnderlyingNode()
Returns underlying node.- Returns:
- underlying node
-
getChildren
protected List<AbstractNode> getChildren()
Getter method for children.- Returns:
- children list
-
addChild
protected void addChild(AbstractNode node)
Add new child node to children list.- Parameters:
node
- child node
-
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
public String getURI()
Returns uri of the namespace for the current node.- Specified by:
getURI
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- uri
-
hasChildNodes
public boolean hasChildNodes()
Returns if current node has children.- Specified by:
hasChildNodes
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- if current node has children
-
iterateAxis
public net.sf.saxon.tree.iter.AxisIterator iterateAxis(byte axisNumber, net.sf.saxon.pattern.NodeTest 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
-
compareOrder
public int compareOrder(net.sf.saxon.om.NodeInfo nodeInfo)
Compares current object with specified for order.- Specified by:
compareOrder
in interfacenet.sf.saxon.om.NodeInfo
- Parameters:
nodeInfo
- anotherNodeInfo
object- Returns:
- number representing order of current object to specified one
-
getTreeInfo
public final net.sf.saxon.om.TreeInfo getTreeInfo()
Returns tree info.- Specified by:
getTreeInfo
in interfacenet.sf.saxon.om.NodeInfo
- Returns:
- tree info
-
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
-
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
public final void setSystemId(String systemId)
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
public final String 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.expr.parser.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
public final String 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.expr.parser.Location
- Specified by:
getPublicId
in interfaceLocator
- Specified by:
getPublicId
in interfacenet.sf.saxon.om.NodeInfo
- Specified by:
getPublicId
in interfaceSourceLocator
- Returns:
- public id
-
getBaseURI
public final String 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.expr.parser.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.expr.parser.Location
- Returns:
- location
-
head
public final net.sf.saxon.om.Item head()
Returns head. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
head
in interfacenet.sf.saxon.om.GroundedValue
- Specified by:
head
in interfacenet.sf.saxon.om.Item
- Specified by:
head
in interfacenet.sf.saxon.om.Sequence
- Returns:
- head
-
iterate
public final net.sf.saxon.tree.iter.UnfailingIterator iterate()
Returns iterator. ThrowsUnsupportedOperationException
, because no child class implements it and this method is not used for querying.- Specified by:
iterate
in interfacenet.sf.saxon.om.GroundedValue
- Specified by:
iterate
in interfacenet.sf.saxon.om.Item
- Specified by:
iterate
in interfacenet.sf.saxon.om.Sequence
- Returns:
- iterator
-
getStringValueCS
public final CharSequence 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
public final String 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
public final String 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.expr.parser.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
-
-