edu.wpi.cs.dsrg.xmldb.xat.component.querymerger
Class MergeVisitor

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.querymerger.MergeVisitor

public class MergeVisitor
extends TwoParamVisitor


Field Summary
protected  XATTree userXAT
           
protected  XATTree viewXAT
           
 
Constructor Summary
MergeVisitor(XATTree userTree, XATTree viewTree)
          Insert the method's description here.
 
Method Summary
 java.lang.Object dispatch()
          To visit a null object.
 java.lang.Object dispatch(java.lang.Object obj)
          To visit any object.
 java.lang.Object dispatch(java.lang.Object obj1, java.lang.Object obj2)
          To visit two objects.
 XATTree getUserXAT()
          Insert the method's description here.
 XATTree getViewXAT()
          Insert the method's description here.
 void mergeTrees()
          xtrObj1 will be the user query or upper tree xtrObj2 will be the mapping query or bottom tree Also the binding tables should be merged.
 void mergeTrees(boolean mergeTagger)
          xtrObj1 will be the user query or upper tree xtrObj2 will be the mapping query or bottom tree Also the binding tables should be merged.
 void setUserXAT(XATTree newUserXAT)
          Insert the method's description here.
 void setViewXAT(XATTree newViewXAT)
          Insert the method's description here.
 java.lang.Object visit(Source s, XATTree viewTree)
          Connect the bottom of the user query to the top of the view query Add a Rename that takes the output of the root of the View query and renames the Output of the Source s into that.
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.TwoParamVisitor
getMethod, visit, visit
 
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
 

Field Detail

userXAT

protected XATTree userXAT

viewXAT

protected XATTree viewXAT
Constructor Detail

MergeVisitor

public MergeVisitor(XATTree userTree,
                    XATTree viewTree)
Insert the method's description here.
Method Detail

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 obj)
Description copied from class: InheritableVisitor
To visit any object.
Overrides:
dispatch in class InheritableVisitor

dispatch

public java.lang.Object dispatch(java.lang.Object obj1,
                                 java.lang.Object obj2)
Description copied from class: TwoParamVisitor
To visit two objects.
Overrides:
dispatch in class TwoParamVisitor

getUserXAT

public XATTree getUserXAT()
Insert the method's description here.
Returns:
edu.wpi.cs.dsrg.xmldb.xat.common.treestructure.XATTree

getViewXAT

public XATTree getViewXAT()
Insert the method's description here.
Returns:
edu.wpi.cs.dsrg.xmldb.xat.common.treestructure.XATTree

mergeTrees

public void mergeTrees()
xtrObj1 will be the user query or upper tree xtrObj2 will be the mapping query or bottom tree Also the binding tables should be merged.

mergeTrees

public void mergeTrees(boolean mergeTagger)
xtrObj1 will be the user query or upper tree xtrObj2 will be the mapping query or bottom tree Also the binding tables should be merged.
Parameters:
mergeTagger: - whether merge will merge all the taggers or not.

setUserXAT

public void setUserXAT(XATTree newUserXAT)
Insert the method's description here.
Parameters:
newUserXAT - edu.wpi.cs.dsrg.xmldb.xat.common.treestructure.XATTree

setViewXAT

public void setViewXAT(XATTree newViewXAT)
Insert the method's description here.
Parameters:
newViewXAT - edu.wpi.cs.dsrg.xmldb.xat.common.treestructure.XATTree

visit

public java.lang.Object visit(Source s,
                              XATTree viewTree)
                       throws XATNodeDoesNotExistException
Connect the bottom of the user query to the top of the view query Add a Rename that takes the output of the root of the View query and renames the Output of the Source s into that. Also, get rid of the expose operator for the view tree.