edu.ucsb.nceas.metacat

## Class SubTree

- java.lang.Object
- - edu.ucsb.nceas.metacat.SubTree

- All Implemented Interfaces:
    java.util.Comparator
  Direct Known Subclasses:
    AccessSection

      public class SubTree
      extends java.lang.Object
      implements java.util.Comparator

  A Class that represents an XML Subtree

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `docId`
    `protected long` | `endNodeId`
    `protected java.lang.String` | `startElementName`
    `protected long` | `startNodeId`
    `protected java.lang.String` | `subTreeId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubTree()` Defualt constructor
    `SubTree(java.lang.String myDocId, java.lang.String mySubTreeId, long myStartNodeId, long myEndNodeId)` Constructor of subtree

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(java.lang.Object o1, java.lang.Object o2)` methods from Comparator interface
    `boolean` | `equals(java.lang.Object obj)` method from Comparator interface
    `java.lang.String` | `getDocId()` Get the docId
    `long` | `getEndNodeId()` Get end node id
    `java.lang.String` | `getStartElementName()` Get startElementName
    `long` | `getStartNodeId()` Get start node id
    `java.lang.String` | `getSubTreeId()` Get the subTreeId
    `java.util.Stack<NodeRecord>` | `getSubTreeNodeStack()` Get subtree node stack
    `void` | `setDocId(java.lang.String myId)` Set the a docId
    `void` | `setEndNodeId(long nodeId)` Set a end node id
    `void` | `setStartElementName(java.lang.String elementName)` Set a startElementName
    `void` | `setStartNodeId(long nodeId)` Set a start node id
    `void` | `setSubTreeId(java.lang.String myId)` Set the a subtreeId
    `void` | `setSubTreeNodeStack(java.util.Stack myStack)` Set subtree node stack

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Field Detail

    - #### docId

          protected java.lang.String docId

    - #### subTreeId

          protected java.lang.String subTreeId

    - #### startElementName

          protected java.lang.String startElementName

    - #### startNodeId

          protected long startNodeId

    - #### endNodeId

          protected long endNodeId

  - ### Constructor Detail

    - #### SubTree

          public SubTree()

      Defualt constructor

    - #### SubTree

          public SubTree(java.lang.String myDocId,
                         java.lang.String mySubTreeId,
                         long myStartNodeId,
                         long myEndNodeId)

      Constructor of subtree

  - ### Method Detail

    - #### getSubTreeNodeStack

          public java.util.Stack<NodeRecord> getSubTreeNodeStack()
                                                          throws org.xml.sax.SAXException

      Get subtree node stack
      Throws:
        `org.xml.sax.SAXException`

    - #### setSubTreeNodeStack

          public void setSubTreeNodeStack(java.util.Stack myStack)

      Set subtree node stack

    - #### setDocId

          public void setDocId(java.lang.String myId)

      Set the a docId

    - #### getDocId

          public java.lang.String getDocId()

      Get the docId

    - #### setSubTreeId

          public void setSubTreeId(java.lang.String myId)

      Set the a subtreeId

    - #### getSubTreeId

          public java.lang.String getSubTreeId()

      Get the subTreeId

    - #### setStartElementName

          public void setStartElementName(java.lang.String elementName)

      Set a startElementName

    - #### getStartElementName

          public java.lang.String getStartElementName()

      Get startElementName

    - #### setStartNodeId

          public void setStartNodeId(long nodeId)

      Set a start node id

    - #### getStartNodeId

          public long getStartNodeId()

      Get start node id

    - #### setEndNodeId

          public void setEndNodeId(long nodeId)

      Set a end node id

    - #### getEndNodeId

          public long getEndNodeId()

      Get end node id

    - #### compare

          public int compare(java.lang.Object o1,
                             java.lang.Object o2)

      methods from Comparator interface
      Specified by:
        `compare` in interface `java.util.Comparator`

    - #### equals

          public boolean equals(java.lang.Object obj)

      method from Comparator interface
      Specified by:
        `equals` in interface `java.util.Comparator`
      Overrides:
        `equals` in class `java.lang.Object`

Copyright © 2020 Regents of the University of California. All Rights Reserved.