protected ReportProcessor createReportProcessor( OutputStream fout ) throws Exception { ReportStructureValidator validator = new ReportStructureValidator(); if ( validator.isValidForFastProcessing( report ) == false ) { final HtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor( report.getConfiguration() ); final HtmlPrinter printer = new AllItemsHtmlPrinter( report.getResourceManager() ); printer.setContentWriter( targetRoot, new DefaultNameGenerator( targetRoot, filename, suffix ) ); printer.setDataWriter( null, null ); // $NON-NLS-1$ printer.setUrlRewriter( new FileSystemURLRewriter() ); outputProcessor.setPrinter( printer ); return new StreamReportProcessor( report, outputProcessor ); } else { FastHtmlContentItems printer = new FastHtmlContentItems(); printer.setContentWriter( targetRoot, new DefaultNameGenerator( targetRoot, filename, suffix ) ); printer.setDataWriter( null, null ); // $NON-NLS-1$ printer.setUrlRewriter( new FileSystemURLRewriter() ); return new FastHtmlExportProcessor( report, printer ); } } };
protected HtmlOutputProcessor createOutputProcessor() { if ( "pageable".equals( exportMethod ) ) { //$NON-NLS-1$ return new PageableHtmlOutputProcessor( report.getConfiguration() ); } else if ( "flow".equals( exportMethod ) ) { //$NON-NLS-1$ return new FlowHtmlOutputProcessor(); } else { return new StreamHtmlOutputProcessor( report.getConfiguration() ); } } }
protected HtmlOutputProcessor createOutputProcessor() { if ( "pageable".equals( exportMethod ) ) { //$NON-NLS-1$ return new PageableHtmlOutputProcessor( report.getConfiguration() ); } else if ( "flow".equals( exportMethod ) ) { //$NON-NLS-1$ return new FlowHtmlOutputProcessor(); } else { return new StreamHtmlOutputProcessor( report.getConfiguration() ); } }
public static void createStreamHTML( final MasterReport report, final OutputStream outputStream ) throws ReportProcessingException { if ( report == null ) { throw new NullPointerException(); } if ( outputStream == null ) { throw new NullPointerException(); } 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( null, null ); printer.setUrlRewriter( new FileSystemURLRewriter() ); outputProcessor.setPrinter( printer ); final StreamReportProcessor sp = new StreamReportProcessor( report, outputProcessor ); sp.processReport(); sp.close(); }
ReportStructureValidator validator = new ReportStructureValidator(); if ( validator.isValidForFastProcessing( report ) == false ) { final HtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor( report.getConfiguration() ); final HtmlPrinter printer = new AllItemsHtmlPrinter( report.getResourceManager() ); printer.setContentWriter( targetRoot, new DefaultNameGenerator( targetRoot, filename, suffix ) );
printer.setUrlRewriter( computeUrlRewriter() ); final StreamHtmlOutputProcessor outputProcessor = new StreamHtmlOutputProcessor( configuration ); final StreamReportProcessor streamReportProcessor = new StreamReportProcessor( masterReport, outputProcessor ); try {