Package org.pentaho.reporting.libraries.repository

Examples of org.pentaho.reporting.libraries.repository.ContentLocation


    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final StreamExcelOutputProcessor outputProcessor =
View Full Code Here


  public byte[] generate(final MasterReport report) throws ReportProcessingException, IOException
  {
    final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    final StreamRepository targetRepository = new StreamRepository(null, outputStream, "report"); //$NON-NLS-1$
    final ContentLocation targetRoot = targetRepository.getRoot();

    final PageableHtmlOutputProcessor outputProcessor = new PageableHtmlOutputProcessor(report.getConfiguration());
    final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
    printer.setContentWriter(targetRoot, new DefaultNameGenerator(targetRoot, "index", "html"));//$NON-NLS-1$//$NON-NLS-2$
    outputProcessor.setPrinter(printer);
View Full Code Here

  private String buildPath(final ContentEntity entity)
  {
    final ArrayList entityNames = new ArrayList();
    entityNames.add(entity.getName());

    ContentLocation location = entity.getParent();
    int size = 0;
    while (location != null)
    {
      final ContentLocation parent = location.getParent();
      if (parent != null)
      {
        final String locationName = location.getName();
        size += locationName.length();
        size += 1;
View Full Code Here

    this.metaData = new CSVOutputProcessorMetaData(CSVOutputProcessorMetaData.PAGINATION_NONE);
    this.flowSelector = new DisplayAllFlowSelector();

    this.printer = new CSVPrinter();

    final ContentLocation root = new StreamRepository(outputStream).getRoot();
    this.printer.setContentLocation(root);
    this.printer.setContentNameGenerator(new DefaultNameGenerator(root));
  }
View Full Code Here

    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "application/vnd.ms-excel"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final FlowExcelOutputProcessor outputProcessor =
View Full Code Here

    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "application/vnd.ms-excel"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final PageableExcelOutputProcessor outputProcessor =
View Full Code Here

      final ImageGeneratorInterceptor interceptor = new ImageGeneratorInterceptor();
      outputProcessor.setInterceptor(interceptor);
      streamReportProcessor.processReport();
      streamReportProcessor.close();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, mimeType));
      final BufferedImage image = interceptor.getImage();
      final ImageEncoder imageEncoder = ImageEncoderRegistry.getInstance().createEncoder(mimeType);
      final OutputStream outputStream = contentItem.getOutputStream();
      imageEncoder.encodeImage(image, outputStream, quality, alphaChannel);
      outputStream.close();
View Full Code Here

      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"));
View Full Code Here

    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}"));
View Full Code Here

    try
    {
      final MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "text/xml"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final XmlPageOutputProcessor outputProcessor =
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.repository.ContentLocation

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.