Package org.pentaho.reporting.libraries.resourceloader

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


    final RepositoryResourceBundleData bdata = (RepositoryResourceBundleData) data;
    final Repository repository = bdata.getRepository();
    try
    {
      final StaticDocumentBundle bundle = new StaticDocumentBundle(repository, manager, bdata.getBundleKey());
      return new SimpleResource(data.getKey(), bundle, getFactoryType(), data.getVersion(manager));
    }
    catch (ResourceException e)
    {
      throw new ResourceCreationException("Unable to interpret document-bundle", e);
    }
View Full Code Here


      final InMemoryMetadataDomainRepository repo = new InMemoryMetadataDomainRepository();
      final XmiParser parser = new XmiParser();
      final Domain domain = parser.parseXmi(stream);
      domain.setId(String.valueOf(o));
      repo.storeDomain(domain, true);
      return new SimpleResource(key, repo, IMetadataDomainRepository.class, version);
    }
    catch (ResourceCreationException e)
    {
      throw e;
    }
View Full Code Here

          throws ResourceLoadingException
  {
    final long version = data.getVersion(caller);
    final Image image =
            Toolkit.getDefaultToolkit().createImage(data.getResource(caller));
    return new SimpleResource (data.getKey(), image, Image.class, version);
  }
View Full Code Here

          throws ResourceLoadingException
  {
    final long version = data.getVersion(caller);
    final Image image =
            Toolkit.getDefaultToolkit().createImage(data.getResource(caller));
    return new SimpleResource (data.getKey(), image, Image.class, version);
  }
View Full Code Here

      }
      finally
      {
        stream.close();
      }
      return new SimpleResource (data.getKey(), properties, Properties.class, data.getVersion(manager));
    }
    catch (IOException e)
    {
      throw new ResourceLoadingException("Failed to load the properties file.",e);
    }
View Full Code Here

      final SVGDocument document = (SVGDocument) loader.loadDocument
          (url.toURI().toASCIIString(), data.getResourceAsStream(caller));
      final BridgeContext ctx = new BridgeContext(userAgent, loader);
      final GVTBuilder builder = new GVTBuilder();
      final GraphicsNode node = builder.build(ctx, document);
      return new SimpleResource(data.getKey(), new SVGDrawable(node), DrawableWrapper.class, version);
    }
    catch (IOException e)
    {
      throw new ResourceLoadingException("Failed to process SVG file", e);
    }
View Full Code Here

    if (image == null)
    {
      throw new ResourceCreationException("Failed to load the image. ImageIO#read returned null");
    }

    return new SimpleResource(data.getKey(), image, Image.class, version);
  }
View Full Code Here

      final long version = data.getVersion(caller);
      final InputStream stream = data.getResourceAsStream(caller);
      try
      {
        final WmfFile wmfFile = new WmfFile(stream, -1, -1);
        return new SimpleResource (data.getKey(), wmfFile, DrawableWrapper.class, version);
      }
      finally
      {
        stream.close();
      }
View Full Code Here

      final InputStream stream = data.getResourceAsStream(caller);
      try
      {
        final WmfFile wmfFile = new WmfFile(stream, -1, -1);
        final Image image = wmfFile.replay();
        return new SimpleResource(data.getKey(), image, Image.class, version);
      }
      finally
      {
        stream.close();
      }
View Full Code Here

          throw new ResourceCreationException("This is no 8Bit Encoding data");
        }
        final External8BitEncodingData encData = (External8BitEncodingData) ob;
        final External8BitEncodingCore encCore =
                new External8BitEncodingCore(encData);
        return new SimpleResource(data.getKey(), encCore, getFactoryType(), data.getVersion(manager));
      }
      finally
      {
        oin.close();
      }
View Full Code Here

TOP

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

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.