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 |
| Constructor and Description |
|---|
QueryNodeImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(List<QueryNode> children) |
void |
add(QueryNode child) |
QueryNode |
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(String tagName)
verify if a node contains a tag
|
List<QueryNode> |
getChildren()
get Children nodes
|
QueryNode |
getParent() |
Object |
getTag(String tagName)
Returns object stored under that tag name
|
Map<String,Object> |
getTagMap()
Returns a map containing all tags attached to this query node.
|
boolean |
isLeaf()
verify if a node is a Leaf node
|
void |
removeFromParent()
Removes this query node from its parent.
|
void |
set(List<QueryNode> children) |
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: <field start='1' end='2' field='subject' text='foo'/>
|
void |
unsetTag(String tagName)
Unset a tag.
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, waittoQueryStringpublic static final String PLAINTEXT_FIELD_NAME
public boolean isLeaf()
QueryNodepublic QueryNode cloneTree() throws CloneNotSupportedException
QueryNodecloneTree in interface QueryNodeCloneNotSupportedExceptionpublic QueryNode clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic final List<QueryNode> getChildren()
QueryNodegetChildren in interface QueryNodepublic void setTag(String tagName, Object value)
QueryNodepublic void unsetTag(String tagName)
QueryNodepublic boolean containsTag(String tagName)
containsTag in interface QueryNodepublic Object getTag(String tagName)
QueryNodepublic String toString()
toString in interface QueryNodetoString in class ObjectQueryNode.toString()public Map<String,Object> getTagMap()
public void removeFromParent()
QueryNoderemoveFromParent in interface QueryNodeCopyright © 2010 - 2020 Adobe. All Rights Reserved