rdr.core
Class Log

java.lang.Object
  extended by rdr.core.Log
All Implemented Interfaces:
java.io.Serializable

public class Log
extends java.lang.Object
implements java.io.Serializable

Logging class. Includes support to log the users actions performed on a given domain, for evaluation and analysis.

Author:
Ivan Bindoff
See Also:
Serialized Form

Field Summary
 java.lang.String domainName
           
 common.datastructures.MyFastVector<LogEntry> entries
           
 
Constructor Summary
Log(DomainModel domain)
          Constructor
Log(DomainModel domain, int ignore)
          Constructor that makes a brand new log
 
Method Summary
 void addEntry(LogEntry entry)
          Add an entry into the log
 common.datastructures.MyFastVector<LogEntry> getEntries()
           
 Log loadLog(DomainModel domainModel)
          Loads the log file for domainModel if possible, or creates a new one.
 Log loadLog(DomainModel domainModel, java.lang.String classifierType)
          Loads the log file for domainModel if possible, or creates a new one.
 void saveLog()
          Save the log to file
 void saveLogAs(java.lang.String prefix)
          Save log to file...
 void saveLogCSV()
          Save the log to comma separated file for viewing in excel or similar Warning: Some detail will be lost using this approach.
 void setSaveFrequency(int num)
          Sets the log to save every num entries
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entries

public common.datastructures.MyFastVector<LogEntry> entries

domainName

public java.lang.String domainName
Constructor Detail

Log

public Log(DomainModel domain)
Constructor

Parameters:
domain - the domain model you're opening a log file for

Log

public Log(DomainModel domain,
           int ignore)
Constructor that makes a brand new log

Parameters:
domain - the domain model you're opening a log file for
ignore - just a dodgy way of forcing it to make a new log file.
Method Detail

addEntry

public void addEntry(LogEntry entry)
Add an entry into the log

Parameters:
entry -

loadLog

public Log loadLog(DomainModel domainModel)
Loads the log file for domainModel if possible, or creates a new one.

Parameters:
domainModel -
Returns:
Log

loadLog

public Log loadLog(DomainModel domainModel,
                   java.lang.String classifierType)
Loads the log file for domainModel if possible, or creates a new one. Includes a classifierType parameter to determine exactly which log to load

Parameters:
domainModel -
classifierType -
Returns:
Log

saveLogAs

public void saveLogAs(java.lang.String prefix)
Save log to file... with a prefix.

Parameters:
prefix -

saveLog

public void saveLog()
Save the log to file


saveLogCSV

public void saveLogCSV()
Save the log to comma separated file for viewing in excel or similar Warning: Some detail will be lost using this approach.


setSaveFrequency

public void setSaveFrequency(int num)
Sets the log to save every num entries

Parameters:
num -

getEntries

public common.datastructures.MyFastVector<LogEntry> getEntries()
Returns:
a reference to the vector of entries.