org.apache.lucene.queryParser.standard.processors
public class ParametricRangeQueryNodeProcessor extends QueryNodeProcessorImpl
ParametricRangeQueryNode
objects to
RangeQueryNode
objects. It reads the lower and upper bounds value
from the ParametricRangeQueryNode
object and try to parse their
values using a DateFormat
. If the values cannot be parsed to a date
value, it will only create the RangeQueryNode
using the non-parsed
values. LocaleAttribute
is defined in the QueryConfigHandler
it
will be used to parse the date, otherwise Locale.getDefault()
will be
used. DateResolutionAttribute
is defined and the DateTools.Resolution
is
not null
it will also be used to parse the date value. RangeCollatorAttribute
from the QueryConfigHandler
. If a RangeCollatorAttribute
is
found and the Collator
is not null
, it's set on the
RangeQueryNode
. Constructor and Description |
---|
ParametricRangeQueryNodeProcessor() |
Modifier and Type | Method and Description |
---|---|
protected QueryNode |
postProcessNode(QueryNode node)
This method is invoked for every node when walking up the tree.
|
protected QueryNode |
preProcessNode(QueryNode node)
This method is invoked for every node when walking down the tree.
|
protected java.util.List<QueryNode> |
setChildrenOrder(java.util.List<QueryNode> children)
This method is invoked for every node that has at least on child.
|
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
protected QueryNode postProcessNode(QueryNode node) throws QueryNodeException
QueryNodeProcessorImpl
postProcessNode
in class QueryNodeProcessorImpl
node
- node the query node to be post-processedQueryNodeException
- if something goes wrong during the query node processingprotected QueryNode preProcessNode(QueryNode node) throws QueryNodeException
QueryNodeProcessorImpl
preProcessNode
in class QueryNodeProcessorImpl
node
- the query node to be pre-processedQueryNodeException
- if something goes wrong during the query node processingprotected java.util.List<QueryNode> setChildrenOrder(java.util.List<QueryNode> children) throws QueryNodeException
QueryNodeProcessorImpl
QueryNodeProcessorImpl.postProcessNode(QueryNode)
is invoked.setChildrenOrder
in class QueryNodeProcessorImpl
children
- the list containing all current node's childrenQueryNodeException
- if something goes wrong during the query node processingCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.