edu.wpi.cs.dsrg.xmldb.xat.component.sqlgeneration
Class XQueryOperatorEvaluator

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor
        |
        +--edu.wpi.cs.dsrg.xmldb.xat.component.sqlgeneration.OperatorEvaluator
              |
              +--edu.wpi.cs.dsrg.xmldb.xat.component.sqlgeneration.XQueryOperatorEvaluator

public class XQueryOperatorEvaluator
extends OperatorEvaluator

Insert the type's description here.


Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.sqlgeneration.OperatorEvaluator
heuristicType, sourceVisited, variableTable
 
Constructor Summary
XQueryOperatorEvaluator(BindingTable varTable)
          XQueryOperatorEvaluator constructor comment.
XQueryOperatorEvaluator(int heuristic, BindingTable varTable)
          XQueryOperatorEvaluator constructor comment.
 
Method Summary
protected  boolean traverseTagger(DOMPatternNode rootNode, java.util.Vector columnName, java.util.Vector tagName)
          deleteTagger will iterate over a Tagger operator and determine if the operator can be deleted or not.
 java.lang.Object visit(DistinctImp param)
          Evaluates a Distinct Operator and determines the SQL equivalent of the destination
 java.lang.Object visit(FunctionImp param)
          Evaluates a Function Operator and determines the SQL equivalent
 java.lang.Object visit(GroupByImp param)
          Evaluates an GroupBy Operator and determines the SQL equivalent of the destination take all of the columns names in the orderBy and add them to the oderBy clause the result will look like GroupBy col1, col2, etc GroupBy returns multiple SQL fragments, 1 for the groupBy and 1 for each of the operators in its subTree Therefore, we first visit the subTree first
 java.lang.Object visit(JoinImp param)
          Evaluates a Join Operator and determines the SQL equivalent of the destination This adds to the where clause, it will look like Where $a = '10' Same thing as select
 java.lang.Object visit(NameColumnImp param)
          Deprecated. NameColumn operators can now be pushed down so they will not occur in the tree to generate a query from
 java.lang.Object visit(NavUnnestImp param)
          Evaluates a Navigate Operator and determines the XQuery equivalent of the destination The Navigate's info is just put in a LET binding
 java.lang.Object visit(OrderByImp param)
          Deprecated. until I figure out what to do with it
 java.lang.Object visit(ProjectImp param)
          Evaluates a Project Operator and determines the SQL equivalent of the destination
 java.lang.Object visit(SelectImp param)
          Evaluates a Select Operator and determines the SQL equivalent of the destination This adds to the where clause, it will look like Where $a = '10'
 java.lang.Object visit(SourceImp param)
          Evaluates a Source Operator and determines the XQuery equivalent of the destination If a source has already been visited, then add this to the LET, otherwise, add it to FOR
 java.lang.Object visit(TaggerImp param)
          Evaluates a Tagger Operator and determines the XQuery equivalent of the destination
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.sqlgeneration.OperatorEvaluator
combineSteps, createString, createString, dispatch, dispatch, evaluateOperator, getVariableTable, isSourceVisited, setHeuristicType, setSourceVisited, setVariableTable
 
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

XQueryOperatorEvaluator

public XQueryOperatorEvaluator(int heuristic,
                               BindingTable varTable)
XQueryOperatorEvaluator constructor comment.
Parameters:
heuristic - int
varTable - java.util.Hashtable

XQueryOperatorEvaluator

public XQueryOperatorEvaluator(BindingTable varTable)
XQueryOperatorEvaluator constructor comment.
Parameters:
varTable - BindingTable
Method Detail

traverseTagger

protected boolean traverseTagger(DOMPatternNode rootNode,
                                 java.util.Vector columnName,
                                 java.util.Vector tagName)
deleteTagger will iterate over a Tagger operator and determine if the operator can be deleted or not. A Tagger may be deleted when all of its nodes have been cancelout
Parameters:
rootNode - root of the DOMPattern to start iterating over
Returns:
boolean true if the tagger can be deleted, false otherwise

visit

public java.lang.Object visit(FunctionImp param)
Evaluates a Function Operator and determines the SQL equivalent
Parameters:
param - Function
Returns:
java.lang.Object

visit

public java.lang.Object visit(NameColumnImp param)
Deprecated. NameColumn operators can now be pushed down so they will not occur in the tree to generate a query from

Evaluates a NameColumn Operator and determines the SQL equivalent of the destination the old column name is return in the name parameter of the fragment, the new name is the binding
Parameters:
param - NameColumnImp
Returns:
java.lang.Object

visit

public java.lang.Object visit(SourceImp param)
Evaluates a Source Operator and determines the XQuery equivalent of the destination If a source has already been visited, then add this to the LET, otherwise, add it to FOR
Parameters:
param - Source
Returns:
java.lang.Object

visit

public java.lang.Object visit(DistinctImp param)
Evaluates a Distinct Operator and determines the SQL equivalent of the destination
Parameters:
param - Distinct
Returns:
java.lang.Object

visit

public java.lang.Object visit(GroupByImp param)
Evaluates an GroupBy Operator and determines the SQL equivalent of the destination take all of the columns names in the orderBy and add them to the oderBy clause the result will look like GroupBy col1, col2, etc GroupBy returns multiple SQL fragments, 1 for the groupBy and 1 for each of the operators in its subTree Therefore, we first visit the subTree first
Parameters:
param - GroupBy
Returns:
java.lang.Object

visit

public java.lang.Object visit(JoinImp param)
Evaluates a Join Operator and determines the SQL equivalent of the destination This adds to the where clause, it will look like Where $a = '10' Same thing as select
Parameters:
param - Join
Returns:
java.lang.Object

visit

public java.lang.Object visit(OrderByImp param)
Deprecated. until I figure out what to do with it

Evaluates an OrderBy Operator and determines the SQL equivalent of the destination take all of the columns names in the orderBy and add them to the oderBy clause the result will look like OrderBy col1, col2, etc
Parameters:
param - OrderBy
Returns:
java.lang.Object

visit

public java.lang.Object visit(ProjectImp param)
Evaluates a Project Operator and determines the SQL equivalent of the destination
Parameters:
param - Project
Returns:
java.lang.Object

visit

public java.lang.Object visit(SelectImp param)
Evaluates a Select Operator and determines the SQL equivalent of the destination This adds to the where clause, it will look like Where $a = '10'
Parameters:
param - Select
Returns:
java.lang.Object

visit

public java.lang.Object visit(NavUnnestImp param)
Evaluates a Navigate Operator and determines the XQuery equivalent of the destination The Navigate's info is just put in a LET binding
Parameters:
param - Navigate
Returns:
java.lang.Object

visit

public java.lang.Object visit(TaggerImp param)
Evaluates a Tagger Operator and determines the XQuery equivalent of the destination
Parameters:
param - Tagger
Returns:
java.lang.Object