Class QueryNodeImpl
java.lang.Object
org.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
- Direct Known Subclasses:
AbstractRangeQueryNode,BooleanQueryNode,BoostQueryNode,DeletedQueryNode,FieldQueryNode,GroupQueryNode,MatchAllDocsQueryNode,ModifierQueryNode,MultiPhraseQueryNode,NumericQueryNode,OpaqueQueryNode,PathQueryNode,PhraseSlopQueryNode,RegexpQueryNode,SlopQueryNode,TokenizedPhraseQueryNode
A
QueryNodeImpl is the default implementation of the interface
QueryNode-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal voidclone()Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() methodbooleancontainsTag(String tagName) verify if a node contains a tagget Children nodesReturns object stored under that tag nameReturns a map containing all tags attached to this query node.booleanisLeaf()verify if a node is a Leaf nodevoidRemoves this query node from its parent.final voidvoidAssociate the specified value with the specified tagName.toString()Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>voidUnset a tag.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.queryparser.flexible.core.nodes.QueryNode
toQueryString
-
Field Details
-
PLAINTEXT_FIELD_NAME
- See Also:
-
-
Constructor Details
-
QueryNodeImpl
public QueryNodeImpl()
-
-
Method Details
-
add
-
add
-
isLeaf
public boolean isLeaf()Description copied from interface:QueryNodeverify if a node is a Leaf node -
set
-
cloneTree
Description copied from interface:QueryNodeRecursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method- Specified by:
cloneTreein interfaceQueryNode- Returns:
- the cloned tree
- Throws:
CloneNotSupportedException
-
clone
- Throws:
CloneNotSupportedException
-
getChildren
Description copied from interface:QueryNodeget Children nodes- Specified by:
getChildrenin interfaceQueryNode- Returns:
- a List for QueryNode object. Returns null, for nodes that do not contain children. All leaf Nodes return null.
-
setTag
Description copied from interface:QueryNodeAssociate 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. -
unsetTag
Description copied from interface:QueryNodeUnset a tag. tagName will be converted to lowercase. -
containsTag
verify if a node contains a tag- Specified by:
containsTagin interfaceQueryNode
-
getTag
Description copied from interface:QueryNodeReturns object stored under that tag name -
getParent
-
toString
Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/> -
getTagMap
Returns a map containing all tags attached to this query node. -
removeFromParent
public void removeFromParent()Description copied from interface:QueryNodeRemoves this query node from its parent.- Specified by:
removeFromParentin interfaceQueryNode
-