org.xcmis.search
Class Visitors.NavigationVisitor

java.lang.Object
  extended by org.xcmis.search.Visitors.NavigationVisitor
All Implemented Interfaces:
QueryObjectModelVisitor
Direct Known Subclasses:
Visitors.WalkAllVisitor
Enclosing class:
Visitors

public abstract static class Visitors.NavigationVisitor
extends Object
implements QueryObjectModelVisitor

An abstract visitor implementation that performs navigation of the query object.

Subclasses should always implement the visit(T object) methods by performing the following actions:

  1. Call strategy.visit(object);
  2. Add any children of object that are to be visited using enqueue(QueryElement)
  3. Call visitNext()


Field Summary
protected  QueryObjectModelVisitor strategy
           
 
Constructor Summary
protected Visitors.NavigationVisitor(QueryObjectModelVisitor strategy)
          Create a visitor that walks all query objects.
 
Method Summary
protected  void enqueue(Iterable<? extends QueryElement> objectsToBeVisited)
           
protected  void enqueue(QueryElement objectToBeVisited)
           
protected  void visitNext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xcmis.search.QueryObjectModelVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 

Field Detail

strategy

protected final QueryObjectModelVisitor strategy
Constructor Detail

Visitors.NavigationVisitor

protected Visitors.NavigationVisitor(QueryObjectModelVisitor strategy)
Create a visitor that walks all query objects.

Parameters:
strategy - the visitor that should be called at every node.
Method Detail

enqueue

protected final void enqueue(Iterable<? extends QueryElement> objectsToBeVisited)

enqueue

protected final void enqueue(QueryElement objectToBeVisited)

visitNext

protected final void visitNext()
                        throws VisitException
Throws:
VisitException


Copyright © 2010 eXo Platform SAS. All Rights Reserved.