LiveGraph
data visualisation and analysis framework

org.LiveGraph.dataFile.read
Interface DataStreamObserver

All Known Implementing Classes:
DataStreamObserverAdapter, DataStreamToCacheReader

public interface DataStreamObserver

Defines an observer that is notified about parsing events of a data stream. Objects implementing this interface can be registered with a DataStreamReader which will then notify these objects whenever new information has been read from the underlying data stream.

LiveGraph (http://www.live-graph.org).

Copyright (c) 2007 by G. Paperin.

File: DataStreamObserver.java

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following terms and conditions are met:

1. Redistributions of source code must retain the above acknowledgement of the LiveGraph project and its web-site, the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above acknowledgement of the LiveGraph project and its web-site, the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software or any derived software must display the following acknowledgement:
This product includes software developed by the LiveGraph project and its contributors.
(http://www.live-graph.org)

4. All advertising materials distributed in form of HTML pages or any other technology permitting active hyper-links that mention features or use of this software or any derived software must display the acknowledgment specified in condition 3 of this agreement, and in addition, include a visible and working hyper-link to the LiveGraph homepage (http://www.live-graph.org).

THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version:
"1.1.1"
Author:
Greg Paperin (http://www.paperin.org)

Method Summary
 void eventCommentLine(java.lang.String comment, DataStreamReader reader)
          Is called when a comment line has been encontered by the data reader.
 void eventDataLineRead(java.util.List<java.lang.String> dataTokens, int datasetIndex, DataStreamReader reader)
          Is called each time a data line (data set) has been parsed by the data reader.
 void eventFileInfoLine(java.lang.String info, DataStreamReader reader)
          Is called when a file info/description comment line has been parsed by the data reader.
 void eventLabelsSet(java.util.List<java.lang.String> labels, DataStreamReader reader)
          Is called when data series labels have been parsed by the data reader.
 void eventSeparatorSet(java.lang.String separator, DataStreamReader reader)
          Is called when a data values separator has been parsed by the data reader.
 

Method Detail

eventSeparatorSet

void eventSeparatorSet(java.lang.String separator,
                       DataStreamReader reader)
Is called when a data values separator has been parsed by the data reader.

Parameters:
separator - The new data values separator string.
reader - The reader which produced this event.

eventCommentLine

void eventCommentLine(java.lang.String comment,
                      DataStreamReader reader)
Is called when a comment line has been encontered by the data reader.

Parameters:
comment - The comment line.
reader - The reader which produced this event.

eventFileInfoLine

void eventFileInfoLine(java.lang.String info,
                       DataStreamReader reader)
Is called when a file info/description comment line has been parsed by the data reader.

Parameters:
info - File description/info string.
reader - The reader which produced this event.

eventLabelsSet

void eventLabelsSet(java.util.List<java.lang.String> labels,
                    DataStreamReader reader)
Is called when data series labels have been parsed by the data reader.

Parameters:
labels - An unmodifiable list containing all parsed data series labels.
reader - The reader which produced this event.

eventDataLineRead

void eventDataLineRead(java.util.List<java.lang.String> dataTokens,
                       int datasetIndex,
                       DataStreamReader reader)
Is called each time a data line (data set) has been parsed by the data reader.

Parameters:
dataTokens - An unmodifiable list containing all data tokens parsed from this line.
datasetIndex - The number of this data line in the stream (i.e. dataset file index).
reader - The reader which produced this event.

LiveGraph
data visualisation and analysis framework