Package org.pentaho.reporting.libraries.resourceloader

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


            {
              instance = (com.lowagie.text.Image) maybeImage;
            }
            else
            {
              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);
View Full Code Here


      {
        if (urlImage.isLoadable() && isSupportedImageFormat(url))
        {
          try
          {
            final ResourceData data = resourceManager.load(url);
            final byte[] imageData = data.getResource(resourceManager);
            final String mimeType = queryMimeType(imageData);
            final URL maybeRealURL = resourceManager.toURL(url);
            if (maybeRealURL != null)
            {
View Full Code Here

      {
        instance = maybeImage;
      }
      else
      {
        final ResourceData data = resourceManager.load(resource);
        instance = com.lowagie.text.Image.getInstance(data.getResource(resourceManager));
        imageCache.put(resource, instance);
      }
      return instance;
    }
View Full Code Here

      final ResourceKey contextKey = getContextKey();
      if (contextKey != null)
      {
        final ResourceManager resourceManager = getResourceManager();
        resourceKey = resourceManager.deriveKey(contextKey, getXqueryDataFile());
        return resourceManager.load(resourceKey);
      }
    }
    catch (ResourceException re)
    {
      // failed to load from context
View Full Code Here

    try
    {
      final ResourceManager resourceManager = getResourceManager();
      final ResourceKey resourceKey = resourceManager.createKey(new URL(getXqueryDataFile()));
      return resourceManager.load(resourceKey);
    }
    catch (ResourceException re)
    {
      logger.debug("Failed to load datasource as URL: " + re);
    }
View Full Code Here

    try
    {
      final ResourceManager resourceManager = getResourceManager();
      final ResourceKey resourceKey = resourceManager.createKey(new File(getXqueryDataFile()));
      return resourceManager.load(resourceKey);
    }
    catch (ResourceException re)
    {
      // failed to load from context
      logger.debug("Failed to load datasource as file: " + re);
View Full Code Here

      URL res = getClass().getResource("embedded-row-gen.ktr");
      Assert.assertNotNull(res);

      ResourceManager mgr = new ResourceManager();
      ResourceKey key = mgr.createKey(res);
      final byte[] resource = mgr.load(key).getResource(mgr);
      final EmbeddedKettleTransformationProducer producer =
          new EmbeddedKettleTransformationProducer(new FormulaArgument[0], new FormulaParameter[0], "dummy-id", resource);

      final KettleDataFactory kettleDataFactory = new KettleDataFactory();
      kettleDataFactory.initialize(new DesignTimeDataFactoryContext());
View Full Code Here

  private byte[] loadDataFromBundle(final String href) throws ResourceKeyCreationException, ResourceLoadingException
  {
    final ResourceKey key = getRootHandler().getSource();
    final ResourceManager manager = getRootHandler().getResourceManager();
    final ResourceKey derivedKey = manager.deriveKey(key, href);
    final ResourceData data = manager.load(derivedKey);
    return data.getResource(manager);
  }
}
View Full Code Here

    }
    final File ttfCache = new File(location, filename);
    try
    {
      final ResourceKey resourceKey = resourceManager.createKey(ttfCache);
      final ResourceData data = resourceManager.load(resourceKey);
      final InputStream stream = data.getResourceAsStream(resourceManager);

      final HashMap<String, FontFileRecord> cachedSeenFiles;
      final HashMap<String, DefaultFontFamily> cachedFontFamilies;
      final HashMap<String, DefaultFontFamily> cachedFullFontNames;
View Full Code Here

    }
    final File ttfCache = new File(location, "afm-fontcache.ser");
    try
    {
      final ResourceKey resourceKey = resourceManager.createKey(ttfCache);
      final ResourceData data = resourceManager.load(resourceKey);
      final InputStream stream = data.getResourceAsStream(resourceManager);

      final HashMap cachedSeenFiles;
      final HashMap cachedFontFamilies;
      final HashMap cachedFullFontNames;
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.