edu.umd.cs.db.xsq
Class BasicPDT

java.lang.Object
  |
  +--edu.umd.cs.db.xsq.BasicPDT

public class BasicPDT
extends java.lang.Object

The BPDT class implements the Basic PDT component.


Constructor Summary
BasicPDT(edu.umd.cs.db.xsq.XPathNode node, edu.umd.cs.db.xsq.PDTState start, int parentID, int parentResult)
          Constructor.
 
Method Summary
static int findLayerDifference(int lower, int higher)
          This function works only when BPDT lower is in the right tree of BPDT higher.
static int findUnknownAncester(int bpdtid)
          Return the unique ID of the ancestor that has the BPDT in its right subtree.
static int getLayerOfBpdt(int bpdtId)
          Return the layer of the BPDT that has unique ID bpdtid.
 edu.umd.cs.db.xsq.XPathNode getLocationStep()
          Return the location step that the current BPDT is generated from.
static java.lang.String getNameOfBpdt(int bpdtId)
          Return a name of the BPDT in the form of "layer.seqnum".
 edu.umd.cs.db.xsq.PDTState getNaState()
          Return the NA state of the current BPDT.
static int getNumberInLayerOfBpdt(int bpdtId)
          Get the seqeunce number of the bpdtid in the same layer.
 int getNumberOfStates()
          Get number of states in the current BPDT.
 int getParentPDTID()
          Get the unique ID of the parent BPDT.
 int getParentResult()
          Return the result of the parent BPDT, i.e., which state the current BPDT is connected to the parent.
 int getPDTID()
          Get the unique ID of the current BPDT.
 edu.umd.cs.db.xsq.PDTState getStartState()
          Return the start state of the BPDT.
 java.util.Vector getStates()
          Get all the states in the current BPDT.
 edu.umd.cs.db.xsq.PDTState getTrueState()
          Return the TRUE state of the current BPDT.
 boolean isStateInBpdt(edu.umd.cs.db.xsq.PDTState state)
          Determine if the state is in this BPDT.
 void printBpdt()
          Print all the states in the BPDT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicPDT

public BasicPDT(edu.umd.cs.db.xsq.XPathNode node,
                edu.umd.cs.db.xsq.PDTState start,
                int parentID,
                int parentResult)
Constructor. We have to specify all these information needed for the basic PDT.

Method Detail

getStartState

public edu.umd.cs.db.xsq.PDTState getStartState()
Return the start state of the BPDT.


getParentResult

public int getParentResult()
Return the result of the parent BPDT, i.e., which state the current BPDT is connected to the parent.


getParentPDTID

public int getParentPDTID()
Get the unique ID of the parent BPDT.


getPDTID

public int getPDTID()
Get the unique ID of the current BPDT.


getLocationStep

public edu.umd.cs.db.xsq.XPathNode getLocationStep()
Return the location step that the current BPDT is generated from.


getTrueState

public edu.umd.cs.db.xsq.PDTState getTrueState()
Return the TRUE state of the current BPDT.


getNaState

public edu.umd.cs.db.xsq.PDTState getNaState()
Return the NA state of the current BPDT.


getNumberOfStates

public int getNumberOfStates()
Get number of states in the current BPDT.


getStates

public java.util.Vector getStates()
Get all the states in the current BPDT.


isStateInBpdt

public boolean isStateInBpdt(edu.umd.cs.db.xsq.PDTState state)
Determine if the state is in this BPDT.


getLayerOfBpdt

public static int getLayerOfBpdt(int bpdtId)
Return the layer of the BPDT that has unique ID bpdtid.


findUnknownAncester

public static int findUnknownAncester(int bpdtid)
Return the unique ID of the ancestor that has the BPDT in its right subtree.


findLayerDifference

public static int findLayerDifference(int lower,
                                      int higher)
This function works only when BPDT lower is in the right tree of BPDT higher.


getNumberInLayerOfBpdt

public static int getNumberInLayerOfBpdt(int bpdtId)
Get the seqeunce number of the bpdtid in the same layer.


getNameOfBpdt

public static java.lang.String getNameOfBpdt(int bpdtId)
Return a name of the BPDT in the form of "layer.seqnum".


printBpdt

public void printBpdt()
Print all the states in the BPDT.