Package org.pentaho.reporting.libraries.resourceloader

Examples of org.pentaho.reporting.libraries.resourceloader.ResourceManager.create()


        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "content.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, JFreeReport.class);
            final OfficeDocument doc = (OfficeDocument) resource.getResource();
            if (doc != null)
            {
                return doc;
            }
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 source = rootHandler.getSource();

      final ResourceKey target = resourceManager.deriveKey(source, file, map);
      final DependencyCollector dc = rootHandler.getDependencyCollector();

      final Resource resource = resourceManager.create(target, rootHandler.getContext(), targetClass);
      dc.add(resource);
      return resource.getResource();
    }
    catch (ResourceLoadingException rle)
    {
View Full Code Here

      }

      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

      else
      {
        chartKey = resourceManager.createKey(rawValue);
      }

      final Resource res = resourceManager.create(chartKey, null, Document.class);

      return null;
    }
    catch (Throwable e)
    {
View Full Code Here

    final ResourceManager resourceManager = getRootHandler().getResourceManager();
    final ResourceKey context = getRootHandler().getContext();
    try
    {
      final ResourceKey resourceKey = resourceManager.deriveKey(context, href);
      final Resource resource = resourceManager.create(resourceKey, null, GlobalMetaDefinition.class);
      result = (GlobalMetaDefinition) resource.getResource();
    }
    catch (ResourceException e)
    {
      throw new ParseException("Failed to parse included global definitions", e, getLocator());
View Full Code Here

        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "styles.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, OfficeStylesCollection.class);
            final OfficeStylesCollection styles =
                    (OfficeStylesCollection) resource.getResource();
            if (styles != null)
            {
                return styles;
View Full Code Here

        try
        {
            final ResourceKey key =
                    resourceManager.deriveKey(contextKey, "content.xml");
            final Resource resource =
                    resourceManager.create(key, contextKey, JFreeReport.class);
            final OfficeDocument doc = (OfficeDocument) resource.getResource();
            if (doc != null)
            {
                return doc;
            }
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, ReportDataFactory.class);
      getRootHandler().getDependencyCollector().add(resource);
      dataFactory = (ReportDataFactory) resource.getResource();
    }
    catch (ResourceKeyCreationException e)
    {
View Full Code Here

      final ResourceKey source = rootHandler.getSource();

      final ResourceKey target = resourceManager.deriveKey(source, file, map);
      final DependencyCollector dc = rootHandler.getDependencyCollector();

      final Resource resource = resourceManager.create(target, rootHandler.getContext(), targetClass);
      dc.add(resource);
      return resource.getResource();
    }
    catch (ResourceLoadingException rle)
    {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.