public abstract class QueryNodeImpl extends Object implements QueryNode, Cloneable
QueryNodeImpl is the default implementation of the interface
QueryNode| Modifier and Type | Field and Description |
|---|---|
static String |
PLAINTEXT_FIELD_NAME |
protected boolean |
toQueryStringIgnoreFields
If set to true the the method toQueryString will not write field names
|
| Constructor and Description |
|---|
QueryNodeImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(List<QueryNode> children) |
void |
add(QueryNode child) |
protected void |
allocate() |
Object |
clone() |
QueryNode |
cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree
when you call the cloneTree() method
|
boolean |
containsTag(CharSequence tagName)
verify if a node contains a tag
|
List<QueryNode> |
getChildren()
get Children nodes
|
QueryNode |
getParent() |
Object |
getTag(CharSequence tagName) |
Map<CharSequence,Object> |
getTags() |
protected boolean |
isDefaultField(CharSequence fld)
This method is use toQueryString to detect if fld is the default field
|
boolean |
isLeaf()
verify if a node is a Leaf node
|
protected boolean |
isRoot() |
void |
set(List<QueryNode> children) |
protected void |
setLeaf(boolean isLeaf) |
void |
setTag(CharSequence tagName,
Object value)
Associate the specified value with the specified tagName.
|
String |
toString()
Every implementation of this class should return pseudo xml like this:
For FieldQueryNode:
|
void |
unsetTag(CharSequence tagName)
Unset a tag.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittoQueryStringpublic static final String PLAINTEXT_FIELD_NAME
protected boolean toQueryStringIgnoreFields
protected void allocate()
public boolean isLeaf()
QueryNodepublic QueryNode cloneTree() throws CloneNotSupportedException
QueryNodecloneTree in interface QueryNodeCloneNotSupportedExceptionpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionprotected void setLeaf(boolean isLeaf)
public final List<QueryNode> getChildren()
QueryNodegetChildren in interface QueryNodepublic void setTag(CharSequence tagName, Object value)
QueryNodepublic void unsetTag(CharSequence tagName)
QueryNodepublic boolean containsTag(CharSequence tagName)
QueryNodecontainsTag in interface QueryNodepublic Object getTag(CharSequence tagName)
protected boolean isRoot()
protected boolean isDefaultField(CharSequence fld)
fld - - field namepublic String toString()
toString in interface QueryNodetoString in class ObjectQueryNode.toString()public Map<CharSequence,Object> getTags()
getTags in interface QueryNodeQueryNode.getTag(CharSequence)Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.