Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


The resource manager provides resource-objects, which grant access to some additional meta-data. The first parameter of the 'create' operation is the source object. This can be anything, like an URL, a File (or a string representation of those) or a byte containing the raw-data. Resources stored on the classpath can be accessed using the String "res:/package/file.name".
You may want to have a look at the sources of the libloader, especially the subpackages file, raw, resource and zip of the package org.jfree.resourceloader.loader and the code of the method org.jfree.resourceloader.ResourceManager.registerDefaultLoaders() in order to understand the resource handling better.

Code Block
Resource res = manager.createDirectly(source, JFreeReport.class);

...


In common wording: If you have an "flow:content" element (where flow is a namespace identifier pointing to the namespace uri "http://jfreereport.sourceforge.net/namespaces/reports/flow") that has a 'format' attribute, then the engine will take the value from the 'content' element's content attribute and format the value found there with the formatstring found in the 'format' attribute. The attributes of the namespace 'report' are automaticly filled in by the engine itself, you dont have to care about where they come from, simply assume that they are there whenever you refer to a ContentElement.
Example:

Code Block
<report:report xmlns:report="http://jfreereport.sourceforge.net/namespaces/reports/flow">

  ..

      <report:content>
        <report:value-expression formula="jfreereport:12345678" format="#.##0.00"/>
     </report:content>

</report:report>

...