return new CouchDatabase( uri, dbName, filters );
}
public void publishViews( @Nonnull String dbName ) throws URISyntaxException, IOException {
CouchDBUpdater updater = new CouchDBUpdater();
updater.setCreateDatabase( false );
updater.setDatabase( new Database( server, dbName ) );
try {
URL resource = getViewResource();
if ( resource == null ) {
return;
}
File file = new File( resource.toURI() );
File viewsDir = file.getParentFile().getParentFile();
assertTrue( viewsDir.isDirectory() );
updater.setDesignDocumentDir( viewsDir );
updater.updateDesignDocuments();
} catch ( CanceledException ignore ) {
}
}