public abstract class BaseEvaluationLog<T extends BaseEvaluationLog> extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected List<File> |
children |
protected Map<String,String> |
config |
protected int |
failed |
protected BufferedWriter |
log |
protected File |
logPath |
protected int |
missing |
protected Date |
startDate |
protected int |
sucessful |
Constructor and Description |
---|
BaseEvaluationLog() |
BaseEvaluationLog(File logPath) |
BaseEvaluationLog(Map<String,String> config,
File logPath) |
BaseEvaluationLog(Map<String,String> config,
File logPath,
Date date) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected static String |
formatDate(Date d) |
abstract List<T> |
getChildEvaluations() |
List<File> |
getChildFiles() |
Map<String,String> |
getConfig() |
int |
getFailed() |
File |
getLogPath() |
int |
getMissing() |
int |
getSuccessful() |
Map<String,String> |
getSummaryAsMap()
Return a textual summary of the evaluation as a map.
|
int |
getTotal() |
void |
merge(T eval)
Merges the accumulated values in eval into
|
protected static Date |
parseDate(String s) |
void |
setConfig(String field,
String value) |
void |
summarize()
Writes a summary of the results to stdout.
|
void |
summarize(BufferedWriter writer)
Writes a summary of the results to the writer.
|
void |
summarize(File path)
Writes a summary of the results to the file.
|
void |
summarize(PrintStream printStream)
Writes a summary of the results to a printstream (probably System.out or System.in).
|
protected void |
write(String line)
Writes a line, adds a newline, and flushes the log
|
protected final BufferedWriter log
protected File logPath
protected int sucessful
protected int missing
protected int failed
protected Date startDate
public BaseEvaluationLog() throws IOException
IOException
public BaseEvaluationLog(File logPath) throws IOException
IOException
public BaseEvaluationLog(Map<String,String> config, File logPath) throws IOException
IOException
public BaseEvaluationLog(Map<String,String> config, File logPath, Date date) throws IOException
IOException
protected static Date parseDate(String s) throws ParseException
ParseException
public int getMissing()
public int getFailed()
public int getSuccessful()
public int getTotal()
protected void write(String line) throws IOException
line
- IOException
public Map<String,String> getSummaryAsMap()
public void merge(T eval) throws IOException
eval
- IOException
public void summarize(File path) throws IOException
IOException
public void summarize() throws IOException
IOException
public void summarize(PrintStream printStream) throws IOException
IOException
public void summarize(BufferedWriter writer) throws IOException
writer
- IOException
public abstract List<T> getChildEvaluations() throws IOException, ParseException
IOException
ParseException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public File getLogPath()
Copyright © 2014. All rights reserved.