Examples of ResourceManager


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

          else if (value instanceof ResourceKey)
          {
            try
            {
              final ResourceKey key = (ResourceKey) value;
              final ResourceManager resourceManager = bundle.getResourceManager();
              final ResourceKey bundleKey = bundle.getBundleKey().getParent();
              final String serializedKey = resourceManager.serialize(bundleKey, key);
              attList.setAttribute(AttributeNames.Core.NAMESPACE, "resource-type", "resource-key");
              writer.writeTag(namespace, attrMeta.getName(), attList, XmlWriter.OPEN);
              writer.writeTextNormalized(serializedKey, true);
              writer.writeCloseTag();
            }
View Full Code Here

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

  private static void runTest(final String filename)
      throws ResourceException, ContentProcessingException, ReportProcessingException
  {
    logger.debug("Processing " + filename);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    resourceManager.registerFactory(new TableTestSpecXmlResourceFactory());


    final URL url = TestRuntime.class.getResource(filename);
    final Resource resource = resourceManager.createDirectly(url, ValidationSequence.class);
    final ValidationSequence sequence = (ValidationSequence) resource.getResource();

    final TestRuntime runtime = new TestRuntime(sequence);

    final HierarchicalConfiguration config = new HierarchicalConfiguration(
View Full Code Here

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

  public void testRunner() throws ResourceException, ReportProcessingException, IOException
  {
    final URL url = getClass().getResource("Prd-2539.prpt");
    assertNotNull(url);
    final ResourceManager resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
    final Resource directly = resourceManager.createDirectly(url, MasterReport.class);
    final MasterReport report = (MasterReport) directly.getResource();

    HtmlReportUtil.createDirectoryHTML(report, "/Users/user/export/report.html");

  }
View Full Code Here

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

  public void load(final File file)
  {
    try
    {
      final ResourceManager resourceManager = new ResourceManager();
      resourceManager.registerDefaults();
      final Resource resource = resourceManager.createDirectly(file, DrillDownProfileCollection.class);
      final DrillDownProfileCollection typeCollection = (DrillDownProfileCollection) resource.getResource();
      final DrillDownProfile[] types = typeCollection.getData();
      for (int i = 0; i < types.length; i++)
      {
        final DrillDownProfile metaData = types[i];
View Full Code Here

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

      else
      {
        final ExpressionRuntime expressionRuntime = getRuntime();
        final ProcessingContext context = expressionRuntime.getProcessingContext();
        final ResourceKey contentBase = context.getContentBase();
        final ResourceManager manager = context.getResourceManager();
        try
        {
          final ResourceKey key = createKeyFromString(manager, contentBase, backgroundImage);
          final Resource resource = manager.create(key, null, Image.class);
          final Image image = (Image) resource.getResource();
          plot.setBackgroundImage(image);
          plotImageCache = image;
        }
        catch (Exception e)
View Full Code Here

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

    if (href != null)
    {
      // load ..

      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, DataFactory.class);
        getRootHandler().getDependencyCollector().add(resource);
        dataFactory = (DataFactory) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
      {
View Full Code Here

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

    {
      return;
    }

    final String contentBasePath = String.valueOf(contentBasePathRaw);
    final ResourceManager resourceManager = state.getMasterReport().getResourceManager();

    for (int i = 0; i < datas.length; i++)
    {
      final ExpressionPropertyMetaData attributeMetaData = datas[i];
      final Object attValue = beanUtility.getProperty(attributeMetaData.getName());
View Full Code Here

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

          element.setAttribute(namespace, name, attributeValue);
          return;
        }
        if ("resource-key".equals(type))
        {
          final ResourceManager resourceManager = getRootHandler().getResourceManager();
          final ResourceKey key = getRootHandler().getContext();
          final ResourceKey parent = key.getParent();
          final ResourceKey valueKey = resourceManager.deserialize(parent, attributeValue);

          // make local ..
          final ResourceKey resourceKey = localizeKey(resourceManager, valueKey);
          element.setAttribute(namespace, name, resourceKey);
          return;
View Full Code Here

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

      throw new SAXException("Required attribute 'src' is missing.");
    }


    elementFactory.setContent(content);
    final ResourceManager resourceManager = getRootHandler().getResourceManager();
    elementFactory.setBaseURL(resourceManager.toURL(getRootHandler().getContext()));
  }
View Full Code Here

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

    {
      throw new NullPointerException();
    }
    final DefaultFontStorage fontStorage = new DefaultFontStorage(new AWTFontRegistry());
    metaData = new GraphicsOutputProcessorMetaData(configuration, fontStorage);
    resourceManager = new ResourceManager();
    resourceManager.registerDefaults();
  }
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.