* @throws org.xml.sax.SAXException if there is a parsing error.
*/
protected void doneParsing() throws SAXException
{
super.doneParsing();
final AbstractNamedMDXDataFactory dataFactory = (AbstractNamedMDXDataFactory) getDataFactory();
for (int i = 0; i < queries.size(); i++)
{
final PropertyReadHandler handler = queries.get(i);
dataFactory.setQuery(handler.getName(), handler.getResult(), null, null);
}
if (globalScriptReadHandler != null)
{
dataFactory.setGlobalScript(globalScriptReadHandler.getResult());
dataFactory.setGlobalScriptLanguage(globalScriptReadHandler.getName());
}
if (queryDefinitionsReadHandler != null)
{
final ArrayList<QueryDefinitionReadHandler> scriptedQueries = queryDefinitionsReadHandler.getScriptedQueries();
for (final QueryDefinitionReadHandler scriptedQuery : scriptedQueries)
{
dataFactory.setQuery(scriptedQuery.getName(), scriptedQuery.getQuery(),
scriptedQuery.getScriptLanguage(), scriptedQuery.getScript());
}
}
}