public Object start() throws ReadOnlyException { try { Value ref = new NodeRef(doc.getDocId()); IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); final ArrayList nodes = domDb.findKeys(query); for (Iterator i = nodes.iterator(); i.hasNext();) { ref = (Value) i.next(); long gid = ByteConversion.byteToLong(ref.data(), ref.start() + 4); if (oldDoc.getTreeLevel(gid) >= doc.getMetadata().reindexRequired()) { if (node != null) { if (NodeSetHelper.isDescendant(oldDoc, node.getGID(), gid)) { domDb.removeValue(transaction, ref); } } else domDb.removeValue(transaction, ref); }
public Object start() { try { domDb.remove(transaction, idx, null); domDb.flush(); } catch (BTreeException e) { LOG.warn("start() - " + "error while removing doc", e); } catch (IOException e) { LOG.warn("start() - " + "error while removing doc", e); } catch (TerminatedException e) { LOG.warn("method terminated", e); } catch (DBException e) { LOG.warn("start() - " + "error while removing doc", e);
            public Object start() throws ReadOnlyException {                try {                    Value ref = new NodeRef(doc.getDocId());                    IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref);                    final ArrayList nodes = domDb.findKeys(query);                                      for (Iterator i = nodes.iterator(); i.hasNext();) {                        ref = (Value) i.next();                        long gid = ByteConversion.byteToLong(ref.data(), ref.start() + 4);                        if (oldDoc.getTreeLevel(gid) >= doc.getMetadata().reindexRequired()) {                            if (node != null) {                                if (NodeSetHelper.isDescendant(oldDoc, node.getGID(), gid)) {                                    domDb.removeValue(transaction, ref);                                }                            } else                                domDb.removeValue(transaction, ref);                        }                    }                } catch (BTreeException e) {                    LOG.debug("Exception while reindexing document: " + e.getMessage(), e);                } catch (IOException e) {                    LOG.debug("Exception while reindexing document: " + e.getMessage(), e);                }                return null;            }