Class AbstractNode

java.lang.Object
com.puppycrawl.tools.checkstyle.xpath.AbstractNode
All Implemented Interfaces:
Iterable<net.sf.saxon.om.NodeInfo>, Source, SourceLocator, net.sf.saxon.expr.parser.Location, net.sf.saxon.om.GroundedValue<net.sf.saxon.om.NodeInfo>, net.sf.saxon.om.Item<net.sf.saxon.om.NodeInfo>, net.sf.saxon.om.NodeInfo, net.sf.saxon.om.Sequence<net.sf.saxon.om.NodeInfo>, Locator
Direct Known Subclasses:
AttributeNode, ElementNode, RootNode

public abstract class AbstractNode extends Object implements net.sf.saxon.om.NodeInfo
Represents general class for ElementNode, RootNode and AttributeNode.
  • Field Summary

    Fields inherited from interface net.sf.saxon.om.NodeInfo

    IS_DTD_TYPE, IS_NILLED
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractNode(net.sf.saxon.om.TreeInfo treeInfo)
    Constructor of the abstract class AbstractNode.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Add new child node to children list.
    final net.sf.saxon.om.AtomicSequence
    Returns AtomicSequence.
    final void
    copy(net.sf.saxon.event.Receiver receiver, int index, net.sf.saxon.expr.parser.Location location)
    Copy method.
    final void
    generateId(net.sf.saxon.tree.util.FastStringBuffer fastStringBuffer)
    Generate id method.
    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.
    int
    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.
    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.
    Returns uri of the namespace for the current node.
    boolean
    Returns if current node has children.
    boolean
    Returns if implementation provides fingerprints.
    final boolean
    Returns boolean.
    final boolean
    Returns boolean.
    final boolean
    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(byte axisNumber, net.sf.saxon.pattern.NodeTest nodeTest)
    Determines axis iteration algorithm.
    final net.sf.saxon.expr.parser.Location
    Returns location.
    final void
    setDepth(int depth)
    Setter method for node depth.
    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, effectiveBooleanValue, materialize

    Methods inherited from interface net.sf.saxon.om.Item

    getLength, head, itemAt, iterate, iterator, reduce, subsequence

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface net.sf.saxon.om.NodeInfo

    compareOrder, equals, getAttributeValue, getColumnNumber, getGenre, getLineNumber, getLocalPart, getNodeKind, getParent, getRoot, hashCode, iterateAxis, toShortString

    Methods inherited from interface net.sf.saxon.om.Sequence

    makeRepeatable

    Methods inherited from interface javax.xml.transform.Source

    isEmpty
  • Constructor Details

    • AbstractNode

      protected AbstractNode(net.sf.saxon.om.TreeInfo treeInfo)
      Constructor of the abstract class AbstractNode.
      Parameters:
      treeInfo - TreeInfo object
  • Method Details

    • getTokenType

      public abstract int getTokenType()
      Getter method for token type.
      Returns:
      token type
    • getUnderlyingNode

      public abstract DetailAST getUnderlyingNode()
      Returns underlying node.
      Returns:
      underlying node
    • getDepth

      public int getDepth()
      Getter method for node depth.
      Returns:
      depth
    • setDepth

      public final void setDepth(int depth)
      Setter method for node depth.
      Parameters:
      depth - depth of 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 interface net.sf.saxon.om.NodeInfo
      Parameters:
      nodeInfo - other node
      Returns:
      TreeInfo
    • hasFingerprint

      public boolean hasFingerprint()
      Returns if implementation provides fingerprints.
      Specified by:
      hasFingerprint in interface net.sf.saxon.om.NodeInfo
      Returns:
      boolean
    • getURI

      public String getURI()
      Returns uri of the namespace for the current node.
      Specified by:
      getURI in interface net.sf.saxon.om.NodeInfo
      Returns:
      uri
    • hasChildNodes

      public boolean hasChildNodes()
      Returns if current node has children.
      Specified by:
      hasChildNodes in interface net.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 interface net.sf.saxon.om.NodeInfo
      Parameters:
      axisNumber - element from AxisInfo
      nodeTest - filter for iterator
      Returns:
      AxisIterator object
    • getTreeInfo

      public final net.sf.saxon.om.TreeInfo getTreeInfo()
      Returns tree info.
      Specified by:
      getTreeInfo in interface net.sf.saxon.om.NodeInfo
      Returns:
      tree info
    • getStringValue

      public String getStringValue()
      Returns string value. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getStringValue in interface net.sf.saxon.om.GroundedValue<net.sf.saxon.om.NodeInfo>
      Specified by:
      getStringValue in interface net.sf.saxon.om.Item<net.sf.saxon.om.NodeInfo>
      Specified by:
      getStringValue in interface net.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. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getDeclaredNamespaces in interface net.sf.saxon.om.NodeInfo
      Parameters:
      namespaceBindings - namespace array
      Returns:
      namespace array
    • isId

      public final boolean isId()
      Returns boolean. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      isId in interface net.sf.saxon.om.NodeInfo
      Returns:
      boolean
    • isIdref

      public final boolean isIdref()
      Returns boolean. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      isIdref in interface net.sf.saxon.om.NodeInfo
      Returns:
      boolean
    • isNilled

      public final boolean isNilled()
      Returns boolean. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      isNilled in interface net.sf.saxon.om.NodeInfo
      Returns:
      boolean
    • isStreamed

      public final boolean isStreamed()
      Returns boolean. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      isStreamed in interface net.sf.saxon.om.Item<net.sf.saxon.om.NodeInfo>
      Specified by:
      isStreamed in interface net.sf.saxon.om.NodeInfo
      Returns:
      boolean
    • getConfiguration

      public final net.sf.saxon.Configuration getConfiguration()
      Returns configuration. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getConfiguration in interface net.sf.saxon.om.NodeInfo
      Returns:
      configuration
    • setSystemId

      public final void setSystemId(String systemId)
      Sets system id. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      setSystemId in interface Source
      Parameters:
      systemId - system id
    • getSystemId

      public final String getSystemId()
      Returns system id. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getSystemId in interface net.sf.saxon.expr.parser.Location
      Specified by:
      getSystemId in interface Locator
      Specified by:
      getSystemId in interface net.sf.saxon.om.NodeInfo
      Specified by:
      getSystemId in interface Source
      Specified by:
      getSystemId in interface SourceLocator
      Returns:
      system id
    • getPublicId

      public final String getPublicId()
      Returns public id. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getPublicId in interface net.sf.saxon.expr.parser.Location
      Specified by:
      getPublicId in interface Locator
      Specified by:
      getPublicId in interface net.sf.saxon.om.NodeInfo
      Specified by:
      getPublicId in interface SourceLocator
      Returns:
      public id
    • getBaseURI

      public final String getBaseURI()
      Returns base uri. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getBaseURI in interface net.sf.saxon.om.NodeInfo
      Returns:
      base uri
    • saveLocation

      public final net.sf.saxon.expr.parser.Location saveLocation()
      Returns location. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      saveLocation in interface net.sf.saxon.expr.parser.Location
      Returns:
      location
    • getStringValueCS

      public final CharSequence getStringValueCS()
      Returns CharSequence string value. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getStringValueCS in interface net.sf.saxon.om.GroundedValue<net.sf.saxon.om.NodeInfo>
      Specified by:
      getStringValueCS in interface net.sf.saxon.om.Item<net.sf.saxon.om.NodeInfo>
      Returns:
      CharSequence string value
    • getFingerprint

      public final int getFingerprint()
      Returns fingerprint. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getFingerprint in interface net.sf.saxon.om.NodeInfo
      Returns:
      fingerprint
    • getDisplayName

      public final String getDisplayName()
      Returns display name. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getDisplayName in interface net.sf.saxon.om.NodeInfo
      Returns:
      display name
    • getPrefix

      public final String getPrefix()
      Returns prefix. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getPrefix in interface net.sf.saxon.om.NodeInfo
      Returns:
      prefix
    • getSchemaType

      public final net.sf.saxon.type.SchemaType getSchemaType()
      Returns type of the schema. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      getSchemaType in interface net.sf.saxon.om.NodeInfo
      Returns:
      type of the schema
    • atomize

      public final net.sf.saxon.om.AtomicSequence atomize()
      Returns AtomicSequence. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      atomize in interface net.sf.saxon.om.Item<net.sf.saxon.om.NodeInfo>
      Specified by:
      atomize in interface net.sf.saxon.om.NodeInfo
      Returns:
      AtomicSequence
    • generateId

      public final void generateId(net.sf.saxon.tree.util.FastStringBuffer fastStringBuffer)
      Generate id method. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      generateId in interface net.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. Throws UnsupportedOperationException, because no child class implements it and this method is not used for querying.
      Specified by:
      copy in interface net.sf.saxon.om.NodeInfo
      Parameters:
      receiver - receiver
      index - index
      location - location