|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
org.apache.lucene.queryparser.flexible.standard.nodes.AbstractRangeQueryNode<T>
T - the type of the range query bounds (lower and upper)public class AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>>
This class should be extended by nodes intending to represent range queries.
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl |
|---|
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields |
| Constructor Summary | |
|---|---|
protected |
AbstractRangeQueryNode()
Constructs an AbstractRangeQueryNode, it should be invoked only by
its extenders. |
| Method Summary | |
|---|---|
CharSequence |
getField()
Returns the field associated with this node. |
T |
getLowerBound()
Returns the lower bound node. |
T |
getUpperBound()
Returns the upper bound node. |
boolean |
isLowerInclusive()
Returns whether the lower bound is inclusive or exclusive. |
boolean |
isUpperInclusive()
Returns whether the upper bound is inclusive or exclusive. |
void |
setBounds(T lower,
T upper,
boolean lowerInclusive,
boolean upperInclusive)
Sets the lower and upper bounds. |
void |
setField(CharSequence fieldName)
Sets the field associated with this node. |
CharSequence |
toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser |
String |
toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/> |
| Methods inherited from class org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl |
|---|
add, add, allocate, clone, cloneTree, containsTag, getChildren, getParent, getTag, getTagMap, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, unsetTag |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
|---|
add, add, cloneTree, containsTag, getChildren, getParent, getTag, getTagMap, isLeaf, set, setTag, unsetTag |
| Constructor Detail |
|---|
protected AbstractRangeQueryNode()
AbstractRangeQueryNode, it should be invoked only by
its extenders.
| Method Detail |
|---|
public CharSequence getField()
getField in interface FieldableNodeFieldableNodepublic void setField(CharSequence fieldName)
setField in interface FieldableNodefieldName - the field associated with this nodepublic T getLowerBound()
getLowerBound in interface RangeQueryNode<FieldValuePairQueryNode<?>>public T getUpperBound()
getUpperBound in interface RangeQueryNode<FieldValuePairQueryNode<?>>public boolean isLowerInclusive()
isLowerInclusive in interface RangeQueryNode<FieldValuePairQueryNode<?>>true if the lower bound is inclusive, otherwise, falsepublic boolean isUpperInclusive()
isUpperInclusive in interface RangeQueryNode<FieldValuePairQueryNode<?>>true if the upper bound is inclusive, otherwise, false
public void setBounds(T lower,
T upper,
boolean lowerInclusive,
boolean upperInclusive)
lower - the lower bound, null if lower bound is openupper - the upper bound, null if upper bound is openlowerInclusive - true if the lower bound is inclusive, otherwise, falseupperInclusive - true if the upper bound is inclusive, otherwise, falsegetLowerBound(),
getUpperBound(),
isLowerInclusive(),
isUpperInclusive()public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
QueryNode
toQueryString in interface QueryNodepublic String toString()
QueryNodeImpl
toString in interface QueryNodetoString in class QueryNodeImplQueryNode.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||