/**
   * The starting point for the application.
   *
   * @param args ignored.
   */
  public static void main(final String[] args) {
    ClassicEngineBoot.getInstance().start();
    final ReportGenerator gen = ReportGenerator.getInstance();
    final URL reportURL =
        ObjectUtilities.getResourceRelative(REFERENCE_REPORT, StyleKeyReferenceGenerator.class);
    if (reportURL == null) {
      System.err.println("The report was not found in the classpath"); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      System.exit(1);
      return;
    }

    final MasterReport report;
    try {
      report = gen.parseReport(reportURL);
    } catch (Exception e) {
      System.err.println("The report could not be parsed."); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      e.printStackTrace(System.err);
      System.exit(1);
      return;
    }
    report.setDataFactory(new TableDataFactory("default", createData())); // $NON-NLS-1$
    try {
      HtmlReportUtil.createStreamHTML(
          report,
          System.getProperty("user.home") // $NON-NLS-1$
              + "/stylekey-reference.html"); //$NON-NLS-1$
      PdfReportUtil.createPDF(
          report,
          System.getProperty("user.home") // $NON-NLS-1$
              + "/stylekey-reference.pdf"); //$NON-NLS-1$
    } catch (Exception e) {
      System.err.println("The report processing failed."); // $NON-NLS-1$
      System.err.println("File: " + REFERENCE_REPORT); // $NON-NLS-1$
      e.printStackTrace(System.err);
      System.exit(1);
    }
  }
 /**
  * Returns the URL of the XML definition for this report.
  *
  * @return the URL of the report definition.
  */
 public URL getReportDefinitionSource() {
   return ObjectUtilities.getResourceRelative("bookstore.xml", BookstoreDemo.class);
 }
 /**
  * Returns the URL of the HTML document describing this demo.
  *
  * @return the demo description.
  */
 public URL getDemoDescriptionSource() {
   return ObjectUtilities.getResourceRelative("bookstore.html", BookstoreDemo.class);
 }
 /**
  * Returns the URL of the XML definition for this report.
  *
  * @return the URL of the report definition.
  */
 public URL getReportDefinitionSource() {
   return ObjectUtilities.getResourceRelative("sbarcodes-simple.xml", SimpleBarcodesXMLDemo.class);
 }
 /**
  * Returns the URL of the HTML document describing this demo.
  *
  * @return the demo description.
  */
 public URL getDemoDescriptionSource() {
   return ObjectUtilities.getResourceRelative(
       "sbarcodes-simple.html", SimpleBarcodesXMLDemo.class);
 }