Class ReportGenerator
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.modules.parser.base.ReportGenerator
-
public class ReportGenerator extends Object
Deprecated.Use LibLoader directly.The reportgenerator initializes the parser and provides an interface the the default parser. To create a report from an URL, useReportGenerator.getInstance().parseReport (URL myURl, URL contentBase);
- Author:
- Thomas Morgner
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
PARSER_VALIDATE_DEFAULT
Deprecated.disable DTD validation by default.static String
PARSER_VALIDATE_KEY
Deprecated.Enable DTD validation of the parsed XML.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReportGenerator()
Deprecated.Creates a new report generator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ReportGenerator
createInstance()
Deprecated.Returns a private (non-shared) instance of theReportGenerator
.static ReportGenerator
getInstance()
Deprecated.Returns a single shared instance of theReportGenerator
.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(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.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(InputSource input, URL contentBase)
Deprecated.Parses the report from a given SAX-InputSource.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.
-
-
-
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 URLfile
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 URLcontentBase
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 filefile
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 theReportGenerator
. 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 theReportGenerator
. 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.
-
-