|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.queryParser.core.nodes.QueryNodeImpl org.apache.lucene.queryParser.core.nodes.PathQueryNode
public class PathQueryNode
A PathQueryNode
is used to store queries like
/company/USA/California /product/shoes/brown. QueryText are objects that
contain the text, begin position and end position in the query.
Example how the text parser creates these objects:
List values = ArrayList(); values.add(new PathQueryNode.QueryText("company", 1, 7)); values.add(new PathQueryNode.QueryText("USA", 9, 12)); values.add(new PathQueryNode.QueryText("California", 14, 23)); QueryNode q = new PathQueryNode(values);
Nested Class Summary | |
---|---|
static class |
PathQueryNode.QueryText
|
Field Summary |
---|
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl |
---|
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields |
Constructor Summary | |
---|---|
PathQueryNode(List<PathQueryNode.QueryText> pathElements)
|
Method Summary | |
---|---|
QueryNode |
cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method |
CharSequence |
getFirstPathElement()
Returns the CharSequence value of a specific QueryText element |
PathQueryNode.QueryText |
getPathElement(int index)
Returns the a specific QueryText element |
List<PathQueryNode.QueryText> |
getPathElements()
Returns the a List with all QueryText elements |
List<PathQueryNode.QueryText> |
getPathElements(int startIndex)
Returns a List QueryText element from position startIndex |
void |
setPathElements(List<PathQueryNode.QueryText> elements)
Returns the a List with all QueryText elements |
CharSequence |
toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser |
String |
toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode: |
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl |
---|
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PathQueryNode(List<PathQueryNode.QueryText> pathElements)
pathElements
- - List of QueryText objectsMethod Detail |
---|
public List<PathQueryNode.QueryText> getPathElements()
public void setPathElements(List<PathQueryNode.QueryText> elements)
public PathQueryNode.QueryText getPathElement(int index)
public CharSequence getFirstPathElement()
public List<PathQueryNode.QueryText> getPathElements(int startIndex)
public CharSequence toQueryString(EscapeQuerySyntax escaper)
QueryNode
public String toString()
QueryNodeImpl
toString
in interface QueryNode
toString
in class QueryNodeImpl
QueryNode.toString()
public QueryNode cloneTree() throws CloneNotSupportedException
QueryNode
cloneTree
in interface QueryNode
cloneTree
in class QueryNodeImpl
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |