org.eclipse.birt.chart.datafeed
Class DataSetAdapter

java.lang.Object
  extended by org.eclipse.birt.chart.computation.Methods
      extended by org.eclipse.birt.chart.datafeed.DataSetAdapter
All Implemented Interfaces:
org.eclipse.birt.chart.computation.IConstants, IDataSetProcessor

public class DataSetAdapter
extends org.eclipse.birt.chart.computation.Methods
implements IDataSetProcessor

Provides a no-op implementation of the IDataSetProcessorinterface definition to be subclassed by each extension writer as needed.


Field Summary
 
Fields inherited from interface org.eclipse.birt.chart.computation.IConstants
ABOVE, ANCILLARY_AXIS, ANCILLARY_BASE, AUTO, AVERAGE, AXIS, BACKWARD, BASE, BASE_AXIS, BELOW, BOTTOM, CENTER, COLLECTION, DATE_TIME, DESIGN_TIME, EMPTY_STRING, EQUAL, FORWARD, HORIZONTAL, INSIDE, LABELS, LEFT, LEGEND_ENTRY, LEGEND_GROUP_NAME, LEGEND_MINSLICE_ENTRY, LEGEND_SEPERATOR, LESS, LINE_EXPAND_DOUBLE_SIZE, LINE_EXPAND_SIZE, LINEAR, LOG_10, LOGARITHMIC, MAJOR, MAX, MIN, MINOR, MORE, NON_PRIMITIVE_ARRAY, NULL_STRING, NUMERICAL, ONE_SPACE, ORTHOGONAL, ORTHOGONAL_AXIS, OTHER, OUTSIDE, PERCENT, POSITION_MASK, POSITION_MOVE_ABOVE, POSITION_MOVE_BELOW, POSITION_MOVE_LEFT, POSITION_MOVE_RIGHT, PRIMITIVE_ARRAY, RIGHT, RUN_TIME, SOME_NULL, TEXT, THREE_D, TICK_ABOVE, TICK_ACROSS, TICK_BELOW, TICK_LEFT, TICK_NONE, TICK_RIGHT, TICK_SIDE1, TICK_SIDE2, TICK_SIZE, TOP, TWO_5_D, TWO_D, UNDEFINED, UNDEFINED_STRING, USER_INTERFACE, VALUE, VERTICAL
 
Constructor Summary
DataSetAdapter()
           
 
Method Summary
 DataSet fromString(java.lang.String sDataSetRepresentation, DataSet ds)
          Attempts to parse a line of text representing multiple values of a specific data element type and updates an existing data set or creates a new data set filled with these values.
 java.util.List<Query> getDataDefinitionsForGrouping(Series series)
          Provides a list of data definitions for grouping.
 java.lang.String getExpectedStringFormat()
           
 java.util.Locale getLocale()
          Provides the locale to device renderer implementations as needed to retrieve localized resources for presentation.
 java.lang.Object getMaximum(DataSet ds)
          Causes implementation specific data set processor classes to compute the maximum value in a data set of a specific series type.
 java.lang.Object getMinimum(DataSet ds)
          Causes implementation specific data set processor classes to compute the minimum value in a data set of a specific series type.
 com.ibm.icu.util.ULocale getULocale()
          Provides the locale to device renderer implementations as needed to retrieve localized resources for presentation.
 DataSet populate(java.lang.Object oResultSetDef, DataSet ds)
          Populates a data set with data element values retrieved from a result set created as a result of query execution
 void setLocale(com.ibm.icu.util.ULocale lcl)
          A convenience method provided to associate a locale with a display server
 java.lang.String toString(java.lang.Object[] columnData)
          Attempts to format a column of data to string.
 
Methods inherited from class org.eclipse.birt.chart.computation.Methods
asDateTime, asDouble, asInteger, computeBox, computeBox, computeBox, computeBox, computeFontHeight, computeHeight, computeHeight, computeLabelSize, computePolygon, computePolygon, computePolygon, computeRotatedTopPoint, computeWidth, computeWidth, getLabelPosition, getLocation, getLocation, getNormalizedLocation, getNormalizedLocation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSetAdapter

