Class QueryNodeProcessorPipeline
- java.lang.Object
-
- org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline
-
- All Implemented Interfaces:
Iterable<QueryNodeProcessor>,Collection<QueryNodeProcessor>,List<QueryNodeProcessor>,QueryNodeProcessor
- Direct Known Subclasses:
StandardQueryNodeProcessorPipeline
public class QueryNodeProcessorPipeline extends Object implements QueryNodeProcessor, List<QueryNodeProcessor>
AQueryNodeProcessorPipelineclass should be used to build a query node processor pipeline.When a query node tree is processed using this class, it passes the query node tree to each processor on the pipeline and the result from each processor is passed to the next one, always following the order the processors were on the pipeline.
When a
QueryConfigHandlerobject is set on aQueryNodeProcessorPipeline, it also takes care of setting thisQueryConfigHandleron all processor on pipeline.
-
-
Constructor Summary
Constructors Constructor Description QueryNodeProcessorPipeline()Constructs an empty query node processor pipeline.QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler)Constructs with aQueryConfigHandlerobject.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
QueryNodeProcessorPipeline
public QueryNodeProcessorPipeline()
Constructs an empty query node processor pipeline.
-
QueryNodeProcessorPipeline
public QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler)
Constructs with aQueryConfigHandlerobject.
-
-
Method Detail
-
getQueryConfigHandler
public QueryConfigHandler getQueryConfigHandler()
For reference about this method check:QueryNodeProcessor.getQueryConfigHandler().- Specified by:
getQueryConfigHandlerin interfaceQueryNodeProcessor- Returns:
- QueryConfigHandler the query configuration handler to be set.
- See Also:
QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler),QueryConfigHandler
-
process
public QueryNode process(QueryNode queryTree) throws QueryNodeException
For reference about this method check:QueryNodeProcessor.process(QueryNode).- Specified by:
processin interfaceQueryNodeProcessor- Parameters:
queryTree- the query node tree to be processed- Returns:
- the processed query tree
- Throws:
QueryNodeException- if something goes wrong during the query node processing- See Also:
QueryNode
-
setQueryConfigHandler
public void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
For reference about this method check:QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).- Specified by:
setQueryConfigHandlerin interfaceQueryNodeProcessor- Parameters:
queryConfigHandler- the query configuration handler to be set.- See Also:
QueryNodeProcessor.getQueryConfigHandler(),QueryConfigHandler
-
add
public boolean add(QueryNodeProcessor processor)
- Specified by:
addin interfaceCollection<QueryNodeProcessor>- Specified by:
addin interfaceList<QueryNodeProcessor>- See Also:
List.add(Object)
-
add
public void add(int index, QueryNodeProcessor processor)- Specified by:
addin interfaceList<QueryNodeProcessor>- See Also:
List.add(int, Object)
-
addAll
public boolean addAll(Collection<? extends QueryNodeProcessor> c)
- Specified by:
addAllin interfaceCollection<QueryNodeProcessor>- Specified by:
addAllin interfaceList<QueryNodeProcessor>- See Also:
List.addAll(Collection)
-
addAll
public boolean addAll(int index, Collection<? extends QueryNodeProcessor> c)- Specified by:
addAllin interfaceList<QueryNodeProcessor>- See Also:
List.addAll(int, Collection)
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<QueryNodeProcessor>- Specified by:
clearin interfaceList<QueryNodeProcessor>- See Also:
List.clear()
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<QueryNodeProcessor>- Specified by:
containsin interfaceList<QueryNodeProcessor>- See Also:
List.contains(Object)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<QueryNodeProcessor>- Specified by:
containsAllin interfaceList<QueryNodeProcessor>- See Also:
List.containsAll(Collection)
-
get
public QueryNodeProcessor get(int index)
- Specified by:
getin interfaceList<QueryNodeProcessor>- See Also:
List.get(int)
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOfin interfaceList<QueryNodeProcessor>- See Also:
List.indexOf(Object)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<QueryNodeProcessor>- Specified by:
isEmptyin interfaceList<QueryNodeProcessor>- See Also:
List.isEmpty()
-
iterator
public Iterator<QueryNodeProcessor> iterator()
- Specified by:
iteratorin interfaceCollection<QueryNodeProcessor>- Specified by:
iteratorin interfaceIterable<QueryNodeProcessor>- Specified by:
iteratorin interfaceList<QueryNodeProcessor>- See Also:
List.iterator()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<QueryNodeProcessor>- See Also:
List.lastIndexOf(Object)
-
listIterator
public ListIterator<QueryNodeProcessor> listIterator()
- Specified by:
listIteratorin interfaceList<QueryNodeProcessor>- See Also:
List.listIterator()
-
listIterator
public ListIterator<QueryNodeProcessor> listIterator(int index)
- Specified by:
listIteratorin interfaceList<QueryNodeProcessor>- See Also:
List.listIterator(int)
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<QueryNodeProcessor>- Specified by:
removein interfaceList<QueryNodeProcessor>- See Also:
List.remove(Object)
-
remove
public QueryNodeProcessor remove(int index)
- Specified by:
removein interfaceList<QueryNodeProcessor>- See Also:
List.remove(int)
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<QueryNodeProcessor>- Specified by:
removeAllin interfaceList<QueryNodeProcessor>- See Also:
List.removeAll(Collection)
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<QueryNodeProcessor>- Specified by:
retainAllin interfaceList<QueryNodeProcessor>- See Also:
List.retainAll(Collection)
-
set
public QueryNodeProcessor set(int index, QueryNodeProcessor processor)
- Specified by:
setin interfaceList<QueryNodeProcessor>- See Also:
List.set(int, Object)
-
size
public int size()
- Specified by:
sizein interfaceCollection<QueryNodeProcessor>- Specified by:
sizein interfaceList<QueryNodeProcessor>- See Also:
List.size()
-
subList
public List<QueryNodeProcessor> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceList<QueryNodeProcessor>- See Also:
List.subList(int, int)
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArrayin interfaceCollection<QueryNodeProcessor>- Specified by:
toArrayin interfaceList<QueryNodeProcessor>- See Also:
List.toArray(Object[])
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<QueryNodeProcessor>- Specified by:
toArrayin interfaceList<QueryNodeProcessor>- See Also:
List.toArray()
-
-