Save This Page
Home » lucene-3.0.1-src » org.apache.lucene.queryParser.core.nodes » [javadoc | source]
org.apache.lucene.queryParser.core.nodes
public class: PathQueryNode [javadoc | source]
java.lang.Object
   org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
      org.apache.lucene.queryParser.core.nodes.PathQueryNode

All Implemented Interfaces:
    Cloneable, QueryNode

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:
public static class  PathQueryNode.QueryText   
Fields inherited from org.apache.lucene.queryParser.core.nodes.QueryNodeImpl:
PLAINTEXT_FIELD_NAME,  toQueryStringIgnoreFields
Constructor:
 public PathQueryNode(List<QueryText> pathElements) 
    Parameters:
    pathElements - - List of QueryText objects
Method from org.apache.lucene.queryParser.core.nodes.PathQueryNode Summary:
cloneTree,   getFirstPathElement,   getPathElement,   getPathElements,   getPathElements,   setPathElements,   toQueryString,   toString
Methods from org.apache.lucene.queryParser.core.nodes.QueryNodeImpl:
add,   add,   allocate,   clone,   cloneTree,   containsTag,   getChildren,   getParent,   getTag,   getTags,   isDefaultField,   isLeaf,   isRoot,   set,   setLeaf,   setTag,   toString,   unsetTag
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.queryParser.core.nodes.PathQueryNode Detail:
 public QueryNode cloneTree() throws CloneNotSupportedException 
 public CharSequence getFirstPathElement() 
    Returns the CharSequence value of a specific QueryText element
 public QueryText getPathElement(int index) 
    Returns the a specific QueryText element
 public List<QueryText> getPathElements() 
    Returns the a List with all QueryText elements
 public List<QueryText> getPathElements(int startIndex) 
    Returns a List QueryText element from position startIndex
 public  void setPathElements(List<QueryText> elements) 
    Returns the a List with all QueryText elements
 public CharSequence toQueryString(EscapeQuerySyntax escaper) 
 public String toString()