Package org.jfree.resourceloader

Examples of org.jfree.resourceloader.ResourceKey


    {
      throw new NullPointerException();
    }

    final StyleSheet parentStyle = getParentStyle();
    final ResourceKey source;
    final ResourceManager resourceManager;
    if (parentStyle == null)
    {
      source = null;
      resourceManager = null;
View Full Code Here


              "OutputProcessor is invalid.");
    }
    final LayoutProcess layoutProcess =
            new ChainingLayoutProcess(new DefaultLayoutProcess(outputProcessor));
    final ResourceManager resourceManager = job.getReportStructureRoot().getResourceManager();
    final ResourceKey resourceKey = job.getReportStructureRoot().getBaseResource();

    return new LibLayoutReportTarget
            (job, resourceKey, resourceManager, layoutProcess);
  }
View Full Code Here

    {
      final String key = (String) generateDirs.next();
      final String dataLocation = config.getConfigProperty(key);
      try
      {
        final ResourceKey resKey = manager.createKey(dataLocation);
        final Resource res = manager.create(resKey, null, Properties.class);
        final Properties props = (Properties) res.getResource();
        final Iterator vals = props.entrySet().iterator();
        while (vals.hasNext())
        {
          final Map.Entry entry = (Map.Entry) vals.next();
          final String encName = (String) entry.getKey();
          final String encPath = (String) entry.getValue();
          final ResourceKey encKey = manager.deriveKey(resKey, encPath);
          //Log.debug ("Generated mapping added. " +  encName);
          generatedMapping.put(normalizeEncodingName(encName), encKey);
        }
      }
      catch (Exception e)
View Full Code Here

      // so we can be sure that no errors appear here
      return (Encoding) ObjectUtilities.loadAndInstantiate
              (manual, EncodingRegistry.class, Encoding.class);
    }

    ResourceKey generated = (ResourceKey) generatedMapping.get(key);
    if (generated != null)
    {

      try
      {
View Full Code Here

              "OutputProcessor is invalid.");
    }
    final LayoutProcess layoutProcess =
        new DefaultLayoutProcess(outputProcessor);
    final ResourceManager resourceManager = job.getReportStructureRoot().getResourceManager();
    final ResourceKey resourceKey = job.getReportStructureRoot().getBaseResource();

    return new LibLayoutReportTarget
            (job, resourceKey, resourceManager, layoutProcess);
  }
View Full Code Here

      final String styleText = (String) styleAttributeValue;
      try
      {
        final ReportContext reportContext = runtime.getReportContext();
        final ReportStructureRoot root = reportContext.getReportStructureRoot();
        final ResourceKey baseResource = root.getBaseResource();
        final ResourceManager resourceManager = root.getResourceManager();

        final byte[] bytes = styleText.getBytes("UTF-8");
        final ResourceKey key = resourceManager.createKey(bytes);
        final Resource resource = resourceManager.create
            (key, baseResource, StyleRule.class);

        final CSSDeclarationRule parsedRule =
            (CSSDeclarationRule) resource.getResource();
View Full Code Here

              "OutputProcessor is invalid.");
    }
    final LayoutProcess layoutProcess =
            new ChainingLayoutProcess(new DefaultLayoutProcess(outputProcessor));
    final ResourceManager resourceManager = job.getReportStructureRoot().getResourceManager();
    final ResourceKey resourceKey = job.getReportStructureRoot().getBaseResource();

    return new LibLayoutReportTarget
            (job, resourceKey, resourceManager, layoutProcess);
  }
View Full Code Here

      final XMLReader reader = parser.getXMLReader();
      final XmlFactoryModule[] rootHandlers = getModules();
      final ResourceDataInputSource input = new ResourceDataInputSource(data, manager);

      final ResourceKey contextKey;
      final long version;
      final ResourceKey targetKey = data.getKey();
      if (context == null)
      {
        contextKey = targetKey;
        version = data.getVersion(manager);
      }
      else
      {
        contextKey = context;
        version = -1;
      }

      final MultiplexRootElementHandler handler =
          new MultiplexRootElementHandler(manager, targetKey,
              contextKey, version, rootHandlers);

      final DefaultConfiguration parserConfiguration = handler.getParserConfiguration();
      final URL value = manager.toURL(contextKey);
      if (value != null)
      {
        parserConfiguration.setConfigProperty(CONTENTBASE_KEY, value.toExternalForm());
      }

      configureReader(reader, handler);
      reader.setContentHandler(handler);
      reader.setDTDHandler(handler);
      reader.setEntityResolver(handler.getEntityResolver());
      reader.setErrorHandler(getErrorHandler());

      final Map parameters = targetKey.getFactoryParameters();
      final Iterator it = parameters.keySet().iterator();
      while (it.hasNext())
      {
        final Object o = it.next();
        if (o instanceof FactoryParameterKey)
View Full Code Here

      final SAXParser parser = getParser();

      final XMLReader reader = parser.getXMLReader();
      final XmlFactoryModule[] rootHandlers = getModules();

      final ResourceKey targetKey = manager.createKey(EMPTY_DATA);
      final ResourceKey contextKey;
      if (context == null)
      {
        contextKey = targetKey;
      }
      else
View Full Code Here

      throw new IllegalStateException("OutputProcessor is invalid.");
    }
    final LayoutProcess layoutProcess =
        new ChainingLayoutProcess(new DefaultLayoutProcess(outputProcessor));
    final ResourceManager resourceManager = job.getReportStructureRoot().getResourceManager();
    final ResourceKey resourceKey = job.getReportStructureRoot().getBaseResource();

    return new LibLayoutReportTarget
        (job, resourceKey, resourceManager, layoutProcess);
  }
View Full Code Here

TOP

Related Classes of org.jfree.resourceloader.ResourceKey

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.