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>
A
QueryNodeProcessorPipeline
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 a QueryNodeProcessorPipeline
, it
also takes care of setting this QueryConfigHandler
on all processor on pipeline.
-
Constructor Summary
ConstructorDescriptionConstructs an empty query node processor pipeline.QueryNodeProcessorPipeline
(QueryConfigHandler queryConfigHandler) Constructs with aQueryConfigHandler
object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int index, QueryNodeProcessor processor) boolean
add
(QueryNodeProcessor processor) boolean
addAll
(int index, Collection<? extends QueryNodeProcessor> c) boolean
addAll
(Collection<? extends QueryNodeProcessor> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) get
(int index) For reference about this method check:QueryNodeProcessor.getQueryConfigHandler()
.int
boolean
isEmpty()
iterator()
int
listIterator
(int index) For reference about this method check:QueryNodeProcessor.process(QueryNode)
.remove
(int index) boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) set
(int index, QueryNodeProcessor processor) void
setQueryConfigHandler
(QueryConfigHandler queryConfigHandler) For reference about this method check:QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler)
.int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] array) 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 Details
-
QueryNodeProcessorPipeline
public QueryNodeProcessorPipeline()Constructs an empty query node processor pipeline. -
QueryNodeProcessorPipeline
Constructs with aQueryConfigHandler
object.
-
-
Method Details
-
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:
-
process
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:
-
setQueryConfigHandler
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:
-
add
- Specified by:
add
in interfaceCollection<QueryNodeProcessor>
- Specified by:
add
in interfaceList<QueryNodeProcessor>
- See Also:
-
add
- Specified by:
add
in interfaceList<QueryNodeProcessor>
- See Also:
-
addAll
- Specified by:
addAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
addAll
in interfaceList<QueryNodeProcessor>
- See Also:
-
addAll
- Specified by:
addAll
in interfaceList<QueryNodeProcessor>
- See Also:
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<QueryNodeProcessor>
- Specified by:
clear
in interfaceList<QueryNodeProcessor>
- See Also:
-
contains
- Specified by:
contains
in interfaceCollection<QueryNodeProcessor>
- Specified by:
contains
in interfaceList<QueryNodeProcessor>
- See Also:
-
containsAll
- Specified by:
containsAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
containsAll
in interfaceList<QueryNodeProcessor>
- See Also:
-
get
- Specified by:
get
in interfaceList<QueryNodeProcessor>
- See Also:
-
indexOf
- Specified by:
indexOf
in interfaceList<QueryNodeProcessor>
- See Also:
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<QueryNodeProcessor>
- Specified by:
isEmpty
in interfaceList<QueryNodeProcessor>
- See Also:
-
iterator
- Specified by:
iterator
in interfaceCollection<QueryNodeProcessor>
- Specified by:
iterator
in interfaceIterable<QueryNodeProcessor>
- Specified by:
iterator
in interfaceList<QueryNodeProcessor>
- See Also:
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<QueryNodeProcessor>
- See Also:
-
listIterator
- Specified by:
listIterator
in interfaceList<QueryNodeProcessor>
- See Also:
-
listIterator
- Specified by:
listIterator
in interfaceList<QueryNodeProcessor>
- See Also:
-
remove
- Specified by:
remove
in interfaceCollection<QueryNodeProcessor>
- Specified by:
remove
in interfaceList<QueryNodeProcessor>
- See Also:
-
remove
- Specified by:
remove
in interfaceList<QueryNodeProcessor>
- See Also:
-
removeAll
- Specified by:
removeAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
removeAll
in interfaceList<QueryNodeProcessor>
- See Also:
-
retainAll
- Specified by:
retainAll
in interfaceCollection<QueryNodeProcessor>
- Specified by:
retainAll
in interfaceList<QueryNodeProcessor>
- See Also:
-
set
- Specified by:
set
in interfaceList<QueryNodeProcessor>
- See Also:
-
size
public int size()- Specified by:
size
in interfaceCollection<QueryNodeProcessor>
- Specified by:
size
in interfaceList<QueryNodeProcessor>
- See Also:
-
subList
- Specified by:
subList
in interfaceList<QueryNodeProcessor>
- See Also:
-
toArray
public <T> T[] toArray(T[] array) - Specified by:
toArray
in interfaceCollection<QueryNodeProcessor>
- Specified by:
toArray
in interfaceList<QueryNodeProcessor>
- See Also:
-
toArray
- Specified by:
toArray
in interfaceCollection<QueryNodeProcessor>
- Specified by:
toArray
in interfaceList<QueryNodeProcessor>
- See Also:
-