throw new RuntimeException("factory: unable to construct data source" );
}
try{
XDocumentSubStorageSupplier doc = (XDocumentSubStorageSupplier)UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class,ds);
XStorage stor = doc.getDocumentSubStorage("database",4);
try{
if ( stor.isStreamElement("db.log") )
stor.removeElement("db.log");
} catch(Exception e){}
try{
if ( stor.isStreamElement("db.properties") )
stor.removeElement("db.properties");
} catch(Exception e){}
try{
if ( stor.isStreamElement("db.script") )
stor.removeElement("db.script");
} catch(Exception e){}
try{
if ( stor.isStreamElement("db.script.new") )
stor.removeElement("db.script.new");
} catch(Exception e){}
XStorable mod = (XStorable)UnoRuntime.queryInterface(XStorable.class,ds);
mod.store();
XComponent xComp = (XComponent)UnoRuntime.queryInterface(XComponent.class,stor);
if ( xComp != null )
xComp.dispose();
} catch(Exception e){}
com.sun.star.beans.PropertyValue[] info = null;
XDriver drv = null;
try{
XDocumentSubStorageSupplier doc = (XDocumentSubStorageSupplier)UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class,ds);
XModel mod = (XModel)UnoRuntime.queryInterface(XModel.class,ds);
XStorage stor = doc.getDocumentSubStorage("database",4);
info = new com.sun.star.beans.PropertyValue[]{
new com.sun.star.beans.PropertyValue("Storage",0,stor,PropertyState.DIRECT_VALUE)
,new com.sun.star.beans.PropertyValue("URL",0,mod.getURL(),PropertyState.DIRECT_VALUE)
};
drv = (XDriver)UnoRuntime.queryInterface(XDriver.class,((XMultiServiceFactory)param.getMSF()).createInstance("com.sun.star.sdbcx.comp.hsqldb.Driver"));