ru.onego.industrial.catalog.reports
Class AbstractReport

java.lang.Object
  extended by java.util.Observable
      extended by ru.onego.industrial.catalog.reports.AbstractReport
All Implemented Interfaces:
Report
Direct Known Subclasses:
CSVReport, ExcelReport, TextReport

public abstract class AbstractReport
extends java.util.Observable
implements Report

Abstract root for all reporting engings used in JCatalog.

Version:
1.0
Author:
Lev Levin

Constructor Summary
AbstractReport()
           
 
Method Summary
abstract  void createReport(java.lang.String filename)
          Creates new report and stores it to specified file.
protected  Catalog getCatalog()
          Returns catalog to be shown.
abstract  java.lang.String getName()
          Returns report name.
abstract  java.lang.String getStdFileExt()
          Return extension of the report file.
 void setCatalog(Catalog catalog)
          Sets catalog to be shown with help of this report.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractReport

public AbstractReport()
Method Detail

setCatalog

public void setCatalog(Catalog catalog)
Sets catalog to be shown with help of this report.

Specified by:
setCatalog in interface Report
Parameters:
catalog - Catalog object to be shown

createReport

public abstract void createReport(java.lang.String filename)
                           throws ru.onego.industrial.catalog.reports.ReportException
Creates new report and stores it to specified file.

Specified by:
createReport in interface Report
Parameters:
filename - filename of the output report file
Throws:
ReportException

getCatalog

protected Catalog getCatalog()
Returns catalog to be shown.

Returns:
Catalog object

getName

public abstract java.lang.String getName()
Returns report name. This name is shown in the Info panel of the interface dialog.

Specified by:
getName in interface Report
Returns:
Report name

getStdFileExt

public abstract java.lang.String getStdFileExt()
Return extension of the report file.

Specified by:
getStdFileExt in interface Report
Returns:
String representing extension