{
throw new ParseException
("Required element 'query' is missing.", getLocator());
}
super.doneParsing();
final JFreeReport report = (JFreeReport) getElement();
report.setQuery(queryReadHandler.getResult());
if (propertiesReadHandler != null)
{
final Properties p = propertiesReadHandler.getResult();
final Iterator entries = p.entrySet().iterator();
while (entries.hasNext())
{
final Map.Entry entry = (Map.Entry) entries.next();
report.getEditableConfiguration().setConfigProperty
((String) entry.getKey(), (String) entry.getValue());
}
}
if (datasourceFactoryReadHandler != null)
{
report.setDataFactory(datasourceFactoryReadHandler.getDataFactory());
}
for (int i = 0; i < styleSheetReadHandlers.size(); i++)
{
final StyleSheetReadHandler handler = (StyleSheetReadHandler)
styleSheetReadHandlers.get(i);
report.addStyleSheet(handler.getStyleSheet());
}
}