com.raritantechnologies.searchApp.query
Class QueryResultSetChartFormatter

java.lang.Object
  extended bycom.raritantechnologies.searchApp.query.QueryResultSetChartFormatter
All Implemented Interfaces:
IConfigurable, IQueryResultSetFormatter

public class QueryResultSetChartFormatter
extends java.lang.Object
implements IQueryResultSetFormatter

Formats a QueryResultBeanSet as a clickable graphic chart. Contains a IChartRenderer to render the chart and a HyperlinkQueryFormatter to hyperlink the clickable chart areas and chart legends.

XML Configuration Template:
   <QueryResultSetFormatter class="com.raritantechnologies.searchApp.query.QueryResultSetChartFormatter"
                               name="[ chart name ]"
                               title="[ chart title ]"
                               baseURL="[base url for hyperlinks]"
                               columnLabelField="[ query field to use as chart element label ]"
                               minChartSize="[ minimum number of columns to display (0 == no minimum) ]" >

     <HyperlinkQueryFormatter >
       <!-- configuration parameters for HyperlinkQueryFormatter -->
     </HyperlinkQueryFormatter>

     <ChartRenderer class="[ class of com.raritantechnologies.utils.graphics.IChartRenderer ]" >
       <!-- configuration parameters for HyperlinkQueryFormatter -->
     </ChartRenderer>

   </QueryResultSetFormatter>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
QueryResultSetChartFormatter()
           
 
Method Summary
 void appendCounts(boolean append)
           
 java.lang.String formatQuerySet(QueryResultBeanSet qrbs, int sortByConstant)
          Returns a string for the form parameters submitted in queryParams that is in the correct format.
 java.lang.String formatQuerySet(java.lang.String sessionID, QueryResultBeanSet qrbs, int sortByConstant)
           
 java.lang.String formatQuerySetSeries(java.lang.String sessionID, QueryResultBeanSet[] querySets, java.lang.String[] seriesLabels)
          Each query result bean set constitutes a row.
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResultSetChartFormatter

public QueryResultSetChartFormatter()
Method Detail

formatQuerySet

public java.lang.String formatQuerySet(QueryResultBeanSet qrbs,
                                       int sortByConstant)
Description copied from interface: IQueryResultSetFormatter
Returns a string for the form parameters submitted in queryParams that is in the correct format.

Specified by:
formatQuerySet in interface IQueryResultSetFormatter

formatQuerySet

public java.lang.String formatQuerySet(java.lang.String sessionID,
                                       QueryResultBeanSet qrbs,
                                       int sortByConstant)
Specified by:
formatQuerySet in interface IQueryResultSetFormatter

formatQuerySetSeries

public java.lang.String formatQuerySetSeries(java.lang.String sessionID,
                                             QueryResultBeanSet[] querySets,
                                             java.lang.String[] seriesLabels)
Each query result bean set constitutes a row.

Specified by:
formatQuerySetSeries in interface IQueryResultSetFormatter

appendCounts

public void appendCounts(boolean append)
Specified by:
appendCounts in interface IQueryResultSetFormatter

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IQueryResultSetFormatter