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

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

public class CancelOutNavigateRules
extends ReWriteRules

This Class is the rewrite rules used to cancel out two navigate operators within XAT.

Since:
1.0

Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules
classVector, result, statis, variableTable
 
Constructor Summary
CancelOutNavigateRules()
          Default CancelOutNavigateRules constructor.
 
Method Summary
 java.lang.Object visit(Navigate ancestor, Navigate descendent)
          Compare and cancel out two navigation operators (if possible).
 
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

CancelOutNavigateRules

public CancelOutNavigateRules()
Default CancelOutNavigateRules constructor. Constructs a CancelOutNavigateRules object.
Since:
1.0
Method Detail

visit

public java.lang.Object visit(Navigate ancestor,
                              Navigate descendent)
Compare and cancel out two navigation operators (if possible). This method first compares two navigate nodes. If they have the same entry point and destination point, the parent is deleted, and replaced with a rename node. The new rename node renames the bindings.
Parameters:
ancestor - The ancester navigate operator.
descendent - The decendent navigate operator.
Returns:
java.lang.Object
Since:
1.0
See Also:
edu.wpi.cs.dsrg.xmldb.xat.common.operator.xmloperator.navigate