NodeRef ref = new NodeRef(doc.getDocId()); final IndexQuery idx = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); new DOMTransaction(this, domDb) { public Object start() { try { domDb.findKeys(idx); } catch (BTreeException e) { LOG.warn("start() - " + "error while removing doc", e); } catch (IOException e) { LOG.warn("start() - " + "error while removing doc", e); } return null; } } .run();
	public void checkTree(DocumentImpl doc) {		LOG.debug("Checking DOM tree for document " + doc.getFileName());		NodeList nodes = doc.getChildNodes();		NodeImpl n;		for (int i = 0; i < nodes.getLength(); i++) {		    n = (NodeImpl) nodes.item(i);		    Iterator iterator =		        getNodeIterator(		                new NodeProxy(doc, n.getGID(), n.getInternalAddress()));		    iterator.next();		    checkTree(iterator, n);		}	}