TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.tptp.platform.analysis.core.reporting
Class AbstractAnalysisHTMLExporter

java.lang.Object
  extended by org.eclipse.tptp.platform.analysis.core.reporting.AbstractAnalysisHTMLExporter
All Implemented Interfaces:
IAnalysisExporter

public abstract class AbstractAnalysisHTMLExporter
extends java.lang.Object
implements IAnalysisExporter

This class provides functionality that is common for all HTML data exporters. All HTML exporter classes should extend this abstract class and override any methods required to support custom exporting.


Constructor Summary
AbstractAnalysisHTMLExporter()
           
 
Method Summary
abstract  java.lang.String export(org.eclipse.core.runtime.IProgressMonitor monitor, AnalysisHistory history, AbstractAnalysisProvider provider)
          Generate an export document based on the data contained in a given history.
 java.lang.String getDescription()
           
 java.lang.String getExportFile()
           
 java.lang.String getExportFolder()
           
 java.lang.String getFileType()
           
 java.lang.String getId()
           
 java.lang.String getLabel()
           
 void setDescription(java.lang.String newDescription)
          Set the description for this data exporter.
 void setExportFile(java.lang.String file)
          Set the name of the file where the exported data will be written.
 void setExportFolder(java.lang.String folder)
          Set the base folder where the exported data will be written.
 void setId(java.lang.String newId)
          Set the id for this data exporter.
 void setLabel(java.lang.String newLabel)
          Set the label for this data exporter.
 java.lang.String writeImage(AbstractAnalysisRule rule)
          Write an icon image associated with an analysis rule into the destination icons folder for the exported data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAnalysisHTMLExporter

public AbstractAnalysisHTMLExporter()
Method Detail

export

public abstract java.lang.String export(org.eclipse.core.runtime.IProgressMonitor monitor,
                                        AnalysisHistory history,
                                        AbstractAnalysisProvider provider)
Description copied from interface: IAnalysisExporter
Generate an export document based on the data contained in a given history. This document can take almost any format, for example XML or CSV.

Specified by:
export in interface IAnalysisExporter
Parameters:
monitor - A progress monitor to report status
history - The history to reference for XML data generation
provider - The analysis provider whose data is being exported
Returns:
A complete document containing exported data

setLabel

public final void setLabel(java.lang.String newLabel)
Description copied from interface: IAnalysisExporter
Set the label for this data exporter. This can be called only once - subsequent calls will be ignored

Specified by:
setLabel in interface IAnalysisExporter
Parameters:
newLabel - The new label for this exporter

getLabel

public final java.lang.String getLabel()
Specified by:
getLabel in interface IAnalysisExporter
Returns:
The label for this data exporter

setId

public final void setId(java.lang.String newId)
Description copied from interface: IAnalysisExporter
Set the id for this data exporter. This can be called only once - subsequent calls will be ignored

Specified by:
setId in interface IAnalysisExporter
Parameters:
newId - The unique identifier for this exporter

getId

public final java.lang.String getId()
Specified by:
getId in interface IAnalysisExporter
Returns:
The unique identifier for this data exporter

setDescription

public final void setDescription(java.lang.String newDescription)
Description copied from interface: IAnalysisExporter
Set the description for this data exporter. This can be called only once - subsequent calls will be ignored

Specified by:
setDescription in interface IAnalysisExporter
Parameters:
newDescription - The new label for this exporter

getDescription

public final java.lang.String getDescription()
Specified by:
getDescription in interface IAnalysisExporter
Returns:
The description for this data exporter

setExportFolder

public final void setExportFolder(java.lang.String folder)
Description copied from interface: IAnalysisExporter
Set the base folder where the exported data will be written. Note however that not all data exporters will need or desire folder information so it is possible the implementation of this method will be empty.

Specified by:
setExportFolder in interface IAnalysisExporter
Parameters:
folder - The base export folder

setExportFile

public final void setExportFile(java.lang.String file)
Description copied from interface: IAnalysisExporter
Set the name of the file where the exported data will be written. Note however that not all data exporters will need or desire file information so it is possible the implementation of this method will be empty.

Specified by:
setExportFile in interface IAnalysisExporter
Parameters:
file - The name of the export file

getExportFile

public final java.lang.String getExportFile()
Returns:
The destination file name for the data export

getExportFolder

public final java.lang.String getExportFolder()
Returns:
The desintation folder path where the data will be exported

writeImage

public final java.lang.String writeImage(AbstractAnalysisRule rule)
Write an icon image associated with an analysis rule into the destination icons folder for the exported data. This allows the HTML report to reference these images for display purposes.

Parameters:
rule - The rule for which the image will be exported
Returns:
A file path to the destination image relative to the base desintation folder for the exported report

getFileType

public final java.lang.String getFileType()
Specified by:
getFileType in interface IAnalysisExporter
Returns:
The file type for this data exporter. This will always return "html".

TPTP 4.5.0 Platform Project
Public API Specification