if(doc.getResourceType() == DocumentImpl.BINARY_FILE) { domDb.remove(doc.getAddress()); domDb.removeOverflowValue(((BinaryDocument)doc).getPage()); } else { NodeImpl node = (NodeImpl)doc.getFirstChild(); domDb.removeAll(node.getInternalAddress());           }
try { Value ref = new NodeRef(doc.getDocId()); IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); domDb.remove(query, null); domDb.flush(); } catch (BTreeException e) { LOG.warn("btree error while removing document", e); } catch (DBException e) { LOG.warn("db error while removing document", e); } catch (IOException e) { LOG.warn("io error while removing document", e); } catch (TerminatedException e) { LOG.warn("method terminated", e); }
					public Object start() {						if(doc.getResourceType() == DocumentImpl.BINARY_FILE) {							domDb.remove(doc.getAddress());							domDb.removeOverflowValue(((BinaryDocument)doc).getPage());						} else {							NodeImpl node = (NodeImpl)doc.getFirstChild();							domDb.removeAll(node.getInternalAddress());//							Iterator k =//								getDOMIterator(//									new NodeProxy(//										doc,//										node.getGID(),//										node.getInternalAddress()));//							while(k.hasNext()) {//								k.next();//								k.remove();//							}						}						return null;					}