|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.queryparser.flexible.core.nodes.QueryNodeImpl
public abstract class QueryNodeImpl
A QueryNodeImpl is the default implementation of the interface
QueryNode
| Field Summary | |
|---|---|
static String |
PLAINTEXT_FIELD_NAME
|
protected boolean |
toQueryStringIgnoreFields
If set to true the the method toQueryString will not write field names |
| Constructor Summary | |
|---|---|
QueryNodeImpl()
|
|
| Method Summary | |
|---|---|
void |
add(List<QueryNode> children)
|
void |
add(QueryNode child)
|
protected void |
allocate()
|
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. |
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(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. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
|---|
toQueryString |
| Field Detail |
|---|
public static final String PLAINTEXT_FIELD_NAME
protected boolean toQueryStringIgnoreFields
| Constructor Detail |
|---|
public QueryNodeImpl()
| Method Detail |
|---|
protected void allocate()
public final void add(QueryNode child)
add in interface QueryNodepublic final void add(List<QueryNode> children)
add in interface QueryNodepublic boolean isLeaf()
QueryNode
isLeaf in interface QueryNodepublic final void set(List<QueryNode> children)
set in interface QueryNode
public QueryNode cloneTree()
throws CloneNotSupportedException
QueryNode
cloneTree in interface QueryNodeCloneNotSupportedException
public QueryNode clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionprotected void setLeaf(boolean isLeaf)
public final List<QueryNode> getChildren()
QueryNode
getChildren in interface QueryNode
public void setTag(String tagName,
Object value)
QueryNode
setTag in interface QueryNodepublic void unsetTag(String tagName)
QueryNode
unsetTag in interface QueryNodepublic boolean containsTag(String tagName)
containsTag in interface QueryNodepublic Object getTag(String tagName)
QueryNode
getTag in interface QueryNodepublic QueryNode getParent()
getParent in interface QueryNodeprotected boolean isRoot()
protected boolean isDefaultField(CharSequence fld)
fld - - field name
public String toString()
toString in interface QueryNodetoString in class ObjectQueryNode.toString()public Map<String,Object> getTagMap()
getTagMap in interface QueryNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||