org.eclipse.birt.chart.internal.datafeed
Class GroupingLookupHelper

java.lang.Object
  extended byorg.eclipse.birt.chart.internal.datafeed.GroupingLookupHelper

public class GroupingLookupHelper
extends java.lang.Object

Helper to lookup the index of each data definition in the evaluator data.


Constructor Summary
GroupingLookupHelper(Chart cm, IActionEvaluator iae, com.ibm.icu.util.ULocale locale)
          Constructor.
GroupingLookupHelper(java.util.Collection dataExps, java.util.Collection aggExps)
          Constructor.
 
Method Summary
 int[] findBatchIndex(java.lang.String[] dataExpArray, java.lang.String aggExp)
          Finds the index according to the combination of data expression and aggregation expression in a batch.
 int findIndex(java.lang.String dataExp, java.lang.String aggExp)
          Finds the index of orthogonal series according to the combination of data expression and aggregation expression.
 int findIndexOfBaseSeries(java.lang.String dataExp)
          Finds the index of base series according to the data expression .
 java.util.List getExpressions()
          Gets the list for all data expressions.
 java.lang.String getOrthogonalAggregationExpression(SeriesDefinition orthoSD)
          Gets aggregation expressions of orthogonal series definition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupingLookupHelper

public GroupingLookupHelper(Chart cm,
                            IActionEvaluator iae,
                            com.ibm.icu.util.ULocale locale)
                     throws ChartException
Constructor. Finds all data expressions and aggregation expressions in the chart model in the order and restore them in the lookup list

Parameters:
cm - chart model
iae - IActionEvaluator to get the expressions in triggers
locale -
Throws:
ChartException

GroupingLookupHelper

public GroupingLookupHelper(java.util.Collection dataExps,
                            java.util.Collection aggExps)
Constructor. Restore all expressions in the lookup list.

Parameters:
dataExps - data expressions collection
aggExps - aggregation expressions collection
Method Detail

getExpressions

public java.util.List getExpressions()
Gets the list for all data expressions. Only for lookup, and can't be changed directly.

Returns:
the list for all data expressions

findIndexOfBaseSeries

public int findIndexOfBaseSeries(java.lang.String dataExp)
Finds the index of base series according to the data expression .

Parameters:
dataExp - the data expression to lookup
Returns:
the index of the data expression in the evaluator data

findIndex

public int findIndex(java.lang.String dataExp,
                     java.lang.String aggExp)
Finds the index of orthogonal series according to the combination of data expression and aggregation expression.

Parameters:
dataExp - data expression
aggExp - aggregation expression. If it's null, will use aggregation expression of base series instead
Returns:
the index in the evaluator data

findBatchIndex

public int[] findBatchIndex(java.lang.String[] dataExpArray,
                            java.lang.String aggExp)
Finds the index according to the combination of data expression and aggregation expression in a batch. Note that all data expressions must match the same aggregation expression.

Parameters:
dataExpArray - data expression array
aggExp - aggregation expression
Returns:
the index array in the evaluator data

getOrthogonalAggregationExpression

public java.lang.String getOrthogonalAggregationExpression(SeriesDefinition orthoSD)
Gets aggregation expressions of orthogonal series definition. If base series doesn't enable grouping, return null. If its own grouping is null, return the one of base grouping, otherwise, return its own.

Parameters:
orthoSD - orthogonal series definition
Returns:
If base series doesn't enable grouping, return null. If its own grouping is null, return the one of base grouping, otherwise, return its own.


Copyright © 2005-2007 Actuate Corp. All rights reserved.