public DataSetAdapter()
Method Detail

fromString

public DataSet fromString(java.lang.String sDataSetRepresentation,
                          DataSet ds)
                   throws ChartException
Description copied from interface: IDataSetProcessor
Attempts to parse a line of text representing multiple values of a specific data element type and updates an existing data set or creates a new data set filled with these values.

Specified by:
fromString in interface IDataSetProcessor
Parameters:
sDataSetRepresentation - A line of text containing a list of data element values that may be parsed.
ds - An existing data set (or null for a new one) that needs to be filled with data elements created by parsing the line of text as per the expected string format.
Returns:
The existing data set definition passed in as an argument or a new one if the 'ds' argument was null
Throws:
ChartException

populate

public DataSet populate(java.lang.Object oResultSetDef,
                        DataSet ds)
                 throws ChartException
Description copied from interface: IDataSetProcessor
Populates a data set with data element values retrieved from a result set created as a result of query execution

Specified by:
populate in interface IDataSetProcessor
Parameters:
oResultSetDef - An instance of a generic result set that is host application specific. For BIRT, the result set class is ResultSetDataSet
ds - An existing data set (or null for a new one) that needs to be filled with with data elements extracted from the result set definition
Returns:
The existing data set definition passed in as an argument or a new one if the 'ds' argument was null
Throws:
ChartException

getMinimum

public java.lang.Object getMinimum(DataSet ds)
                            throws ChartException
Description copied from interface: IDataSetProcessor
Causes implementation specific data set processor classes to compute the minimum value in a data set of a specific series type.

Specified by:
getMinimum in interface IDataSetProcessor
Parameters:
ds - The data set for which the minimum value needs to be computed
Returns:
The minimum value found in the data set
Throws:
ChartException

getMaximum

public java.lang.Object getMaximum(DataSet ds)
                            throws ChartException
Description copied from interface: IDataSetProcessor
Causes implementation specific data set processor classes to compute the maximum value in a data set of a specific series type.

Specified by:
getMaximum in interface IDataSetProcessor
Parameters:
ds - The data set for which the maximum value needs to be computed
Returns:
The maximum value found in the data set
Throws:
ChartException

getExpectedStringFormat

public java.lang.String getExpectedStringFormat()
Specified by:
getExpectedStringFormat in interface IDataSetProcessor
Returns:
The expected format of a line of text that will be used by the fromString(...) method to parse and create data elements to be populated into a data set

getLocale

public java.util.Locale getLocale()
Description copied from interface: IDataSetProcessor
Provides the locale to device renderer implementations as needed to retrieve localized resources for presentation.

Specified by:
getLocale in interface IDataSetProcessor
Returns:
The locale to be used

getULocale

public com.ibm.icu.util.ULocale getULocale()
Description copied from interface: IDataSetProcessor
Provides the locale to device renderer implementations as needed to retrieve localized resources for presentation.

Specified by:
getULocale in interface IDataSetProcessor
Returns:
The locale to be used

setLocale

public final void setLocale(com.ibm.icu.util.ULocale lcl)
A convenience method provided to associate a locale with a display server

Parameters:
lcl - The locale to be set

toString

public java.lang.String toString(java.lang.Object[] columnData)
                          throws ChartException
Description copied from interface: IDataSetProcessor
Attempts to format a column of data to string. For example, an array Object[Double(1), Double(2)] will be converted into String "1,2"

Specified by:
toString in interface IDataSetProcessor
Parameters:
columnData - array of column data. All elements have same class type.
Throws:
ChartException

getDataDefinitionsForGrouping

public java.util.List<Query> getDataDefinitionsForGrouping(Series series)
Description copied from interface: IDataSetProcessor
Provides a list of data definitions for grouping. The data after evaluating will be aggregated by aggregation expression.

Specified by:
getDataDefinitionsForGrouping in interface IDataSetProcessor
Parameters:
series - series to get data definitions
Returns:
a list of data definitions for grouping


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