Package org.pentaho.reporting.libraries.repository

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


    final MasterReport report = (MasterReport) resource.getResource();
    report.setReportEnvironment(new SessionReportEnvironment(report.getReportEnvironment(), request.getSession()));

    final ByteArrayOutputStream out = new ByteArrayOutputStream();
    final ZipRepository zipRepository = new ZipRepository(out);
    final ContentLocation root = zipRepository.getRoot();
    final ContentLocation data = RepositoryUtilities.createLocation
        (zipRepository, RepositoryUtilities.splitPath("data", "/"));

    final FlowHtmlOutputProcessor outputProcessor = new FlowHtmlOutputProcessor();

    final HtmlPrinter printer = new AllItemsHtmlPrinter(report.getResourceManager());
View Full Code Here


    try
    {
      final ArrayList<String> entityNames = new ArrayList<String>();
      entityNames.add(dataEntity.getName());

      ContentLocation location = dataEntity.getParent();
      while (location != null)
      {
        entityNames.add(location.getName());
        location = location.getParent();
      }

      final ArrayList<String> contentNames = new ArrayList<String>();
      location = dataEntity.getRepository().getRoot();

      while (location != null)
      {
        contentNames.add(location.getName());
        location = location.getParent();
      }

      // now remove all path elements that are equal ..
      while (contentNames.isEmpty() == false && entityNames.isEmpty() == false)
      {
View Full Code Here

        }

        case HTML:
        {
          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());
View Full Code Here

    {
      throw new NullPointerException();
    }

    final StreamRepository streamRepository = new StreamRepository(new NoCloseOutputStream(outputStream));
    final ContentLocation targetRoot = streamRepository.getRoot();

    task.setBodyContentLocation(targetRoot);
    task.setBodyNameGenerator(new DefaultNameGenerator(targetRoot, fileName, suffix));
  }
View Full Code Here

        final File tempDir = createTemporaryDirectory("report-designer-html-preview");//$NON-NLS-1$

        try
        {
          final FileRepository targetRepository = new FileRepository(tempDir);
          final ContentLocation targetRoot = targetRepository.getRoot();


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

    OutputStream fout = null;
    try
    {
      fout = new BufferedOutputStream(new FileOutputStream(targetFile));
      final ZipRepository zipRepository = new ZipRepository(fout);
      final ContentLocation root = zipRepository.getRoot();
      final ContentLocation data = RepositoryUtilities.createLocation
          (zipRepository, RepositoryUtilities.split(dataDirectory, "/"));
      final StreamingReportProcessor sp = new StreamingReportProcessor();

      final HtmlOutputProcessor outputProcessor = createOutputProcessor();
      final HtmlPrinter printer = outputProcessor.getPrinter();
View Full Code Here

  public void run()
  {
    try
    {
      final FileRepository targetRepository = new FileRepository(targetDirectory);
      final ContentLocation targetRoot = targetRepository.getRoot();

      final FileRepository dataRepository = new FileRepository(dataDirectory);
      final ContentLocation dataRoot = dataRepository.getRoot();

      final StreamingReportProcessor sp = new StreamingReportProcessor();
      final HtmlOutputProcessor outputProcessor = createOutputProcessor();
      final HtmlPrinter printer = outputProcessor.getPrinter();
      printer.setContentWriter(targetRoot,
View Full Code Here

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

    ContentLocation location = entity.getParent();
    while (location != null)
    {
      entityNames.add(location.getName());
      location = location.getParent();
    }

    final StringBuffer b = new StringBuffer();
    for (int i = entityNames.size() - 1; i >= 0; i--)
    {
View Full Code Here

    final FontRegistry fontRegistry = new AWTFontRegistry();
    final FontStorage fontStorage = new DefaultFontStorage(fontRegistry);
    this.metaData = new HtmlOutputProcessorMetaData
        (fontStorage, HtmlOutputProcessorMetaData.PAGINATION_NONE);

    final ContentLocation contentLocation = new DummyRepository().getRoot();
    final NameGenerator contentNameGenerator = new DefaultNameGenerator(contentLocation);
    final ContentLocation dataLocation = new DummyRepository().getRoot();
    final NameGenerator dataNameGenerator = new DefaultNameGenerator(dataLocation);

    this.printer = new HtmlPrinter();
    this.printer.setContentWriter(contentLocation, contentNameGenerator);
    this.printer.setDataWriter(dataLocation, dataNameGenerator);
View Full Code Here

    }

    final ArrayList entityNames = new ArrayList();
    entityNames.add(dataEntity.getName());

    ContentLocation location = dataEntity.getParent();
    while (location != null)
    {
      entityNames.add(location.getName());
      location = location.getParent();
    }

    final ArrayList contentNames = new ArrayList();
    location = sourceDocument.getParent();
    while (location != null)
    {
      contentNames.add(location.getName());
      location = location.getParent();
    }

    // now remove all path elements that are equal ..
    while (contentNames.isEmpty() == false && entityNames.isEmpty() == false)
    {
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.