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>
AQueryNodeProcessorPipeline
class 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
QueryConfigHandler
object is set on aQueryNodeProcessorPipeline
, it also takes care of setting thisQueryConfigHandler
on all processor on pipeline.
-
-
Constructor Summary
Constructors Constructor Description QueryNodeProcessorPipeline()
Constructs an empty query node processor pipeline.QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler)
Constructs with aQueryConfigHandler
object.
-
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 aQueryConfigHandler
object.
-
-
Method Detail
-
getQueryConfigHandler
public QueryConfigHandler getQueryConfigHandler()
For reference about this method check:QueryNodeProcessor.getQueryConfigHandler()
.- Specified by:
getQueryConfigHandler
in 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:
process
in 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:
setQueryConfigHandler
in interfaceQueryNodeProcessor
- Parameters:
queryConfigHandler
- the query configuration handler to be set.- See Also:
QueryNodeProcessor.getQueryConfigHandler()
,QueryConfigHandler
-
add
public boolean add(QueryNodeProcessor processor)
- Specified by:
add
in interfaceCollection<QueryNodeProcessor>
- Specified by:
add
in interfaceList<QueryNodeProcessor>
- See Also:
List.add(Object)
-
add
public void add(int index, QueryNodeProcessor processor)
- Specified by:
add
in interfaceList<QueryNodeProcessor>
- See Also:
List.add(int, Object)
-
addAll
public boolean addAll(Collection<? extends QueryNodeProcessor> c)
- Specified by:
addAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
addAll
in interfaceList<QueryNodeProcessor>
- See Also:
List.addAll(Collection)
-
addAll
public boolean addAll(int index, Collection<? extends QueryNodeProcessor> c)
- Specified by:
addAll
in interfaceList<QueryNodeProcessor>
- See Also:
List.addAll(int, Collection)
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<QueryNodeProcessor>
- Specified by:
clear
in interfaceList<QueryNodeProcessor>
- See Also:
List.clear()
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<QueryNodeProcessor>
- Specified by:
contains
in interfaceList<QueryNodeProcessor>
- See Also:
List.contains(Object)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
containsAll
in interfaceList<QueryNodeProcessor>
- See Also:
List.containsAll(Collection)
-
get
public QueryNodeProcessor get(int index)
- Specified by:
get
in interfaceList<QueryNodeProcessor>
- See Also:
List.get(int)
-
indexOf
public int indexOf(Object o)
- Specified by:
indexOf
in interfaceList<QueryNodeProcessor>
- See Also:
List.indexOf(Object)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<QueryNodeProcessor>
- Specified by:
isEmpty
in interfaceList<QueryNodeProcessor>
- See Also:
List.isEmpty()
-
iterator
public Iterator<QueryNodeProcessor> iterator()
- Specified by:
iterator
in interfaceCollection<QueryNodeProcessor>
- Specified by:
iterator
in interfaceIterable<QueryNodeProcessor>
- Specified by:
iterator
in interfaceList<QueryNodeProcessor>
- See Also:
List.iterator()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<QueryNodeProcessor>
- See Also:
List.lastIndexOf(Object)
-
listIterator
public ListIterator<QueryNodeProcessor> listIterator()
- Specified by:
listIterator
in interfaceList<QueryNodeProcessor>
- See Also:
List.listIterator()
-
listIterator
public ListIterator<QueryNodeProcessor> listIterator(int index)
- Specified by:
listIterator
in interfaceList<QueryNodeProcessor>
- See Also:
List.listIterator(int)
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<QueryNodeProcessor>
- Specified by:
remove
in interfaceList<QueryNodeProcessor>
- See Also:
List.remove(Object)
-
remove
public QueryNodeProcessor remove(int index)
- Specified by:
remove
in interfaceList<QueryNodeProcessor>
- See Also:
List.remove(int)
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
removeAll
in interfaceList<QueryNodeProcessor>
- See Also:
List.removeAll(Collection)
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
retainAll
in interfaceList<QueryNodeProcessor>
- See Also:
List.retainAll(Collection)
-
set
public QueryNodeProcessor set(int index, QueryNodeProcessor processor)
- Specified by:
set
in interfaceList<QueryNodeProcessor>
- See Also:
List.set(int, Object)
-
size
public int size()
- Specified by:
size
in interfaceCollection<QueryNodeProcessor>
- Specified by:
size
in interfaceList<QueryNodeProcessor>
- See Also:
List.size()
-
subList
public List<QueryNodeProcessor> subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfaceList<QueryNodeProcessor>
- See Also:
List.subList(int, int)
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArray
in interfaceCollection<QueryNodeProcessor>
- Specified by:
toArray
in interfaceList<QueryNodeProcessor>
- See Also:
List.toArray(Object[])
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<QueryNodeProcessor>
- Specified by:
toArray
in interfaceList<QueryNodeProcessor>
- See Also:
List.toArray()
-
-