edu.wpi.cs.dsrg.xmldb.xat.component.schemacleanup
Class CutVisitor

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor
        |
        +--edu.wpi.cs.dsrg.xmldb.xat.component.schemacleanup.CutVisitor

public class CutVisitor
extends InheritableVisitor

This class will call the SchemaVisitor to compute the Minimum Schema, call the RequiredVisitor to compute the Required Columns, and do the cutting if the required columns not in produced and modified.

Since:
1.0

Field Summary
 boolean cutted
          Indicates whether some of the node got cutted.
 
Constructor Summary
CutVisitor(java.util.Hashtable hash_init)
          CutVisitor Constructor.
 
Method Summary
 java.lang.Object dispatch()
          To visit a null object.
 java.lang.Object dispatch(java.lang.Object o)
          To visit any object.
 boolean getCutted()
          Get the attribute "cutted".
static boolean isDebug()
          Get the value of the propertity "DEBUG_SchemaCleanUp".
 boolean setCutted(boolean cutvalue)
          Set the attribute "cutted" using given boolean value.
 java.lang.Object visit(XATNode node)
          Compute all consumed columns by a given Expression.
 
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

cutted

public boolean cutted
Indicates whether some of the node got cutted.
Since:
1.0
Constructor Detail

CutVisitor

public CutVisitor(java.util.Hashtable hash_init)
CutVisitor Constructor.
Parameters:
hash_init - The hash table to keep the map between XATNode and its corresponding SchemaCleanUpNode.
Since:
1.0
See Also:
RequiredVisitor, SchemaVisitor
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 o)
Description copied from class: InheritableVisitor
To visit any object.
Overrides:
dispatch in class InheritableVisitor

getCutted

public boolean getCutted()
Get the attribute "cutted".
Returns:
boolean True: cuttable. False: not cuttable.
Since:
1.0

setCutted

public boolean setCutted(boolean cutvalue)
Set the attribute "cutted" using given boolean value.
Parameters:
cutvalue - The boolean value indicate if the node is cuttable or not.
Returns:
boolean True: cuttable. False: not cuttable.
Since:
1.0

visit

public java.lang.Object visit(XATNode node)
Compute all consumed columns by a given Expression.
Parameters:
node - The XATNode being cleaned.
Returns:
Object
Since:
1.0
See Also:
SchemaCleanupNode, traverseSubtree

isDebug

public static boolean isDebug()
Get the value of the propertity "DEBUG_SchemaCleanUp".
Returns:
boolean True: With debug information. False: No debug information.
Since:
1.0