www.sdmetrics.com

sdmetrics.app
Class DataExporter

java.lang.Object
  |
  +--sdmetrics.app.DataExporter

public class DataExporter
extends java.lang.Object

Class that implements the data export feature. Writes metric data, descriptive statistics, relation matrices, design rule violations, etc as tables, in the various formats (text, HTML, ODS, XML).


Constructor Summary
DataExporter(SDMessageHandler smh, sdmetrics.util.AppParameters params)
          Construct a data exporter that will overwrite existing files without prompting the user.
DataExporter(SDMessageHandler smh, sdmetrics.util.AppParameters params, OverwriteConfirmation confirmer)
          Construct a data exporter that will prompt the user before overwriting existing files.
 
Method Summary
 boolean export(DataTable mdt, java.lang.String what, java.lang.String file, boolean oneFile, boolean sanitize, ExportFormatter mff)
          Export data tables to external file(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataExporter

public DataExporter(SDMessageHandler smh,
                    sdmetrics.util.AppParameters params)
Construct a data exporter that will overwrite existing files without prompting the user.

Parameters:
smh - Object to handle error messages.
params - Application parameters with output file encoding etc.

DataExporter

public DataExporter(SDMessageHandler smh,
                    sdmetrics.util.AppParameters params,
                    OverwriteConfirmation confirmer)
Construct a data exporter that will prompt the user before overwriting existing files.

Parameters:
smh - Object to handle error messages.
params - Application parameters with output file encoding etc.
confirmer - Object to prompt the user
Method Detail

export

public boolean export(DataTable mdt,
                      java.lang.String what,
                      java.lang.String file,
                      boolean oneFile,
                      boolean sanitize,
                      ExportFormatter mff)
Export data tables to external file(s).

Parameters:
mdt - The object holding the data to export.
what - Description of the data to be written, used for diagnostic output.
file - Path name of the file to write to. For output of tables to separate files, one file is created for each table, the file name is extend by a "_tablename".
sanitize - true if output of design element names is to be suppressed.
oneFile - Flag if output is to be written in one file (true). or separate files (false).
mff - The format of the output file.
Returns:
true if export was successful, false if an error occured or user cancelled the export

www.sdmetrics.com