gate.util.reporting
Interface BenchmarkReportable

All Known Implementing Classes:
DocTimeReporter, PRTimeReporter

public interface BenchmarkReportable

An interface to be implemented by all classes responsible for generating benchmark reports.


Method Summary
 Object calculate(Object reportContainer)
          Does the report specific calculations.
 void executeReport()
          A single method to execute report (A command line counter part API ).
 void parseArguments(String[] args)
          Parses the command line arguments.
 void printReport(Object reportContainer, File outputFile)
          Prints a report in text or HTML format.
 Object store(File inputFile)
          Organizes the log entries in report specific data structure.
 

Method Detail

store

Object store(File inputFile)
             throws BenchmarkReportException
Organizes the log entries in report specific data structure.

Parameters:
inputFile - An input benchmark file handle.
Returns:
An object containing the log entries organized in a report specific data structure.
Throws:
BenchmarkReportException - if an error occurs while organizing the log entries.

calculate

Object calculate(Object reportContainer)
                 throws BenchmarkReportException
Does the report specific calculations.

Parameters:
reportContainer - An object containing the log entries organized in a report specific data structure.
Returns:
An object containing the log entries organized in a report specific data structure with report totals calculated.
Throws:
BenchmarkReportException - if computation error occurs.

printReport

void printReport(Object reportContainer,
                 File outputFile)
                 throws BenchmarkReportException
Prints a report in text or HTML format.

Parameters:
reportContainer - An object containing the log entries organized in a report specific data structure.
outputFile - An output report file handle.
Throws:
BenchmarkReportException - if report couldn't be printed to given media (text/HTML).

parseArguments

void parseArguments(String[] args)
                    throws BenchmarkReportException
Parses the command line arguments.

Parameters:
args - A string array containing command line parameters.
Throws:
BenchmarkReportException - if an invalid argument is provided.

executeReport

void executeReport()
                   throws BenchmarkReportException,
                          BenchmarkReportExecutionException
A single method to execute report (A command line counter part API ). Call this method after setting the report parameters.

Throws:
BenchmarkReportException - if an error occurs while generating the report.
BenchmarkReportExecutionException - if the given input file is modified while generating the report.