ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.app
Class CCResultsWriter

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.app.CCResultsWriter

public abstract class CCResultsWriter
extends Object

Helper class for formatting results obtained by evaluating the performance in a call center model for multiple scenarios. This class provides the writeResults(File) which iterates over directories, and uncompresses ZIP files in order to get files containing results. For any file of results, an instance of ContactCenterEvalResults is constructed, and the method writeResults(String,ContactCenterEvalResults). One needs to defines this method in a subclass in order to write the relevant information extracted from the object holding results.


Constructor Summary
CCResultsWriter()
          Constructs a new result writer.
CCResultsWriter(boolean reportPropertiesToEvalInfo)
          Constructs a new result writer.
 
Method Summary
 void writeResults(File resultFile)
          Writes results extracted from the file resultFile.
abstract  void writeResults(String resFileName, ContactCenterEvalResults res)
          User-defined method for writing results, for a specific scenario represented by res, and having name resFileName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CCResultsWriter

public CCResultsWriter()
Constructs a new result writer. This is equivalent to CCResultsWriter (false).


CCResultsWriter

public CCResultsWriter(boolean reportPropertiesToEvalInfo)
Constructs a new result writer. If reportPropertiesToEvalInfo is set to true, this copies the report properties into the evaluation information for each file of results being opened. This flag is necessary only for older files of results.

Parameters:
reportPropertiesToEvalInfo - determines if report properties need to be copied to evaluation information.
Method Detail

writeResults

public abstract void writeResults(String resFileName,
                                  ContactCenterEvalResults res)
User-defined method for writing results, for a specific scenario represented by res, and having name resFileName.

Parameters:
resFileName - the result file name.
res - the object holding results.

writeResults

public void writeResults(File resultFile)
Writes results extracted from the file resultFile. If the given file object corresponds to a file with name ending with .xml or .xml.gz, it is opened, and the parsed contents is sent to writeResults(String,ContactCenterEvalResults). A warning is printed if there is an error while reading the file. If resultFile corresponds to a file with the .zip extension, the ZIP file is opened, and scanned for entries whose name ends with .xml. These entries are opened, and parsed. If the given object corresponds to a directory, the method is called recursively for each file in the directory.

Parameters:
resultFile - the object representing the input result file.

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.