lux.xpath
Class SearchCall

java.lang.Object
  extended by lux.xpath.AbstractExpression
      extended by lux.xpath.FunCall
          extended by lux.xpath.SearchCall
All Implemented Interfaces:
Visitable

public class SearchCall
extends FunCall

A special search function call; this holds a query that is used to accumulate constraints while optimizing. The function arguments are inferred from the supplied XPathQuery so as to result in the same query when evaluated at run time.


Nested Class Summary
 
Nested classes/interfaces inherited from class lux.xpath.AbstractExpression
AbstractExpression.Type
 
Field Summary
 
Fields inherited from class lux.xpath.FunCall
FN_COLLECTION, FN_CONTAINS, FN_COUNT, FN_DATA, FN_EMPTY, FN_EXISTS, FN_LAST, FN_NAMESPACE, FN_NOT, FN_ROOT, FN_STRING_JOIN, FN_SUBSEQUENCE, LastExpression, LOCAL_NAMESPACE, LUX_COUNT, LUX_EXISTS, LUX_FIELD_VALUES, LUX_NAMESPACE, LUX_SEARCH, XS_NAMESPACE
 
Fields inherited from class lux.xpath.AbstractExpression
subs, sup
 
Constructor Summary
SearchCall(AbstractExpression abstractExpression)
          used to convert a generic lux:search FunCall into a SearchCall
SearchCall(XPathQuery query, IndexConfiguration config)
          creates a call to lux:search that encodes information provided by the optimizer, enabling combination with additional filters and sorting criteria
 
Method Summary
 void combineQuery(XPathQuery additionalQuery, IndexConfiguration config)
           
 XPathQuery getQuery()
           
 SearchCall getRoot()
           
 boolean isFnCollection()
           
 void setFnCollection(boolean isFnCollection)
           
 
Methods inherited from class lux.xpath.FunCall
accept, getLastContextStep, getName, getPrecedence, getReturnType, isDocumentOrdered, setArguments, toString
 
Methods inherited from class lux.xpath.AbstractExpression
acceptSubs, appendSub, getBindingContext, getSubs, getSuper, getTail, getType, isAbsolute, replaceRoot, setSubs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchCall

public SearchCall(XPathQuery query,
                  IndexConfiguration config)
creates a call to lux:search that encodes information provided by the optimizer, enabling combination with additional filters and sorting criteria

Parameters:
query - containing the information compiled by the optimizer
config - used to determine the default field name

SearchCall

public SearchCall(AbstractExpression abstractExpression)
used to convert a generic lux:search FunCall into a SearchCall

Parameters:
abstractExpression - the query, as a string to be parsed by LuxQueryParser, or as a node to be parsed by XmlQueryParser.
Method Detail

combineQuery

public void combineQuery(XPathQuery additionalQuery,
                         IndexConfiguration config)

isFnCollection

public boolean isFnCollection()
Returns:
whether this function call will be represented by fn:collection("lux:" + query)

setFnCollection

public void setFnCollection(boolean isFnCollection)

getRoot

public SearchCall getRoot()
Overrides:
getRoot in class FunCall
Returns:
the root of this expression: this will either be a Root(/), a function returning document nodes, or null.

getQuery

public XPathQuery getQuery()


Copyright © 2013. All Rights Reserved.