Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.Resource


    resourceManager.registerDefaults();
    resourceManager.registerFactory(new TableTestSpecXmlResourceFactory());


    final URL url = TestRuntime.class.getResource(filename);
    final Resource resource = resourceManager.createDirectly(url, ValidationSequence.class);
    final ValidationSequence sequence = (ValidationSequence) resource.getResource();

    final TestRuntime runtime = new TestRuntime(sequence);

    final HierarchicalConfiguration config = new HierarchicalConfiguration(
        ClassicEngineBoot.getInstance().getGlobalConfig());
View Full Code Here


  {
    final URL url = getClass().getResource("Prd-2539.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    HtmlReportUtil.createDirectoryHTML(report, "/Users/user/export/report.html");

  }
View Full Code Here

  {
    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      resourceManager.registerDefaults();
      final Resource resource = resourceManager.createDirectly(file, DrillDownProfileCollection.class);
      final DrillDownProfileCollection typeCollection = (DrillDownProfileCollection) resource.getResource();
      final DrillDownProfile[] types = typeCollection.getData();
      for (int i = 0; i < types.length; i++)
      {
        final DrillDownProfile metaData = types[i];
        if (metaData != null)
View Full Code Here

        final ResourceKey contentBase = context.getContentBase();
        final ResourceManager manager = context.getResourceManager();
        try
        {
          final ResourceKey key = createKeyFromString(manager, contentBase, backgroundImage);
          final Resource resource = manager.create(key, null, Image.class);
          final Image image = (Image) resource.getResource();
          plot.setBackgroundImage(image);
          plotImageCache = image;
        }
        catch (Exception e)
        {
View Full Code Here

      final ResourceKey key = getRootHandler().getSource();
      final ResourceManager manager = getRootHandler().getResourceManager();
      try
      {
        final ResourceKey derivedKey = manager.deriveKey(key, href);
        final Resource resource = manager.create(derivedKey, null, DataFactory.class);
        getRootHandler().getDependencyCollector().add(resource);
        dataFactory = (DataFactory) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
      {
        throw new ParseException("Unable to derive key for " + key + " and " + href, e, getLocator());
      }
View Full Code Here

      {
        if (url != null)
        {
          try
          {
            final Resource resource = resourceManager.createDirectly(url, Image.class);
            awtImage = (Image) resource.getResource();
          }
          catch (ResourceException e)
          {
            // ignore.
          }
View Full Code Here

              final ResourceData data = resourceManager.load(resource);
              instance = com.lowagie.text.Image.getInstance(data.getResource(resourceManager));
              imageCache.put(resource, instance);
            }

            final Resource imageWrapped = resourceManager.create(resource, null, Image.class);
            final Image image = (Image) imageWrapped.getResource();

            if (drawImage(content, image, instance))
            {
              drawImageMap(content);
            }
View Full Code Here

        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as it did not return a valid URL.");
      }

      try
      {
        final Resource resource = resourceManager.create(sourceURL, null, Image.class);
        final Image image = (Image) resource.getResource();
        drawImage(content, image);
      }
      catch (ResourceException e)
      {
        LogicalPageDrawable.logger.info("URL-image cannot be rendered, as the image was not loadable.", e);
View Full Code Here

        }
        if (image == null)
        {
          try
          {
            final Resource resource = resourceManager.create(url, null, Image.class);
            image = (Image) resource.getResource();
          }
          catch (ResourceException e)
          {
            // ignore.
          }
View Full Code Here

          }
          if (image == null)
          {
            try
            {
              final Resource resource = resourceManager.create(url, null, Image.class);
              image = (Image) resource.getResource();
            }
            catch (ResourceException re)
            {
              ExcelPrinter.logger.info("Failed to load image from URL " + url, re);
            }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.resourceloader.Resource

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.