com.jrefinery.report.io.ext.writer
Class ReportWriter

java.lang.Object
  extended bycom.jrefinery.report.io.ext.writer.ReportWriter

public class ReportWriter
extends java.lang.Object

A report writer.

Author:
Thomas Morgner

Constructor Summary
ReportWriter(JFreeReport report, java.lang.String encoding)
          Creates a new report writer for a report.
 
Method Summary
 void addClassFactoryFactory(org.jfree.xml.factory.objects.ClassFactory cf)
          Adds a class factory.
 void addDataSourceFactory(DataSourceFactory dsf)
          Adds a data-source factory.
 void addElementFactory(ElementFactory ef)
          Adds an element factory.
 void addStyleKeyFactory(StyleKeyFactory skf)
          Adds a style-key factory.
 void addTemplateCollection(TemplateCollection collection)
          Adds a template collection.
 org.jfree.xml.factory.objects.ClassFactoryCollector getClassFactoryCollector()
          Returns the class factory collector.
 DataSourceCollector getDataSourceCollector()
          Returns the data-source collector.
 ElementFactoryCollector getElementFactoryCollector()
          Returns the element factory collector.
 java.lang.String getEncoding()
          Returns the encoding.
 JFreeReport getReport()
          Returns the report.
 StyleKeyFactoryCollector getStyleKeyFactoryCollector()
          Returns the style-key factory collector.
 TemplateCollector getTemplateCollector()
          Returns the template collector.
 void write(java.io.Writer w)
          Writes a report to a character stream writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportWriter

public ReportWriter(JFreeReport report,
                    java.lang.String encoding)
Creates a new report writer for a report.

Parameters:
report - the report.
encoding - the encoding.
Method Detail

getEncoding

public java.lang.String getEncoding()
Returns the encoding.

Returns:
The encoding.

addDataSourceFactory

public void addDataSourceFactory(DataSourceFactory dsf)
Adds a data-source factory.

Parameters:
dsf - the data-source factory.

getDataSourceCollector

public DataSourceCollector getDataSourceCollector()
Returns the data-source collector.

Returns:
The data-source collector.

addElementFactory

public void addElementFactory(ElementFactory ef)
Adds an element factory.

Parameters:
ef - the element factory.

getElementFactoryCollector

public ElementFactoryCollector getElementFactoryCollector()
Returns the element factory collector.

Returns:
The element factory collector.

addClassFactoryFactory

public void addClassFactoryFactory(org.jfree.xml.factory.objects.ClassFactory cf)
Adds a class factory.

Parameters:
cf - the class factory.

getClassFactoryCollector

public org.jfree.xml.factory.objects.ClassFactoryCollector getClassFactoryCollector()
Returns the class factory collector.

Returns:
The class factory collector.

addStyleKeyFactory

public void addStyleKeyFactory(StyleKeyFactory skf)
Adds a style-key factory.

Parameters:
skf - the style-key factory.

getStyleKeyFactoryCollector

public StyleKeyFactoryCollector getStyleKeyFactoryCollector()
Returns the style-key factory collector.

Returns:
The style-key factory collector.

addTemplateCollection

public void addTemplateCollection(TemplateCollection collection)
Adds a template collection.

Parameters:
collection - the template collection.

getTemplateCollector

public TemplateCollector getTemplateCollector()
Returns the template collector.

Returns:
The template collector.

getReport

public JFreeReport getReport()
Returns the report.

Returns:
The report.

write

public void write(java.io.Writer w)
           throws java.io.IOException,
                  ReportWriterException
Writes a report to a character stream writer.

Parameters:
w - the character stream writer.
Throws:
java.io.IOException - if there is an I/O problem.
ReportWriterException - if there is a problem writing the report.