Class AbstractNode
java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.AbstractNode
- All Implemented Interfaces:
Source,SourceLocator,net.sf.saxon.lib.ActiveSource,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:
AbstractElementNode,AbstractRootNode,AttributeNode
Represents general class for
ElementNode, RootNode and AttributeNode.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<AbstractNode>The children.private final net.sf.saxon.om.TreeInfoTheTreeInfoobject. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractNode(net.sf.saxon.om.TreeInfo treeInfo) Constructor of the abstract classAbstractNode. -
Method Summary
Modifier and TypeMethodDescriptionfinal net.sf.saxon.om.AtomicSequenceatomize()Returns AtomicSequence.final voidcopy(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 UnsupportedOperationExceptionReturns UnsupportedOperationException exception.final voidgenerateId(StringBuilder buffer) Generate id method.net.sf.saxon.om.NamespaceMapReturns namespace array.final StringReturns base uri.protected List<AbstractNode>Getter method for children.final net.sf.saxon.ConfigurationReturns configuration.final net.sf.saxon.om.NamespaceBinding[]getDeclaredNamespaces(net.sf.saxon.om.NamespaceBinding[] namespaceBindings) Returns namespace array.abstract intgetDepth()Getter method for node depth.final StringReturns display name.final intReturns fingerprint.net.sf.saxon.om.NamespaceUriGet the URI part of the name of this node.final StringReturns prefix.final StringReturns public id.final net.sf.saxon.type.SchemaTypeReturns type of the schema.Returns string value.final StringReturns system id.abstract intGetter method for token type.final net.sf.saxon.om.TreeInfoReturns tree info.abstract ObjectReturns underlying node.final net.sf.saxon.str.UnicodeStringReturns the value of the item as a Unicode string.getURI()Returns uri of the namespace for the current node.booleanReturns if implementation provides fingerprints.final booleanisId()Returns boolean.final booleanisIdref()Returns boolean.final booleanisNilled()Returns boolean.booleanisSameNodeInfo(net.sf.saxon.om.NodeInfo nodeInfo) Returns true if nodes are same, false otherwise.final booleanReturns boolean.net.sf.saxon.tree.iter.AxisIteratoriterateAxis(int axisNumber, net.sf.saxon.pattern.NodePredicate nodeTest) Determines axis iteration algorithm.final net.sf.saxon.s9api.LocationReturns location.final voidsetSystemId(String systemId) Sets system id.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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, head, itemAt, iterate, reduce, subsequenceMethods inherited from interface net.sf.saxon.om.NodeInfo
asActiveSource, attributes, children, children, compareOrder, deliver, equals, getAttributeValue, getAttributeValue, getColumnNumber, getGenre, getLineNumber, getLocalPart, getNodeKind, getParent, getRoot, hasChildNodes, hashCode, iterateAxis, toShortStringMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Field Details
-
treeInfo
TheTreeInfoobject. -
children
The children.
-
-
Constructor Details
-
AbstractNode
Constructor of the abstract classAbstractNode.- Parameters:
treeInfo-TreeInfoobject
-
-
Method Details
-
getTokenType
Getter method for token type.- Returns:
- token type
-
getUnderlyingNode
Returns underlying node.- Returns:
- underlying node
-
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
Returns true if nodes are same, false otherwise.- Specified by:
isSameNodeInfoin interfacenet.sf.saxon.om.NodeInfo- Parameters:
nodeInfo- other node- Returns:
TreeInfo
-
hasFingerprint
Returns if implementation provides fingerprints.- Specified by:
hasFingerprintin interfacenet.sf.saxon.om.NodeInfo- Returns:
boolean
-
getNamespaceUri
Get the URI part of the name of this node.- Specified by:
getNamespaceUriin interfacenet.sf.saxon.om.NodeInfo- Returns:
- The URI of the namespace of this node.
-
getURI
Returns uri of the namespace for the current node.- Specified by:
getURIin interfacenet.sf.saxon.om.NodeInfo- Returns:
- uri
-
iterateAxis
public net.sf.saxon.tree.iter.AxisIterator iterateAxis(int axisNumber, net.sf.saxon.pattern.NodePredicate nodeTest) Determines axis iteration algorithm.- Specified by:
iterateAxisin interfacenet.sf.saxon.om.NodeInfo- Parameters:
axisNumber- element fromAxisInfonodeTest- filter for iterator- Returns:
AxisIteratorobject
-
getTreeInfo
Returns tree info.- Specified by:
getTreeInfoin 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:
getStringValuein interfacenet.sf.saxon.om.GroundedValue- Specified by:
getStringValuein interfacenet.sf.saxon.om.Item- 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:
getDeclaredNamespacesin interfacenet.sf.saxon.om.NodeInfo- Parameters:
namespaceBindings- namespace array- Returns:
- namespace array
-
getAllNamespaces
Returns namespace array. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
getAllNamespacesin interfacenet.sf.saxon.om.NodeInfo- Returns:
- namespace map
-
isId
Returns boolean. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
isIdin interfacenet.sf.saxon.om.NodeInfo- Returns:
- boolean
-
isIdref
Returns boolean. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
isIdrefin interfacenet.sf.saxon.om.NodeInfo- Returns:
- boolean
-
isNilled
Returns boolean. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
isNilledin interfacenet.sf.saxon.om.NodeInfo- Returns:
- boolean
-
isStreamed
Returns boolean. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
isStreamedin interfacenet.sf.saxon.om.Item- Specified by:
isStreamedin interfacenet.sf.saxon.om.NodeInfo- Returns:
- boolean
-
getConfiguration
Returns configuration. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
getConfigurationin 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:
setSystemIdin interfacenet.sf.saxon.om.NodeInfo- Specified by:
setSystemIdin 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:
getSystemIdin interfacenet.sf.saxon.s9api.Location- Specified by:
getSystemIdin interfaceLocator- Specified by:
getSystemIdin interfacenet.sf.saxon.om.NodeInfo- Specified by:
getSystemIdin interfaceSource- Specified by:
getSystemIdin 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:
getPublicIdin interfacenet.sf.saxon.s9api.Location- Specified by:
getPublicIdin interfaceLocator- Specified by:
getPublicIdin interfacenet.sf.saxon.om.NodeInfo- Specified by:
getPublicIdin 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:
getBaseURIin interfacenet.sf.saxon.om.NodeInfo- Returns:
- base uri
-
saveLocation
Returns location. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
saveLocationin interfacenet.sf.saxon.s9api.Location- Returns:
- location
-
getUnicodeStringValue
Returns the value of the item as a Unicode string. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
getUnicodeStringValuein interfacenet.sf.saxon.om.GroundedValue- Specified by:
getUnicodeStringValuein interfacenet.sf.saxon.om.Item- Returns:
- CharSequence string value
-
getFingerprint
Returns fingerprint. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
getFingerprintin 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:
getDisplayNamein 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:
getPrefixin interfacenet.sf.saxon.om.NodeInfo- Returns:
- prefix
-
getSchemaType
Returns type of the schema. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
getSchemaTypein interfacenet.sf.saxon.om.NodeInfo- Returns:
- type of the schema
-
atomize
Returns AtomicSequence. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
atomizein interfacenet.sf.saxon.om.Item- Specified by:
atomizein interfacenet.sf.saxon.om.NodeInfo- Returns:
- AtomicSequence
-
generateId
Generate id method. ThrowsUnsupportedOperationException, because no child class implements it and this method is not used for querying.- Specified by:
generateIdin interfacenet.sf.saxon.om.NodeInfo- Parameters:
buffer- buffer
-
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:
copyin 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
-