edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite
Class ReWriteOrderByRules

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor
        |
        +--edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.TwoParamVisitor
              |
              +--edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules
                    |
                    +--edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteOrderByRules

public class ReWriteOrderByRules
extends ReWriteRules

This Class is used to optimize the orderby operators ( if there is any in given XAT ).

Since:
1.0

Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules
classVector, result, statis, variableTable
 
Constructor Summary
ReWriteOrderByRules()
          Default ReWriteOrderByRules constructor.
ReWriteOrderByRules(java.util.Vector sourceList)
          ReWriteOrderByRules constructor.
ReWriteOrderByRules(java.util.Vector sourceList, BindingTable varList)
          ReWriteOrderByRules constructor.
 
Method Summary
 java.lang.Object visit(OrderBy parent, Aggregate child)
           
 java.lang.Object visit(OrderBy parent, GroupBy child)
           
 java.lang.Object visit(OrderBy parent, Join child)
           
 java.lang.Object visit(OrderBy parent, NameColumn child)
           
 java.lang.Object visit(OrderBy parent, OrderBy child)
           
 java.lang.Object visit(OrderBy parent, Project child)
           
 java.lang.Object visit(OrderBy parent, Select child)
           
 java.lang.Object visit(OrderBy parent, Source child)
           
 java.lang.Object visit(OrderBy parent, Tagger child)
           
 java.lang.Object visit(OrderBy parent, Union child)
           
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules
combineSteps, copyNode, createString, deleteAggregate, deletePartialTagger, deleteWholeTagger, dispatch, dispatch, dispatch, evaluateRules, evaluateRules, findMatchingNavigationNode, findMatchingNavigationNode, getChildren, getColumnNames, getStatis, getVariableTable, isDebug, isGatherStatistics, isUsedAbove, moveNode, moveNodeToRoot, setDebug, setVariableTable, swap, visit, visit
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.TwoParamVisitor
getMethod, visit
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor
getAncestors, getMethod, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReWriteOrderByRules

public ReWriteOrderByRules()
Default ReWriteOrderByRules constructor.
Since:
1.0

ReWriteOrderByRules

public ReWriteOrderByRules(java.util.Vector sourceList)
ReWriteOrderByRules constructor.
Parameters:
sourceList - The list of operator types being considered to apply this rewrite rule.
Since:
1.0

ReWriteOrderByRules

public ReWriteOrderByRules(java.util.Vector sourceList,
                           BindingTable varList)
ReWriteOrderByRules constructor. Constructs a CancelOutTraversal object using XAT and Rewrite Rules and order.
Parameters:
sourceList - The list of operator types being considered to apply this rewrite rule.
varList - java.util.Hashtable, the binding table of given XAT.
Since:
1.0
See Also:
BindingTable
Method Detail

visit

public java.lang.Object visit(OrderBy parent,
                              NameColumn child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (NameColumn).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, NameColumn, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              Source child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (Source).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, Source, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              GroupBy child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (GroupBy).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, GroupBy, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              Join child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (Join).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, Join, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              OrderBy child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (OrderBy).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              Project child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (Project).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, Project, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              Select child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (Select).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, Select, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              Union child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (Union).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, Union, ReWriteResult

visit

public java.lang.Object visit(OrderBy parent,
                              Aggregate child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (Aggregate).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
Aggregate, ReWriteResult, OrderBy

visit

public java.lang.Object visit(OrderBy parent,
                              Tagger child)
Parameters:
parent - The parent XAT operator (OrderBy).
child - The child XAT Operator (Tagger).
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0
See Also:
OrderBy, Tagger, ReWriteResult