net.sf.clichart.data
Interface DataSink

All Known Implementing Classes:
AbstractChartBuilder, TimeSeriesChartBuilder, XYChartBuilder

public interface DataSink

Interface for objects that can received events containing data parsed from some source

Author:
johnd

Method Summary
 void dataParsed(java.lang.Object xValue, java.lang.Object[] yValues, int lineNumber)
          Provides the data from a line of tabular data that has been parsed from some source.
 void headerParsed(java.lang.String[] headers)
          Provides a column header for tabular data that has been parsed from some source
 void parsingFinished()
          Advice that parsing of the source has been completed
 

Method Detail

headerParsed

void headerParsed(java.lang.String[] headers)
                  throws InvalidDataException
Provides a column header for tabular data that has been parsed from some source

Parameters:
headers - String headers for each column of interest (elements may be an empty string, but not null). Note that there should be as many headers as there are yValues in dataParsed()
Throws:
InvalidDataException

dataParsed

void dataParsed(java.lang.Object xValue,
                java.lang.Object[] yValues,
                int lineNumber)
                throws InvalidDataException
Provides the data from a line of tabular data that has been parsed from some source. Values are represented as (hopefully) useful objects, e.g. Long, Integer, Double, Date

Parameters:
xValue - The X axis value for the data (often a date/time).
yValues - An array of size (headers.length - 1)
lineNumber - The 1-based line number for this line in the data source
Throws:
InvalidDataException

parsingFinished

void parsingFinished()
Advice that parsing of the source has been completed