edu.wpi.cs.dsrg.utils
Class BindingTableComputer

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor
        |
        +--edu.wpi.cs.dsrg.utils.BindingTableComputer

public class BindingTableComputer
extends InheritableVisitor

This class compute the bindingTable for a given XAT. Usage eg : BindingTableComputer btc = new BindingTableComputer(); BindingTable bt = btc.computeBindingTable(xat); xat.setBindingTable( bt );

Since:
1.0

Constructor Summary
BindingTableComputer()
          The default BindingTableComputer constructor.
 
Method Summary
 BindingTable computeBindingTable(XATTree xatTree)
          Compute the binding table for a given XAT.
 java.lang.Object dispatch()
          To visit a null object.
 java.lang.Object dispatch(java.lang.Object o1)
          To visit any object.
 java.lang.Object visit(FOR fr)
          Recursively compute all variable bindings of a subtree rooted at a "FOR" node.
 java.lang.Object visit(Function func)
          Recursively compute all variable bindings of a subtree rooted at a "Function" node.
 java.lang.Object visit(GroupBy groupby)
          Recursively compute all variable bindings of a subtree rooted at a "GroupBy" node.
 java.lang.Object visit(NameColumn name)
          Recursively compute all variable bindings of a subtree rooted at a "NameColumn" node.
 java.lang.Object visit(Navigate nav)
          Recursively compute all variable bindings of a subtree rooted at a "Navigate" node.
 java.lang.Object visit(Source source)
          Recursively compute all variable bindings of a subtree rooted at a "Source" node.
 java.lang.Object visit(Tagger tag)
          Recursively compute all variable bindings of a subtree rooted at a "Tagger" node.
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor
getAncestors, getMethod, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingTableComputer

public BindingTableComputer()
The default BindingTableComputer constructor.
Since:
1.0
Method Detail

computeBindingTable

public BindingTable computeBindingTable(XATTree xatTree)
Compute the binding table for a given XAT.
Parameters:
xatTree - The XATTree computing binding table for.
Returns:
BindingTable The result BindingTable computed.
Since:
1.0

dispatch

public java.lang.Object dispatch()
Description copied from class: InheritableVisitor
To visit a null object.
Overrides:
dispatch in class InheritableVisitor

dispatch

public java.lang.Object dispatch(java.lang.Object o1)
Description copied from class: InheritableVisitor
To visit any object.
Overrides:
dispatch in class InheritableVisitor

visit

public java.lang.Object visit(FOR fr)
Recursively compute all variable bindings of a subtree rooted at a "FOR" node.
Parameters:
fr - The FOR operator.
Returns:
The computing result.
Since:
1.0

visit

public java.lang.Object visit(Function func)
Recursively compute all variable bindings of a subtree rooted at a "Function" node.
Parameters:
func - The Function operator.
Returns:
The computing result.
Since:
1.0

visit

public java.lang.Object visit(NameColumn name)
Recursively compute all variable bindings of a subtree rooted at a "NameColumn" node.
Parameters:
name - The NameColumn operator.
Returns:
The computing result.
Since:
1.0

visit

public java.lang.Object visit(Source source)
Recursively compute all variable bindings of a subtree rooted at a "Source" node.
Parameters:
source - The Source operator.
Returns:
The computing result.
Since:
1.0

visit

public java.lang.Object visit(GroupBy groupby)
Recursively compute all variable bindings of a subtree rooted at a "GroupBy" node.
Parameters:
groupby - The GroupBy operator.
Returns:
The computing result.
Since:
1.0

visit

public java.lang.Object visit(Navigate nav)
Recursively compute all variable bindings of a subtree rooted at a "Navigate" node.
Parameters:
nav - The Navigate operator.
Returns:
The computing result.
Since:
1.0

visit

public java.lang.Object visit(Tagger tag)
Recursively compute all variable bindings of a subtree rooted at a "Tagger" node.
Parameters:
tag - The Tagger operator.
Returns:
The computing result.
Since:
1.0