Ejemplo n.º 1
0
 public void closeBrowser() {
   try {
     db.close();
   } catch (SQLException e) {
     e.printStackTrace(System.err);
   }
 }
Ejemplo n.º 2
0
 private MutableTreeNode populatePlot(Plot p) throws SQLException {
   DefaultMutableTreeNode tree = new DefaultMutableTreeNode(p);
   // tree.add(populateAttributes(p));
   Statement stmt = db.statement();
   for (Tree t : p.loadTrees(stmt)) {
     tree.add(populateTree(t));
   }
   stmt.close();
   return tree;
 }
Ejemplo n.º 3
0
 private MutableTreeNode populateNest(Nest n) throws SQLException {
   DefaultMutableTreeNode tree = new DefaultMutableTreeNode(n);
   // tree.add(populateAttributes(n));
   Statement stmt = db.statement();
   for (Visit v : n.loadVisits(stmt)) {
     tree.add(populateVisit(v));
   }
   stmt.close();
   return tree;
 }
Ejemplo n.º 4
0
 private MutableTreeNode populateCavity(Cavity c) throws SQLException {
   DefaultMutableTreeNode tree = new DefaultMutableTreeNode(c);
   // tree.add(populateAttributes(c));
   Statement stmt = db.statement();
   for (Nest n : c.loadNests(stmt)) {
     tree.add(populateNest(n));
   }
   stmt.close();
   return tree;
 }
Ejemplo n.º 5
0
 private MutableTreeNode populateTree(Tree t) throws SQLException {
   DefaultMutableTreeNode tree = new DefaultMutableTreeNode(t);
   // tree.add(populateAttributes(t));
   Statement stmt = db.statement();
   for (Cavity c : t.loadCavities(stmt)) {
     tree.add(populateCavity(c));
   }
   stmt.close();
   return tree;
 }
Ejemplo n.º 6
0
 private void populate() throws SQLException {
   Collection<Plot> plots = db.select(Plot.class).values();
   for (Plot p : plots) {
     top.add(populatePlot(p));
   }
 }