* @throws ResourceException if parsing or loading failed for some reason.
*/
private MasterReport parse(final URL file, final URL contentBase)
throws ResourceException
{
final ResourceManager resourceManager = new ResourceManager();
resourceManager.registerDefaults();
final ResourceKey contextKey = resourceManager.createKey(contentBase);
// Build the main key. That key also contains all context/parse-time
// parameters as they will influence the resulting report. It is not
// wise to keep caching independent from that.
final HashMap map = new HashMap();
final Iterator it = this.helperObjects.keySet().iterator();
while (it.hasNext())
{
final String name = (String) it.next();
map.put(new FactoryParameterKey(name), helperObjects.get(name));
}
final ResourceKey key = resourceManager.createKey(file, map);
final Resource resource = resourceManager.create(key, contextKey, MasterReport.class);
return (MasterReport) resource.getResource();
}