Package repast.simphony.data2
Interface DataSink
- All Known Implementing Classes:
AbstractXYSeriesDataSink
,BatchParamMapFileWriter
,ConsoleDataSink
,DataServer
,FileDataSink
,HistogramDataSink
,XYDataSinkSourceSeries
,XYDataSinkValueSeries
public interface DataSink
Interface for classes that can retrieve data from a DataSet. DataSink
supports grouping appended data into "rows" via the rowStarted() and
rowEnded() methods.
- Author:
- Nick Collier
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends the specified data to this sink.void
close()
Close this DataSink.void
flush()
Flushes any data buffered by this DataSink.void
Open this DataSink.void
Notified this DataSink that the current record has ended.void
rowEnded()
Notifies this DataSink that the last append was end of a "row."void
Notifies this DataSink that the next append is that start of a "row." of data.
-
Method Details
-
open
Open this DataSink.- Parameters:
sourceIds
- a list of the DataSource ids for which this is the sink.- Throws:
DataException
- if there is an error opening the sink.
-
rowStarted
void rowStarted()Notifies this DataSink that the next append is that start of a "row." of data. -
append
Appends the specified data to this sink. The key can be, for example, a column name and the value the current value for that column.- Parameters:
key
- the data's keyvalue
- the data's value
-
rowEnded
void rowEnded()Notifies this DataSink that the last append was end of a "row." -
recordEnded
void recordEnded()Notified this DataSink that the current record has ended. -
flush
void flush()Flushes any data buffered by this DataSink. -
close
void close()Close this DataSink.
-