Package org.jfree.resourceloader

Examples of org.jfree.resourceloader.ResourceKey


        this.officeStylesCollection = parseStylesXml();
    }

    private OfficeStylesCollection parseStylesXml()
    {
        final ResourceKey contextKey = getRootHandler().getContext();
        final ResourceManager resourceManager = getRootHandler().getResourceManager();

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


        {
            return new OfficeDocument();
        }

        // we may have to parse an existing content.xml.
        final ResourceKey contextKey = getRootHandler().getContext();
        final ResourceManager resourceManager = getRootHandler().getResourceManager();
        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)
View Full Code Here

        if (value instanceof String)
        {
            final String strVal = (String) value;
            if (strVal.startsWith("sun:oo://"))
            {
                return new ResourceKey(InputRepositoryLoader.class.getName(),
                        new InputResourceKey(inputRepository.getId(), strVal), factoryKeys);
            }
        }
        return null;
    }
View Full Code Here

        }
        else
        {
            map = parent.getFactoryParameters();
        }
        return new ResourceKey(parent.getSchema(),
                new InputResourceKey(parentKey.getInputRepositoryId(), resource), map);
    }
View Full Code Here

    final String href = attrs.getValue(getUri(), "href");
    if (href == null)
    {
      throw new ParseException("Required attribute 'href' is missing.", getLocator());
    }
    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

  {
    super.startParsing(attrs);
    String href = attrs.getValue(getUri(), "href");
    if (href != null)
    {
      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,
                StyleSheet.class);
        getRootHandler().getDependencyCollector().add(resource);
        styleSheet = (StyleSheet) resource.getResource();
      }
View Full Code Here

    }
    try
    {
      final byte[] bytes = styleText.getBytes("UTF-8");

      final ResourceKey baseKey = getRootHandler().getSource();
      final ResourceManager resourceManager = getRootHandler().getResourceManager();
      final ResourceKey rawKey = resourceManager.createKey(bytes);

      final Resource resource = resourceManager.create
              (rawKey, baseKey, StyleSheet.class);
      this.styleSheet = (StyleSheet) resource.getResource();
    }
View Full Code Here

        xmlWriter.writeText(" ");
      }
      else if (node instanceof RenderableReplacedContent)
      {
        final RenderableReplacedContent rc = (RenderableReplacedContent) node;
        final ResourceKey source = rc.getSource();
        // We have to do three things here. First, w have to check what kind
        // of content we deal with.
        if (source != null)
        {
          // Cool, we have access to the raw-data. Thats always nice as we
View Full Code Here

      final String prefix = (String) metaNode.getMetaAttribute("prefix");
      final String classAttr = (String) metaNode.getMetaAttribute(
              "class-attribute");
      final String styleAttr = (String) metaNode.getMetaAttribute(
              "style-attribute");
      final ResourceKey styleSheetLocation =
              (ResourceKey) metaNode.getMetaAttribute("default-stylesheet");
      namespaceCollection.addDefinition(new DefaultNamespaceDefinition
              (uri, styleSheetLocation, classAttr, styleAttr, prefix));
    }
  }
View Full Code Here

    final String href = attrs.getValue(getUri(), "href");
    if (href == null)
    {
      throw new ParseException("Required attribute 'href' is missing.", getLocator());
    }
    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

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.