This is a default implementation for the {@link QueryNodeProcessor}interface, it's an abstract class, so it should be extended by classes that want to process a {@link QueryNode} tree.
This class process {@link QueryNode}s from left to right in the tree. While it's walking down the tree, for every node, {@link #preProcessNode(QueryNode)} is invoked. After a node's children areprocessed, {@link #postProcessNode(QueryNode)} is invoked for that node.{@link #setChildrenOrder(List)} is invoked before{@link #postProcessNode(QueryNode)} only if the node has at least one child,in {@link #setChildrenOrder(List)} the implementor might redefine thechildren order or remove any children from the children list.
Here is an example about how it process the nodes:
a / \ b e / \ c dHere is the order the methods would be invoked for the tree described above:
preProcessNode( a ); preProcessNode( b ); preProcessNode( c ); postProcessNode( c ); preProcessNode( d ); postProcessNode( d ); setChildrenOrder( bChildrenList ); postProcessNode( b ); preProcessNode( e ); postProcessNode( e ); setChildrenOrder( aChildrenList ); postProcessNode( a )@see org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessor
|
|