com.metamatrix.jdbc.api
Class TextOutputVisitor

java.lang.Object
  extended by com.metamatrix.jdbc.api.PlanVisitor
      extended by com.metamatrix.jdbc.api.TextOutputVisitor

public class TextOutputVisitor
extends PlanVisitor

This visitor class can be used to output a formatted text representation of the plan.


Constructor Summary
TextOutputVisitor(DisplayHelper displayHelper, int initialTabs)
          Construct the visitor.
 
Method Summary
 java.lang.String getText()
          Return string representation of the plan
protected  void visitContainerProperty(PlanNode node, java.lang.String propertyName, java.util.Collection propertyValue)
          Visit a container property - the container property will be visited, then each particular value of the container will be visited.
protected  void visitNode(PlanNode node)
          Visit a node.
protected  void visitPropertyValue(PlanNode node, java.lang.String propertyName, java.lang.Object propertyValue)
          Visit a property value.
 
Methods inherited from class com.metamatrix.jdbc.api.PlanVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextOutputVisitor

public TextOutputVisitor(DisplayHelper displayHelper,
                         int initialTabs)
Construct the visitor.

Parameters:
displayHelper - Helper to help format the display
initialTabs - Number of tabs to put before every line
Method Detail

getText

public java.lang.String getText()
Return string representation of the plan

Returns:
String representation of the plan

visitNode

protected void visitNode(PlanNode node)
Description copied from class: PlanVisitor
Visit a node.

Specified by:
visitNode in class PlanVisitor
Parameters:
node - The node being visited

visitPropertyValue

protected void visitPropertyValue(PlanNode node,
                                  java.lang.String propertyName,
                                  java.lang.Object propertyValue)
Description copied from class: PlanVisitor
Visit a property value.

Specified by:
visitPropertyValue in class PlanVisitor
Parameters:
node - The node being visited
propertyName - The property name being visited
propertyValue - The property value being visited

visitContainerProperty

protected void visitContainerProperty(PlanNode node,
                                      java.lang.String propertyName,
                                      java.util.Collection propertyValue)
Description copied from class: PlanVisitor
Visit a container property - the container property will be visited, then each particular value of the container will be visited.

Specified by:
visitContainerProperty in class PlanVisitor
Parameters:
node - The node being visited
propertyName - The property name being visited
propertyValue - The collection value being visited


Copyright © 2009. All Rights Reserved.