public class ReportWriter extends ReportWriterContext
Constructor and Description |
---|
ReportWriter(MasterReport reportDefinition,
String encoding) |
ReportWriter(MasterReport report,
String encoding,
Configuration config)
Creates a new report writer for a report.
|
Modifier and Type | Method and Description |
---|---|
void |
addClassFactoryFactory(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.
|
static Configuration |
createDefaultConfiguration(MasterReport report)
Builds a default configuration from a given report definition object.
|
ClassFactoryCollector |
getClassFactoryCollector()
Returns the class factory collector.
|
Configuration |
getConfiguration()
Returns the configuration used to write the report.
|
DataSourceCollector |
getDataSourceCollector()
Returns the data-source collector.
|
ElementFactoryCollector |
getElementFactoryCollector()
Returns the element factory collector.
|
String |
getEncoding()
Returns the encoding.
|
StyleKeyFactoryCollector |
getStyleKeyFactoryCollector()
Returns the style-key factory collector.
|
TemplateCollector |
getTemplateCollector()
Returns the template collector.
|
void |
write(Writer w)
Writes a report to a character stream writer.
|
getReport, hasParent
public ReportWriter(MasterReport reportDefinition, String encoding)
public ReportWriter(MasterReport report, String encoding, Configuration config)
report
- the report.encoding
- the encoding.config
- the write configuration.public static Configuration createDefaultConfiguration(MasterReport report)
report
- the report for which to create the writer configuration.public String getEncoding()
public void addDataSourceFactory(DataSourceFactory dsf)
dsf
- the data-source factory.public DataSourceCollector getDataSourceCollector()
getDataSourceCollector
in class ReportWriterContext
public void addElementFactory(ElementFactory ef)
ef
- the element factory.public ElementFactoryCollector getElementFactoryCollector()
getElementFactoryCollector
in class ReportWriterContext
public void addClassFactoryFactory(ClassFactory cf)
cf
- the class factory.public ClassFactoryCollector getClassFactoryCollector()
getClassFactoryCollector
in class ReportWriterContext
public void addStyleKeyFactory(StyleKeyFactory skf)
skf
- the style-key factory.public StyleKeyFactoryCollector getStyleKeyFactoryCollector()
getStyleKeyFactoryCollector
in class ReportWriterContext
public void addTemplateCollection(TemplateCollection collection)
collection
- the template collection.public TemplateCollector getTemplateCollector()
getTemplateCollector
in class ReportWriterContext
public void write(Writer w) throws IOException, ReportWriterException
w
- the character stream writer.IOException
- if there is an I/O problem.ReportWriterException
- if there is a problem writing the report.public Configuration getConfiguration()
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.