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)
Deprecated.
use
containsTag(String) instead |
boolean |
containsTag(String tagName)
verify if a node contains a tag
|
List<QueryNode> |
getChildren()
get Children nodes
|
QueryNode |
getParent() |
Object |
getTag(CharSequence tagName)
Deprecated.
use
getTag(String) instead |
Object |
getTag(String tagName) |
Map<String,Object> |
getTagMap()
Returns a map containing all tags attached to this query node.
|
Map<CharSequence,Object> |
getTags()
Deprecated.
use
getTagMap() instead |
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)
Deprecated.
use
setTag(String, Object) instead |
void |
setTag(String 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)
Deprecated.
use
unsetTag(String) |
void |
unsetTag(String tagName)
Unset a tag. tagName will be converted to lowercase.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toQueryString
public static final String PLAINTEXT_FIELD_NAME
protected boolean toQueryStringIgnoreFields
protected void allocate()
public boolean isLeaf()
QueryNode
public QueryNode cloneTree() throws CloneNotSupportedException
QueryNode
cloneTree
in interface QueryNode
CloneNotSupportedException
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
protected void setLeaf(boolean isLeaf)
public final List<QueryNode> getChildren()
QueryNode
getChildren
in interface QueryNode
@Deprecated public void setTag(CharSequence tagName, Object value)
setTag(String, Object)
insteadQueryNode
public void setTag(String tagName, Object value)
QueryNode
public void unsetTag(String tagName)
QueryNode
@Deprecated public void unsetTag(CharSequence tagName)
unsetTag(String)
QueryNode
@Deprecated public boolean containsTag(CharSequence tagName)
containsTag(String)
insteadcontainsTag
in interface QueryNode
public boolean containsTag(String tagName)
containsTag
in interface QueryNode
@Deprecated public Object getTag(CharSequence tagName)
getTag(String)
insteadprotected boolean isRoot()
protected boolean isDefaultField(CharSequence fld)
fld
- - field namepublic String toString()
toString
in interface QueryNode
toString
in class Object
QueryNode.toString()
@Deprecated public Map<CharSequence,Object> getTags()
getTagMap()
insteadQueryNode
getTags
in interface QueryNode
QueryNode.getTag(String)