|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.gouv.culture.sdx.utils.SdxObjectImpl
fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
fr.gouv.culture.sdx.search.lucene.query.ComplexQuery
A complex boolean query, reprenseted as a tree.
Any boolean query can be represented by a complex query. It is made of search criterias linked with a boolean operator. All criterias are themselves any type of Lucene query, so the model is recursive.
Field Summary |
Fields inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery |
baseOperator, baseQuery, baseResults, filter, luceneQuery, queryText, searchLocations, sortSpecification |
Fields inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
encoding, logger |
Fields inherited from interface fr.gouv.culture.sdx.search.lucene.query.Query |
defaultOperator, OPERATOR_AND, OPERATOR_NOT, OPERATOR_OR, SEARCH_ENGINE |
Constructor Summary | |
ComplexQuery()
Creates a query A logger must be set and then this query must be setUp. |
Method Summary | |
void |
addComponent(Query component)
Adds a component to this query. |
AbstractFilter |
prepare()
Prepares the query to make it executable. |
void |
setUp(SearchLocations sLocs,
int operator)
Builds a complex query for an index using an operator. |
int |
size()
Returns the number of components for this query. |
void |
toSAX(org.xml.sax.ContentHandler hdl)
Formats this query in XML. |
Methods inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery |
addAttributesLucene, addAttributesText, addBaseQuery, addBaseQuery, addFilter, addSortSpecification, enableLogging, execute, getLuceneQuery, getOperator, getSearchLocations, setLuceneQuery, setSearchLocations, setUp, setUp |
Methods inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
getChildLogger, setEncoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject |
setEncoding |
Constructor Detail |
public ComplexQuery()
A logger must be set and then this query must be setUp.
AbstractQuery.enableLogging(org.apache.avalon.framework.logger.Logger)
,
setUp(fr.gouv.culture.sdx.search.lucene.query.SearchLocations, int)
Method Detail |
public void setUp(SearchLocations sLocs, int operator) throws SDXException
sLocs
- The SearchLocations object (indices to be searched).operator
- The operator linking the components.
SDXException
public AbstractFilter prepare()
This method will basically call the prepare methods of its components and merge the filters.
prepare
in interface Query
prepare
in class AbstractQuery
public void addComponent(Query component)
component
- The component to add.public int size()
public void toSAX(org.xml.sax.ContentHandler hdl) throws org.xml.sax.SAXException, org.apache.cocoon.ProcessingException
toSAX
in interface Query
toSAX
in class AbstractQuery
hdl
- The content handler that will receive the events.
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |