de.dfg.oc.logfileanalyzer
Class LogFileAnalyzer

java.lang.Object
  extended by de.dfg.oc.logfileanalyzer.LogFileAnalyzer

public class LogFileAnalyzer
extends Object

The LogFileAnalyzer is the program's main class. It determines how log-files are imported and how histograms are created. Furthermore, it defines the column names used in the program's tables. A LogFileAnalyzer is a singleton, its instance can be obtained by using the static getInstance()-method of this class. To adapt the program to your needs, use the setDataImporter()-, setHistograms(), and setColumnNames()-methods. To run the program, call its startLogFileAnalyzer()-method.

Author:
Clemens Gersbacher, Holger Prothmann

Field Summary
private  boolean autoChart
          Determines if histograms are automatically created for each table column.
private  boolean autoResize
          Controls the auto-resize behavior of all tables.
private  String[] columnNames
          Column names used in the table header
private  DataImporterInterface dataImporter
          Importer responsible for reading log-files
private  Vector<ChoosableFileFilter> fileOpenFilters
          A list of filters that are applied to mask files in the "Open"-dialog
private  Vector<AbstractHistogram> histograms
          A list of classes that are available for displaying histograms
private static LogFileAnalyzer lfa
          Singleton-Instance of the LogFileAnalyzer
private static double VERSION
          Version number
 
Constructor Summary
private LogFileAnalyzer()
          Constructor.
 
Method Summary
 void addFileFilter(ChoosableFileFilter _filter)
          Adds a new file filter to the list of filters used in the Open-dialog.
 void addHistogram(AbstractHistogram _histogram)
          Adds a new histogram to the list of available histograms.
 boolean getAutoChart()
          Returns true if histograms are automatically created for all table columns.
 boolean getAutoResize()
          Returns the auto-resize behavior of all tables.
 String[] getColumnNames()
          Returns the column names of classifier tables.
 DataImporterInterface getDataImporter()
          Returns the dataImporter used for reading log-files.
 Vector<ChoosableFileFilter> getFileOpenFilters()
          Returns a list of file filters that are used in the "Open"-dialog.
 Vector<AbstractHistogram> getHistograms()
          Returns the histograms that are available for visualization.
static LogFileAnalyzer getInstance()
          Returns the singleton instance of the LogFileAnalyzer.
static double getVERSION()
          Returns the version number.
static void main(String[] args)
          Starts the program.
 void setAutoChart(boolean _autoChart)
          Determines if histograms are automatically created for all table columns.
 void setAutoResize(boolean _autoResize)
          Sets the auto-resize behavior of all tables.
 void setColumnNames(String[] _columnNames)
          Sets the column names for all tables.
 void setDataImporter(DataImporterInterface _dataImporter)
          Sets the dataImporter used for reading log-files.
 void setFileOpenFilters(Vector<ChoosableFileFilter> _fileOpenFilters)
          Sets a list of file filters that will used in the "Open"-dialog.
 void setHistograms(Vector<AbstractHistogram> _histograms)
          Sets the histograms that will be available for visualization.
 void startLogFileAnalyzer()
          Creates a new GUI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lfa

private static LogFileAnalyzer lfa
Singleton-Instance of the LogFileAnalyzer


VERSION

private static final double VERSION
Version number

See Also:
Constant Field Values

columnNames

private String[] columnNames
Column names used in the table header


dataImporter

private DataImporterInterface dataImporter
Importer responsible for reading log-files


histograms

private Vector<AbstractHistogram> histograms
A list of classes that are available for displaying histograms


fileOpenFilters

private Vector<ChoosableFileFilter> fileOpenFilters
A list of filters that are applied to mask files in the "Open"-dialog


autoChart

private boolean autoChart
Determines if histograms are automatically created for each table column.


autoResize

private boolean autoResize
Controls the auto-resize behavior of all tables. If set to true every column gets the size it needs; if set to false the columns are sized to fit the window.

Constructor Detail

LogFileAnalyzer

private LogFileAnalyzer()
Constructor. Sets all class attributes to defaults. Their values can be changed by using the respective set()-methods.

Method Detail

setColumnNames

public void setColumnNames(String[] _columnNames)
Sets the column names for all tables. The column names are also displayed in the "View->Columns"-menu and are used if histograms are automatically created for each column.

Parameters:
_columnNames - a String[] containing column-headers

getColumnNames

public String[] getColumnNames()
Returns the column names of classifier tables.

Returns:
the column names of classifier tables

setDataImporter

public void setDataImporter(DataImporterInterface _dataImporter)
Sets the dataImporter used for reading log-files.

Parameters:
_dataImporter - dataImporter that needs to implement the DataImporterInterface

getDataImporter

public DataImporterInterface getDataImporter()
Returns the dataImporter used for reading log-files.

Returns:
the dataImporter used for reading log-files

setHistograms

public void setHistograms(Vector<AbstractHistogram> _histograms)
Sets the histograms that will be available for visualization.

Parameters:
_histograms - a Vector containing the histograms

getHistograms

public Vector<AbstractHistogram> getHistograms()
Returns the histograms that are available for visualization.

Returns:
the histograms that are available for visualization

setAutoChart

public void setAutoChart(boolean _autoChart)
Determines if histograms are automatically created for all table columns.

Parameters:
_autoChart - true to automatically create histograms

getAutoChart

public boolean getAutoChart()
Returns true if histograms are automatically created for all table columns.

Returns:
true if histograms are automatically created for all table columns

setAutoResize

public void setAutoResize(boolean _autoResize)
Sets the auto-resize behavior of all tables.

Parameters:
_autoResize - if set to true, every column gets the size it needs; if set to false the columns are sized to fit the window

getAutoResize

public boolean getAutoResize()
Returns the auto-resize behavior of all tables.

Returns:
true if every column gets the size it needs; false if the columns are sized to fit the window

setFileOpenFilters

public void setFileOpenFilters(Vector<ChoosableFileFilter> _fileOpenFilters)
Sets a list of file filters that will used in the "Open"-dialog.

Parameters:
_fileOpenFilters - a list of file filters that will used in the "Open"-dialog

getFileOpenFilters

public Vector<ChoosableFileFilter> getFileOpenFilters()
Returns a list of file filters that are used in the "Open"-dialog.

Returns:
a list of file filters that are used in the "Open"-dialog.

startLogFileAnalyzer

public void startLogFileAnalyzer()
Creates a new GUI.


addHistogram

public void addHistogram(AbstractHistogram _histogram)
Adds a new histogram to the list of available histograms.

Parameters:
_histogram - a new histogram that is added to the list of available histograms

addFileFilter

public void addFileFilter(ChoosableFileFilter _filter)
Adds a new file filter to the list of filters used in the Open-dialog.

Parameters:
_filter - file filter that will be added to the list of filters

getInstance

public static LogFileAnalyzer getInstance()
Returns the singleton instance of the LogFileAnalyzer.

Returns:
the singleton instance of the LogFileAnalyzer

getVERSION

public static double getVERSION()
Returns the version number.

Returns:
the version number

main

public static void main(String[] args)
Starts the program.

Parameters:
args - command line arguments are currently not supported