/** * Resets the iterator back to the tree root and clear any cached data. */ public void reset() { sequence = new OneDocSequence(root); queue.clear(); }
public DocumentTreeIterator(CoreSession session, DocumentModel root, boolean excludeRoot) { this.root = root; this.session = session; if (excludeRoot) { sequence = session.getChildrenIterator(root.getRef(), null, null, null); } else { sequence = new OneDocSequence(root); } }