LiveGraph
data visualisation and analysis framework

org.LiveGraph.dataFile.read
Class DataStreamObserverAdapter

java.lang.Object
  extended by org.LiveGraph.dataFile.read.DataStreamObserverAdapter
All Implemented Interfaces:
DataStreamObserver

public class DataStreamObserverAdapter
extends java.lang.Object
implements DataStreamObserver

An convenience adapter that implements the DataStreamObserver-interface and defines all methods as empty. This is handy as a superclass when you want to define a DataStreamObserver that does not use all methods of the interface.

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

Copyright (c) 2007 by G. Paperin.

File: DataStreamObserverAdapter.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)

Constructor Summary
DataStreamObserverAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataStreamObserverAdapter

public DataStreamObserverAdapter()
Method Detail

eventCommentLine

public void eventCommentLine(java.lang.String comment,
                             DataStreamReader reader)
Description copied from interface: DataStreamObserver
Is called when a comment line has been encontered by the data reader.

Specified by:
eventCommentLine in interface DataStreamObserver
Parameters:
comment - The comment line.
reader - The reader which produced this event.

eventDataLineRead

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

Specified by:
eventDataLineRead in interface DataStreamObserver
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.

eventFileInfoLine

public void eventFileInfoLine(java.lang.String info,
                              DataStreamReader reader)
Description copied from interface: DataStreamObserver
Is called when a file info/description comment line has been parsed by the data reader.

Specified by:
eventFileInfoLine in interface DataStreamObserver
Parameters:
info - File description/info string.
reader - The reader which produced this event.

eventLabelsSet

public void eventLabelsSet(java.util.List<java.lang.String> labels,
                           DataStreamReader reader)
Description copied from interface: DataStreamObserver
Is called when data series labels have been parsed by the data reader.

Specified by:
eventLabelsSet in interface DataStreamObserver
Parameters:
labels - An unmodifiable list containing all parsed data series labels.
reader - The reader which produced this event.

eventSeparatorSet

public void eventSeparatorSet(java.lang.String separator,
                              DataStreamReader reader)
Description copied from interface: DataStreamObserver
Is called when a data values separator has been parsed by the data reader.

Specified by:
eventSeparatorSet in interface DataStreamObserver
Parameters:
separator - The new data values separator string.
reader - The reader which produced this event.

LiveGraph
data visualisation and analysis framework