Package org.pentaho.reporting.libraries.resourceloader

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


          RTFImageCache.logger.info("Unable to read the raw-data, will try to recode image-data.", ioe);
        }

        try
        {
          final Resource resource = resourceManager.create(url, null, Image.class);
          image = (java.awt.Image) resource.getResource();
        }
        catch (ResourceException re)
        {
          RTFImageCache.logger.info("Caught illegal Image, will try to find local instance", re);
        }
View Full Code Here


      final String name = (String) it.next();
      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = resourceManager.createKey(file, map);
    final Resource resource = resourceManager.create(key, contextKey, MasterReport.class);
    return (MasterReport) resource.getResource();
  }
View Full Code Here

      final String name = (String) it.next();
      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = resourceManager.createKey(file, map);
    final Resource resource = resourceManager.create(key, contextKey, MasterReport.class);
    return (MasterReport) resource.getResource();
  }
View Full Code Here

      final String name = (String) it.next();
      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = resourceManager.createKey(bytes, map);
    final Resource resource = resourceManager.create(key, contextKey, MasterReport.class);
    return (MasterReport) resource.getResource();
  }
View Full Code Here

      map.put(new FactoryParameterKey(name), helperObjects.get(name));
    }

    final ResourceKey key = new ResourceKey(input.getParent(),
        input.getSchema(), input.getIdentifier(), input.getFactoryParameters());
    final Resource resource = manager.create(key, contextKey, MasterReport.class);
    return (MasterReport) resource.getResource();
  }
View Full Code Here

      else
      {
        throw new ParseException("Illegal State: No valid report", getRootHandler().getDocumentLocator());
      }

      final Resource resource = resourceManager.create(target, rootHandler.getContext(), targetType);
      dc.add(resource);

    }
    catch (ResourceKeyCreationException e)
    {
View Full Code Here

      if (key.getParent() != null)
      {
        final ResourceManager resourceManager = getRootHandler().getResourceManager();
        try
        {
          final Resource bundleData = resourceManager.create(key.getParent(), null, DocumentBundle.class);
          report.setBundle((DocumentBundle) bundleData.getResource());
        }
        catch (ResourceException e)
        {
          getRootHandler().warning(new SAXParseException
              ("Unable to load the bundle. Bundle data may be unavailable.", getLocator()));
View Full Code Here

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

    {
      try
      {
        final ResourceKey contentBase = definition.getContentBase();
        final ResourceKey resourceKey = resourceManager.deriveKey(contentBase, String.valueOf(attribute));
        final Resource resource = resourceManager.create(resourceKey, contentBase, WizardSpecification.class);
        return (WizardSpecification) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
      {
        throw new ReportProcessingException("Failed to load the wizard-specification", e);
      }
      catch (ResourceException e)
      {
        throw new ReportProcessingException("Failed to load the wizard-specification", e);
      }
    }

    try
    {
      final ResourceKey contentBase = definition.getContentBase();
      final ResourceKey resourceKey = resourceManager.deriveKey(contentBase, "wizard-specification.xml");
      final Resource resource = resourceManager.create(resourceKey, contentBase, WizardSpecification.class);
      return (WizardSpecification) resource.getResource();
    }
    catch (final ResourceKeyCreationException e)
    {
      // not a error.
    }
View Full Code Here

    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    try
    {
      final Resource resource = resourceManager.createDirectly(metaDataSource, ElementTypeCollection.class);
      final ElementTypeCollection typeCollection = (ElementTypeCollection) resource.getResource();
      final ElementMetaData[] types = typeCollection.getElementTypes();
      for (int i = 0; i < types.length; i++)
      {
        final ElementMetaData metaData = types[i];
        ElementTypeRegistry.getInstance().registerElement(metaData);
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.