if (connectionProvider == null)
{
throw new NullPointerException();
}
final DriverConnectionProvider driverProvider =
(DriverConnectionProvider) connectionProvider;
xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "connection", XmlWriterSupport.OPEN);
xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "driver", XmlWriterSupport.OPEN);
xmlWriter.writeTextNormalized(driverProvider.getDriver(), false);
xmlWriter.writeCloseTag();
xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "url", XmlWriterSupport.OPEN);
xmlWriter.writeTextNormalized(driverProvider.getUrl(), false);
xmlWriter.writeCloseTag();
xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "properties", XmlWriterSupport.OPEN);
final String[] propertyNames = driverProvider.getPropertyNames();
for (int i = 0; i < propertyNames.length; i++)
{
final String name = propertyNames[i];
final String value = driverProvider.getProperty(name);
xmlWriter.writeTag(Olap4JDataFactoryModule.NAMESPACE, "property", "name", name, XmlWriterSupport.OPEN);
xmlWriter.writeTextNormalized(value, false);
xmlWriter.writeCloseTag();
}
xmlWriter.writeCloseTag();