}
// docs end constructor
// docs start connect
private void connect(DataStoreFactorySpi format) throws Exception {
JDataStoreWizard wizard = new JDataStoreWizard(format);
int result = wizard.showModalDialog();
if (result == JWizard.FINISH) {
Map<String, Object> connectionParameters = wizard.getConnectionParameters();
dataStore = DataStoreFinder.getDataStore(connectionParameters);
if (dataStore == null) {
JOptionPane.showMessageDialog(null, "Could not connect - check parameters");
}
updateUI();