Package org.pentaho.reporting.libraries.repository.zip

Examples of org.pentaho.reporting.libraries.repository.zip.ZipRepository


    this(null);
  }

  public MemoryDocumentBundle(final ResourceKey parent)
  {
    this.zipRepository = new ZipRepository();
    this.metaData = new MemoryDocumentMetaData();

    final ResourceManager defaultResourceManager = new ResourceManager();
    final BundleResourceManagerBackend backend =
        new BundleResourceManagerBackend(zipRepository, defaultResourceManager.getBackend(), parent);
View Full Code Here


    if (outputStream == null)
    {
      throw new NullPointerException();
    }

    final ZipRepository zipRepository = new ZipRepository();
    final StreamRepository targetRepository = new StreamRepository(outputStream);
    final ContentLocation targetRoot = targetRepository.getRoot();

    final HtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor(report.getConfiguration());
    final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
    printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, "index", "html"));
    printer.setDataWriter(zipRepository.getRoot(), new DefaultNameGenerator(targetRoot, "data", "bin"));
    printer.setUrlRewriter(new StaticURLRewriter("http://localhost:12345/content/{0}"));
    outputProcessor.setPrinter(printer);

    final StreamReportProcessor sp = new StreamReportProcessor(report, outputProcessor);
    sp.processReport();
View Full Code Here

      throws ReportProcessingException, IOException, ContentIOException
  {
    ReportStructureValidator validator = new ReportStructureValidator();
    Assert.assertTrue(validator.isValidForFastProcessing(report));

    final ZipRepository zipRepository = new ZipRepository();
    final StreamRepository targetRepository = new StreamRepository(out);
    final ContentLocation targetRoot = targetRepository.getRoot();
    final FastHtmlContentItems contentItems = new FastHtmlContentItems();
    contentItems.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, "index", "html"));
    contentItems.setDataWriter(zipRepository.getRoot(), new DefaultNameGenerator(targetRoot, "data", "bin"));
    contentItems.setUrlRewriter(new StaticURLRewriter("http://localhost:12345/content/{0}"));

    final FastHtmlExportProcessor reportProcessor = new FastHtmlExportProcessor(report, contentItems);
    reportProcessor.processReport();
    reportProcessor.close();
View Full Code Here

      String dataDirectory = getInputStringValue( AbstractJFreeReportComponent.REPORTDIRECTORYHTML_DATADIR );
      if ( dataDirectory == null ) {
        dataDirectory = "data"; //$NON-NLS-1$
      }

      final ZipRepository zipRepository = new ZipRepository();
      final ContentLocation root = zipRepository.getRoot();
      final ContentLocation data =
          RepositoryUtilities.createLocation( zipRepository, RepositoryUtilities.split( dataDirectory, "/" ) ); //$NON-NLS-1$

      final FlowHtmlOutputProcessor outputProcessor = new FlowHtmlOutputProcessor();

      final HtmlPrinter printer = new AllItemsHtmlPrinter( report.getResourceManager() );
      printer.setContentWriter( root, new DefaultNameGenerator( root, "report.html" ) ); //$NON-NLS-1$
      printer.setDataWriter( data, new DefaultNameGenerator( data, "content" ) ); //$NON-NLS-1$
      printer.setUrlRewriter( new SingleRepositoryURLRewriter() );
      outputProcessor.setPrinter( printer );

      final FlowReportProcessor sp = new FlowReportProcessor( report, outputProcessor );
      final int yieldRate = getYieldRate();
      if ( yieldRate > 0 ) {
        sp.addReportProgressListener( new YieldReportListener( yieldRate ) );
      }
      sp.processReport();
      zipRepository.write( outputStream );
      close();
      return true;
    } catch ( ReportProcessingException e ) {
      error( Messages.getInstance().getString( "JFreeReportZipHtmlComponent.ERROR_0046_FAILED_TO_PROCESS_REPORT" ), e ); //$NON-NLS-1$
      return false;
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.repository.zip.ZipRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.