List of usage examples for com.mongodb.gridfs GridFS GridFS
public GridFS(final DB db, final String bucket)
From source file:tango.mongo.MongoConnector.java
License:Open Source License
public boolean setProject(String name) { String dbname = getProjectDBName(name); if (dbname == null) { return false; }/* w w w . j a va2 s . c om*/ project = m.getDB(dbname); experiment = project.getCollection("experiment"); structureMeasurement = project.getCollection("structureMeasurement"); nucleus = project.getCollection("nucleus"); object3D = project.getCollection("object3d"); field = project.getCollection("field"); selection = project.getCollection("selection"); selection.setObjectClass(Selection.class); gfsField = new GridFS(project, "field"); gfsNucleus = new GridFS(project, "nucleus"); gfsFieldThumbnail = new GridFS(project, "fieldThumbnail"); gfsNucleusThumbnail = new GridFS(project, "nucleusThumbnail"); if (Core.GUIMode) { IJ.log("project: " + name + " (" + project.getName() + ") set!"); } this.projectName = name; return true; }