Interface QueryNode
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
FieldableNode,FieldValuePairQueryNode<T>,RangeQueryNode<T>,ValueQueryNode<T>
- All Known Implementing Classes:
AbstractRangeQueryNode,AndQueryNode,AnyQueryNode,BooleanModifierNode,BooleanQueryNode,BoostQueryNode,DeletedQueryNode,FieldQueryNode,FuzzyQueryNode,GroupQueryNode,MatchAllDocsQueryNode,MatchNoDocsQueryNode,ModifierQueryNode,MultiPhraseQueryNode,NoTokenFoundQueryNode,NumericQueryNode,NumericRangeQueryNode,OpaqueQueryNode,OrQueryNode,ParametricQueryNode,ParametricRangeQueryNode,PathQueryNode,PhraseSlopQueryNode,PrefixWildcardQueryNode,ProximityQueryNode,QueryNodeImpl,QuotedFieldQueryNode,RangeQueryNode,SlopQueryNode,StandardBooleanQueryNode,TermRangeQueryNode,TokenizedPhraseQueryNode,WildcardQueryNode
public interface QueryNode extends Serializable
AQueryNodeis a interface implemented by all nodes on a QueryNode tree.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidadd(List<QueryNode> children)voidadd(QueryNode child)QueryNodecloneTree()Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() methodbooleancontainsTag(CharSequence tagName)Deprecated.usecontainsTag(String)insteadbooleancontainsTag(String tagName)verify if a node contains a tagList<QueryNode>getChildren()get Children nodesQueryNodegetParent()ObjectgetTag(CharSequence tagName)Deprecated.usegetTag(String)insteadObjectgetTag(String tagName)Map<String,Object>getTagMap()Returns a map containing all tags attached to this query node.Map<CharSequence,Object>getTags()Deprecated.usegetTagMap()booleanisLeaf()verify if a node is a Leaf nodevoidset(List<QueryNode> children)voidsetTag(CharSequence tagName, Object value)Deprecated.usesetTag(String, Object)insteadvoidsetTag(String tagName, Object value)Associate the specified value with the specified tagName.CharSequencetoQueryString(EscapeQuerySyntax escapeSyntaxParser)convert to a query string understood by the query parserStringtoString()for printingvoidunsetTag(CharSequence tagName)Deprecated.useunsetTag(String)insteadvoidunsetTag(String tagName)Unset a tag.
-
-
-
Method Detail
-
toQueryString
CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
-
isLeaf
boolean isLeaf()
verify if a node is a Leaf node
-
containsTag
boolean containsTag(String tagName)
verify if a node contains a tag
-
containsTag
@Deprecated boolean containsTag(CharSequence tagName)
Deprecated.usecontainsTag(String)insteadverify if a node contains a tag
-
getTag
Object getTag(String tagName)
- Parameters:
tagName-- Returns:
- of stored on under that tag name
-
getTag
@Deprecated Object getTag(CharSequence tagName)
Deprecated.usegetTag(String)instead- Parameters:
tagName-- Returns:
- of stored on under that tag name
-
getParent
QueryNode getParent()
-
cloneTree
QueryNode cloneTree() throws CloneNotSupportedException
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method- Returns:
- the cloned tree
- Throws:
CloneNotSupportedException
-
add
void add(QueryNode child)
-
setTag
void setTag(String tagName, Object value)
Associate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.- Parameters:
tagName-value-
-
setTag
@Deprecated void setTag(CharSequence tagName, Object value)
Deprecated.usesetTag(String, Object)insteadAssociate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.- Parameters:
tagName-value-
-
unsetTag
void unsetTag(String tagName)
Unset a tag. tagName will be converted to lowercase.- Parameters:
tagName-
-
unsetTag
@Deprecated void unsetTag(CharSequence tagName)
Deprecated.useunsetTag(String)insteadUnset a tag. tagName will be converted to lowercase.- Parameters:
tagName-
-
getTags
@Deprecated Map<CharSequence,Object> getTags()
Deprecated.usegetTagMap()Returns a map containing all tags attached to this query node.- Returns:
- a map containing all tags attached to this query node
-
-