Package org.pentaho.reporting.libraries.resourceloader

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


    try
    {
      ResourceManager manager = new ResourceManager();
      manager.registerDefaults();
      Resource res = manager.createDirectly(reportFile, MasterReport.class);
      return (MasterReport) res.getResource();
    }
    catch (Exception e)
    {
      throw new ReportDefinitionException("Parsing failed", e);
    }
View Full Code Here


    try
    {
      ResourceManager manager = new ResourceManager();
      manager.registerDefaults();
      Resource res = manager.createDirectly(in, MasterReport.class);
      return (MasterReport) res.getResource();
    }
    catch (Exception e)
    {
      throw new ReportDefinitionException("Parsing failed", e);
    }
View Full Code Here

    try
    {
      ResourceManager manager = new ResourceManager();
      manager.registerDefaults();
      Resource res = manager.createDirectly(in, MasterReport.class);
      return (MasterReport) res.getResource();
    }
    catch (Exception e)
    {
      throw new ReportDefinitionException("Parsing failed", e);
    }
View Full Code Here

  {
    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      resourceManager.registerDefaults();
      final Resource directly = resourceManager.createDirectly(getReportDefinitionSource(), MasterReport.class);
      return (MasterReport) directly.getResource();
    }
    catch (Exception rde)
    {
      throw new ReportDefinitionException("Failed", rde);
    }
View Full Code Here

  {
    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      resourceManager.registerDefaults();
      final Resource directly = resourceManager.createDirectly(getReportDefinitionSource(), MasterReport.class);
      return (MasterReport) directly.getResource();
    }
    catch (Exception rde)
    {
      throw new ReportDefinitionException("Failed", rde);
    }
View Full Code Here

      else
      {
        target = SubReport.class;
      }

      final Resource resource = resManager.create(key, contentBase, target);
      final Object resourceContent = resource.getResource();
      if (resourceContent instanceof Element)
      {
        return resourceContent;
      }
    }
View Full Code Here

            ("/org/pentaho/reporting/engine/classic/core/metadata/icons/image_50.png");
      }
      if (resource != null)
      {
        final ResourceManager resManager = runtime.getProcessingContext().getResourceManager();
        final Resource loadedResource = resManager.createDirectly(resource, Image.class);
        final Image image = (Image) loadedResource.getResource();
        return new ReportDrawableImage(image);
      }
    }
    catch (Exception e)
    {
View Full Code Here

      if (key == null)
      {
        return null;
      }

      final Resource resource = resManager.create(key, contentBase, ContentType.TARGETS);
      final Object resourceContent = resource.getResource();
      if (resourceContent instanceof DrawableWrapper)
      {
        return resourceContent;
      }
      else if (DrawableWrapper.isDrawable(resourceContent))
View Full Code Here

    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      resourceManager.registerDefaults();
      final Resource resource = resourceManager.createDirectly(url, Image.class);

      this.url = url;
      this.resourceKey = resource.getSource();
      this.image = (Image) resource.getResource();
    }
    catch (ResourceException e)
    {
      throw new IOException("The image could not be loaded.");
    }
View Full Code Here

        continue;
      }
      try
      {
        final ResourceKey resourceKey = resourceManager.deriveKey(context, href);
        final Resource resource = resourceManager.create(resourceKey, null, GlobalMetaDefinition.class);
        globalMetaDefinition.merge((GlobalMetaDefinition) resource.getResource());
      }
      catch (ResourceException e)
      {
        logger.warn("Failed to parse included global definitions: " + getLocator(), e);
      }
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.