de.dfg.oc.logfileanalyzer
Class DefaultDataImporter

java.lang.Object
  extended by de.dfg.oc.logfileanalyzer.DefaultDataImporter
All Implemented Interfaces:
DataImporterInterface

 class DefaultDataImporter
extends Object
implements DataImporterInterface

The DefaultDataImporter is an example class that implements the DataImporterInterface. It is used to read the example.log provided with the LogFileAnalyzer.

Author:
Clemens Gersbacher, Holger Prothmann

Field Summary
(package private)  String currentLine
           
 
Constructor Summary
DefaultDataImporter()
           
 
Method Summary
 DataElement getNextDataElement(BufferedReader _bR)
          Returns a DataElement-object containing the classifier sets of the next unprocessed iteration.
private  String[] splitClassifier(String _classifier)
          Splits a classifier in its condition, action, prediction, etc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentLine

String currentLine
Constructor Detail

DefaultDataImporter

DefaultDataImporter()
Method Detail

getNextDataElement

public DataElement getNextDataElement(BufferedReader _bR)
Description copied from interface: DataImporterInterface
Returns a DataElement-object containing the classifier sets of the next unprocessed iteration. Use the BufferedReader given as parameter to read the classifier sets are read from the log-file. If the last iteration was reached, the method returns null. IMPORTANT: Create exactly one DataElement per iteration. DataElements should be created in an ascending order with respect to their iteration number.

Specified by:
getNextDataElement in interface DataImporterInterface
Parameters:
_bR - BufferedReader for reading the log-file
Returns:
the next unprocessed DataElement containing the iteration number and all classifier sets of the respective iteration or null if all iterations have been processed

splitClassifier

private String[] splitClassifier(String _classifier)
Splits a classifier in its condition, action, prediction, etc.

Parameters:
_classifier - _classifier read from the log-file (e.g. 0##10001#00-0 10.0 0.0 0.01 1 0 1.0 0)
Returns:
a classifier separated in condition, action, etc.