protected DataStore createDataStoreFromCurrentConfiguration() throws DataStoreFatalException {
//
// the DataStore has a nice method of verifying the directory exists
// or creating it if it doesn't exist, let's try that first
//
DataStore ds = DataStoreManager.create(configuration.getDataStoreUrl());
// replace datastore configuration with current config
ds.setName(configuration.getName());
ds.setDirectory(new File(configuration.getDirectory()));
return ds;
}