com.metamatrix.jdbc.api
Interface DisplayHelper

All Known Implementing Classes:
DefaultDisplayHelper, QueryPlanDisplayHelper

public interface DisplayHelper

This interface is used to plug in display-specific information for the TextOutputVisitor.


Method Summary
 java.lang.String getDescription(PlanNode node)
          Get the description to use for this plan node, which is usually displayed after the name as a short description.
 java.lang.String getName(PlanNode node)
          Get the name to use for this plan node.
 java.util.List getOrderedProperties(PlanNode node)
          Determine the proper order to display the properties of the node.
 java.lang.String getPropertyName(java.lang.String property)
          Get display name for a particular property name.
 void setMaxDescriptionLength(int length)
          A max description length so that the description can be truncated when necessary.
 

Method Detail

getName

java.lang.String getName(PlanNode node)
Get the name to use for this plan node. An obvious implementation is to use the node's type.

Parameters:
node - The node
Returns:
The name, based on the node's information

getDescription

java.lang.String getDescription(PlanNode node)
Get the description to use for this plan node, which is usually displayed after the name as a short description. The description should pull out the most important information for a particular node type.

Parameters:
node - The node
Returns:
The description

getOrderedProperties

java.util.List getOrderedProperties(PlanNode node)
Determine the proper order to display the properties of the node. The returned List contains the property names as found in the node's properties in the preferred order. If properties are omitted from the list, they will not be displayed. Thus, this method can also filter what properties are shown.

Parameters:
node - The node
Returns:
List of property names

getPropertyName

java.lang.String getPropertyName(java.lang.String property)
Get display name for a particular property name.

Parameters:
property - The property name, as used in the node's properties
Returns:
The desired display name for the property

setMaxDescriptionLength

void setMaxDescriptionLength(int length)
A max description length so that the description can be truncated when necessary.

Parameters:
length - Max string length


Copyright © 2009. All Rights Reserved.