Package org.pentaho.reporting.libraries.resourceloader

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


    }

    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
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();
View Full Code Here

      {
        chartKey = resourceManager.deriveKey(runtime.getProcessingContext().getContentBase(), (String) rawValue);
      }
      else
      {
        chartKey = resourceManager.createKey(rawValue);
      }

      final Resource res = resourceManager.create(chartKey, null, Document.class);

      return null;
View Full Code Here

      return;
    }
    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;
View Full Code Here

    {
      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

        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

      {
        final FontSource fr = (FontSource) fofam.getFontRecord(false, false);
        final ResourceManager resourceManager = new ResourceManager();
        resourceManager.registerDefaults();

        final ResourceKey fontSource = resourceManager.createKey(new File(fr.getFontSource()));
        final FontDataInputSource fs =
            new ResourceFontDataInputSource(resourceManager, fontSource);
        final TrueTypeFont ttf = new TrueTypeFont(fs);
        final NameTable nt = (NameTable) ttf.getTable(NameTable.TABLE_ID);
        //PostscriptInformationTable pst = ttf.getTable(PostscriptInformationTable.TABLE_ID);
View Full Code Here

    {
      CSSParserContext.getContext().setDefaultNamespace(defaultNamespaceURI);
      final ResourceKey key;
      if (source == null)
      {
        key = manager.createKey(uri);
      }
      else
      {
        key = manager.deriveKey(source, uri);
      }
View Full Code Here

      return;
    }
    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;
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.