org.pentaho.reporting.engine.classic.core.modules.parser.base
Class ReportGenerator

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.parser.base.ReportGenerator

Deprecated. Use LibLoader directly.

public class ReportGenerator
extends Object

The reportgenerator initializes the parser and provides an interface the the default parser.

To create a report from an URL, use ReportGenerator.getInstance().parseReport (URL myURl, URL contentBase);

Author:
Thomas Morgner

Field Summary
static boolean PARSER_VALIDATE_DEFAULT
          Deprecated. disable DTD validation by default.
static String PARSER_VALIDATE_KEY
          Deprecated. Enable DTD validation of the parsed XML.
 
Method Summary
static ReportGenerator createInstance()
          Deprecated. Returns a private (non-shared) instance of the ReportGenerator.
static ReportGenerator getInstance()
          Deprecated. Returns a single shared instance of the ReportGenerator.
 Object getObject(String key)
          Deprecated. Returns the parse context object for the given key.
 boolean isValidateDTD()
          Deprecated. returns true, if the parser should validate the xml files against the DTD supplied with JFreeReport.
 MasterReport parseReport(File file)
          Deprecated. Parses an XML file which is loaded using the given file.
 MasterReport parseReport(InputSource input, URL contentBase)
          Deprecated. Parses the report from a given SAX-InputSource.
 MasterReport parseReport(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager, org.pentaho.reporting.libraries.resourceloader.ResourceKey input, org.pentaho.reporting.libraries.resourceloader.ResourceKey contextKey)
          Deprecated. Parses the report using the provided resource manager.
 MasterReport parseReport(String file)
          Deprecated. Parses a report using the given parameter as filename and the directory containing the file as content base.
 MasterReport parseReport(URL file)
          Deprecated. Parses an XML file which is loaded using the given URL.
 MasterReport parseReport(URL file, URL contentBase)
          Deprecated. Parses an XML file which is loaded using the given URL.
 void setObject(String key, Object value)
          Deprecated. Assigns a parse-context object.
 void setValidateDTD(boolean validate)
          Deprecated. Set to false, to globaly disable the xml-validation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSER_VALIDATE_KEY

public static final String PARSER_VALIDATE_KEY
Deprecated. 
Enable DTD validation of the parsed XML.

See Also:
Constant Field Values

PARSER_VALIDATE_DEFAULT

public static final boolean PARSER_VALIDATE_DEFAULT
Deprecated. 
disable DTD validation by default.

See Also:
Constant Field Values
Method Detail

setValidateDTD

public void setValidateDTD(boolean validate)
Deprecated. 
Set to false, to globaly disable the xml-validation.

Parameters:
validate - true, if the parser should validate the xml files.

isValidateDTD

public boolean isValidateDTD()
Deprecated. 
returns true, if the parser should validate the xml files against the DTD supplied with JFreeReport.

Returns:
true, if the parser should validate, false otherwise.

parseReport

public MasterReport parseReport(String file)
                         throws IOException,
                                org.pentaho.reporting.libraries.resourceloader.ResourceException
Deprecated. 
Parses a report using the given parameter as filename and the directory containing the file as content base.

Parameters:
file - the file name.
Returns:
the report.
Throws:
IOException - if an I/O error occurs.
org.pentaho.reporting.libraries.resourceloader.ResourceException

parseReport

public MasterReport parseReport(URL file)
                         throws IOException,
                                org.pentaho.reporting.libraries.resourceloader.ResourceException
Deprecated. 
Parses an XML file which is loaded using the given URL. All needed relative file- and resourcespecification are loaded using the URL file as base.

Parameters:
file - the URL for the report template file.
Returns:
the report.
Throws:
IOException - if an I/O error occurs.
org.pentaho.reporting.libraries.resourceloader.ResourceException

parseReport

public MasterReport parseReport(URL file,
                                URL contentBase)
                         throws org.pentaho.reporting.libraries.resourceloader.ResourceException
Deprecated. 
Parses an XML file which is loaded using the given URL. All needed relative file- and resourcespecification are loaded using the URL contentBase as base.

After the report is generated, the ReportDefinition-source and the contentbase are stored as string in the reportproperties.

Parameters:
file - the URL for the report template file.
contentBase - the URL for the report template content base.
Returns:
the parsed report.
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException

parseReport

public MasterReport parseReport(File file)
                         throws IOException,
                                org.pentaho.reporting.libraries.resourceloader.ResourceException
Deprecated. 
Parses an XML file which is loaded using the given file. All needed relative file- and resourcespecification are loaded using the parent directory of the file file as base.

Parameters:
file - the report template file.
Returns:
the parsed report.
Throws:
IOException - if an I/O error occurs.
org.pentaho.reporting.libraries.resourceloader.ResourceException

parseReport

public MasterReport parseReport(InputSource input,
                                URL contentBase)
                         throws IOException,
                                org.pentaho.reporting.libraries.resourceloader.ResourceException
Deprecated. 
Parses the report from a given SAX-InputSource.

Parameters:
input - the report definition location.
contentBase - the report's context (used to load content that has been referenced with relative URLs).
Returns:
the parsed report.
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException - if parsing or loading failed for some reason.
IOException - if an IO-related error occurs.

parseReport

public MasterReport parseReport(org.pentaho.reporting.libraries.resourceloader.ResourceManager manager,
                                org.pentaho.reporting.libraries.resourceloader.ResourceKey input,
                                org.pentaho.reporting.libraries.resourceloader.ResourceKey contextKey)
                         throws org.pentaho.reporting.libraries.resourceloader.ResourceException
Deprecated. 
Parses the report using the provided resource manager.

Parameters:
manager - the resource manager (can be null).
input - the resource key pointing to the report definition.
contextKey - the report's context (used to load content that has been referenced with relative URLs).
Returns:
the parsed report.
Throws:
org.pentaho.reporting.libraries.resourceloader.ResourceException - if parsing or loading failed for some reason.

getInstance

public static ReportGenerator getInstance()
Deprecated. 
Returns a single shared instance of the ReportGenerator. This instance cannot add helper objects to configure the report parser.

Returns:
The shared report generator.

createInstance

public static ReportGenerator createInstance()
Deprecated. 
Returns a private (non-shared) instance of the ReportGenerator. Use this instance when defining helper objects.

Returns:
The shared report generator.

setObject

public void setObject(String key,
                      Object value)
Deprecated. 
Assigns a parse-context object.

Parameters:
key - the parse-context key used to lookup the object later.
value - the value.

getObject

public Object getObject(String key)
Deprecated. 
Returns the parse context object for the given key.

Parameters:
key - the key.
Returns:
the value or null if there is no such value.