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.ms-excel"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final StreamExcelOutputProcessor 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, "text/csv"));
      final OutputStream outputStream = contentItem.getOutputStream();

      try
      {
        final StreamCSVOutputProcessor outputProcessor = new StreamCSVOutputProcessor(outputStream);
View Full Code Here

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

          throw new IOException("Unable to create the target-directory.");
        }
      }

      final FileRepository targetRepository = new FileRepository(targetDirectory);
      final ContentLocation targetRoot = targetRepository.getRoot();

      final String suffix = getSuffix(targetFileName);
      final String filename = IOUtils.getInstance().stripFileExtension(targetFile.getName());

      final FlowHtmlOutputProcessor outputProcessor = new FlowHtmlOutputProcessor();
View Full Code Here

          throw new IOException("Unable to create the data-directory.");
        }
      }

      final FileRepository targetRepository = new FileRepository(targetDirectory);
      final ContentLocation targetRoot = targetRepository.getRoot();

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

      final String suffix = getSuffix(targetFileName);
      final String filename = IOUtils.getInstance().stripFileExtension(targetFile.getName());

      final FlowHtmlOutputProcessor outputProcessor = new FlowHtmlOutputProcessor();
View Full Code Here

    }

    try
    {
      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 MasterReport masterReport = getReport();
      final Configuration configuration = masterReport.getConfiguration();

      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();

      final FlowCSVOutputProcessor outputProcessor =
          new FlowCSVOutputProcessor(configuration);
      outputProcessor.setContentLocation(contentLocation);
View Full Code Here

    }

    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();
    }

    if (sourceDocument instanceof ContentLocation)
    {
      location = (ContentLocation) sourceDocument;
    }
    else
    {
      location = sourceDocument.getParent();
    }

    final ArrayList<String> contentNames = new ArrayList<String>();
    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

    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 FlowExcelOutputProcessor outputProcessor =
View Full Code Here

    setError(null);
    try
    {
      final MasterReport report = getReport();
      final ContentLocation contentLocation = getBodyContentLocation();
      final NameGenerator nameGenerator = getBodyNameGenerator();
      final ContentItem contentItem =
          contentLocation.createItem(nameGenerator.generateName(null, "application/zip"));
      final OutputStream out = contentItem.getOutputStream();

      try
      {
        final ZipRepository zipRepository = new ZipRepository(out);
        try
        {
          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

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.