if (xmlWriter == null)
{
throw new NullPointerException();
}
final CompoundDataFactory compoundDataFactory = (CompoundDataFactory) dataFactory;
final AttributeList rootAttrs = new AttributeList();
if (xmlWriter.isNamespaceDefined(CompoundDataFactoryModule.NAMESPACE) == false)
{
rootAttrs.addNamespaceDeclaration("data", CompoundDataFactoryModule.NAMESPACE);
}
xmlWriter.writeTag(SQLDataFactoryModule.NAMESPACE, "sql-datasource", rootAttrs, XmlWriterSupport.OPEN);
xmlWriter.writeTag(CompoundDataFactoryModule.NAMESPACE, "compound-datasource", rootAttrs, XmlWriterSupport.OPEN);
for (int i = 0; i < compoundDataFactory.size(); i++)
{
final DataFactory df = compoundDataFactory.get(i);
final DataFactoryWriteHandler writerHandler = DataFactoryWriter.lookupWriteHandler(df);
if (writerHandler == null)
{
throw new ReportWriterException("Unable to find writer-handler for data-factory " + df.getClass());
}