public class ReportConverter extends Object
Constructor and Description |
---|
ReportConverter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
convertReport(File in,
File out,
String encoding)
Parses a report from the old version of the XML report format, and writes a file in the new XML report format.
|
void |
convertReport(String inName,
String outFile,
String encoding)
Parses a report from the old version of the XML report format, and writes a file in the new XML report format.
|
void |
convertReport(URL in,
URL contentBase,
Writer w,
String encoding)
Parses a report from the old version of the XML report format, and writes a file in the new XML report format.
|
URL |
findReport(String name)
Returns the URL of a report.
|
static void |
main(String[] args)
The starting point for the conversion utility.
|
void |
write(MasterReport report,
Writer w,
URL contentBase,
String encoding)
Writes a report in the new XML format.
|
public void write(MasterReport report, Writer w, URL contentBase, String encoding) throws IOException, ReportWriterException
report
- the report.w
- a character stream writer.contentBase
- the content base for creating relative URLs.encoding
- the encoding of the generated file.IOException
- if there is an I/O problem.ReportWriterException
- if there were problems while serializing the report definition.public URL findReport(String name) throws IOException
name
- the report name.null
).IOException
- if there is an I/O problem.public void convertReport(String inName, String outFile, String encoding) throws IOException, ReportWriterException
inName
- the input report file.outFile
- the output report file.encoding
- the encoding of the generated file.IOException
- if there is an I/O problem.ReportWriterException
- if there is a problem writing the report.public void convertReport(File in, File out, String encoding) throws IOException, ReportWriterException
in
- the input report file.out
- the output report file.encoding
- the encoding of the generated file.IOException
- if there is an I/O problem.ReportWriterException
- if there is a problem writing the report.public void convertReport(URL in, URL contentBase, Writer w, String encoding) throws IOException, ReportWriterException
in
- the input resource from where to read the reportcontentBase
- the contentbase where the new report will be stored.w
- the report writerencoding
- the encoding of the generated file.IOException
- if there is an I/O problem.ReportWriterException
- if there is a problem writing the report.public static void main(String[] args) throws IOException, ReportWriterException
args
- command line arguments.Exception
- if there is any problem.IOException
ReportWriterException