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

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.ReWritePositionRules

public class ReWritePositionRules
extends ReWriteRules

This Class is used to rewrite the XAT using position rules.

Since:
1.0

Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules
classVector, result, statis, variableTable
 
Constructor Summary
ReWritePositionRules()
          Default ReWritePositionRules constructor.
 
Method Summary
 java.lang.Object visit(Function parent, Navigate child)
          Rule to eliminate a Position Function node and replace it with a global position function.
 java.lang.Object visit(GroupBy parent, GroupBy child)
          Rule to eliminate a Position Function node and replace it with either a single or multi step position function.
 java.lang.Object visit(GroupBy parent, Navigate child)
          Rule to eliminate a Position Function node and replace it with either a single or multi step position function.
 
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

ReWritePositionRules

public ReWritePositionRules()
Default ReWritePositionRules constructor.
Since:
1.0
Method Detail

visit

public java.lang.Object visit(Function parent,
                              Navigate child)
Rule to eliminate a Position Function node and replace it with a global position function. In the instance that after decorrelation a function node still exists, it is because it is a multi-step order function with root context. Otherwise it would be attached to a groupby in the decorrelation of the for node.
Parameters:
parent - The parent Function operator.
child - The child Navigate operator.
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0

visit

public java.lang.Object visit(GroupBy parent,
                              GroupBy child)
Rule to eliminate a Position Function node and replace it with either a single or multi step position function. It will be a single step if the binding of the nav is equal to the parameter of the function. Otherwise the binding of the nav will be an ancestor, and it will be a multi step replace.
Parameters:
parent - The parent GroupBy operator.
child - The child GroupBy operator.
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0

visit

public java.lang.Object visit(GroupBy parent,
                              Navigate child)
Rule to eliminate a Position Function node and replace it with either a single or multi step position function. It will be a single step if the binding of the nav is equal to the parameter of the function. Otherwise the binding of the nav will be an ancestor, and it will be a multi step replace.
Parameters:
parent - The parent GroupBy operator.
child - The child Navigate operator.
Returns:
ReWriteResult. The swap flag in ReWriteResult true if the nodes were swapped, false otherwise.
Since:
1.0