Class Node

java.lang.Object
nu.validator.saxtree.Node
All Implemented Interfaces:
Locator
Direct Known Subclasses:
CharBufferNode, ParentNode, ProcessingInstruction, SkippedEntity

public abstract class Node extends Object implements Locator
The common node superclass.
Version:
$Id$
  • Field Details

    • systemId

      private final String systemId
      The system id.
    • publicId

      private final String publicId
      The public id.
    • column

      private final int column
      The column.
    • line

      private final int line
      The line.
    • nextSibling

      private Node nextSibling
      The next sibling.
    • parentNode

      private ParentNode parentNode
      The parent.
  • Constructor Details

    • Node

      Node(Locator locator)
      The constructor.
      Parameters:
      locator - the locator
  • Method Details

    • getColumnNumber

      public int getColumnNumber()
      Specified by:
      getColumnNumber in interface Locator
      See Also:
    • getLineNumber

      public int getLineNumber()
      Specified by:
      getLineNumber in interface Locator
      See Also:
    • getPublicId

      public String getPublicId()
      Specified by:
      getPublicId in interface Locator
      See Also:
    • getSystemId

      public String getSystemId()
      Specified by:
      getSystemId in interface Locator
      See Also:
    • visit

      abstract void visit(TreeParser treeParser) throws SAXException
      Visit the node.
      Parameters:
      treeParser - the visitor
      Throws:
      SAXException - if stuff goes wrong
    • revisit

      void revisit(TreeParser treeParser) throws SAXException
      Revisit the node.
      Parameters:
      treeParser - the visitor
      Throws:
      SAXException - if stuff goes wrong
    • getFirstChild

      public Node getFirstChild()
      Return the first child.
      Returns:
      the first child
    • getNextSibling

      public final Node getNextSibling()
      Returns the nextSibling.
      Returns:
      the nextSibling
    • getPreviousSibling

      public final Node getPreviousSibling()
      Returns the previous sibling
      Returns:
      the previous sibling
    • setNextSibling

      void setNextSibling(Node nextSibling)
      Sets the nextSibling.
      Parameters:
      nextSibling - the nextSibling to set
    • getParentNode

      public final ParentNode getParentNode()
      Returns the parentNode.
      Returns:
      the parentNode
    • setParentNode

      void setParentNode(ParentNode parentNode)
      Sets the parentNode.
      Parameters:
      parentNode - the parentNode to set
    • getNodeType

      public abstract NodeType getNodeType()
      Return the node type.
      Returns:
      the node type
    • detach

      public void detach()
      Detach this node from its parent.
    • getName

      public String getName()
      Returns the name.
      Returns:
      the name
    • getPublicIdentifier

      public String getPublicIdentifier()
      Returns the publicIdentifier.
      Returns:
      the publicIdentifier
    • getSystemIdentifier

      public String getSystemIdentifier()
      Returns the systemIdentifier.
      Returns:
      the systemIdentifier
    • getAttributes

      public Attributes getAttributes()
      Returns the attributes.
      Returns:
      the attributes
    • getLocalName

      public String getLocalName()
      Returns the localName.
      Returns:
      the localName
    • getPrefixMappings

      public List<PrefixMapping> getPrefixMappings()
      Returns the prefixMappings.
      Returns:
      the prefixMappings
    • getQName

      public String getQName()
      Returns the qName.
      Returns:
      the qName
    • getUri

      public String getUri()
      Returns the uri.
      Returns:
      the uri
    • getData

      public String getData()
      Returns the data.
      Returns:
      the data
    • getTarget

      public String getTarget()
      Returns the target.
      Returns:
      the target