Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.sdx.search.lucene.query
Class LinearComplexQueryBuilder

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
              fr.gouv.culture.sdx.search.lucene.query.ComplexQuery
                  fr.gouv.culture.sdx.search.lucene.query.LinearComplexQueryBuilder

All Implemented Interfaces:
  Query, Describable, Encodable, Identifiable, Localizable, SdxObject, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.xml.sax.XMLizable

    public class LinearComplexQueryBuilder

extends ComplexQuery

Helper class to build a ComplexQuery from a series of search criterias.

Nested Class Summary

Nested classes/interfaces inherited from interface fr.gouv.culture.sdx.utils.SdxObject
`SdxObject.ConfigurationNode`

Field Summary

Fields inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
`baseOperator, baseQuery, baseResults, cachedQuery, filter, luceneQuery, queryText, searchLocations, sortSpecification`

Fields inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`_configuration, _context, _description, _encoding, _id, _locale, _logger, _manager, _xmlizable_objects, _xmlLang, isToSaxInitialized`

Fields inherited from interface fr.gouv.culture.sdx.search.lucene.query.Query
`defaultOperator, LUCENE_BOOLEAN_QUERY_MAX_CLAUSES, OPERATOR_AND, OPERATOR_NOT, OPERATOR_OR, SEARCH_ENGINE`

Fields inherited from interface fr.gouv.culture.sdx.search.Query
`CLASS_NAME_SUFFIX`

Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable
`DEFAULT_ENCODING`

Constructor Summary
`LinearComplexQueryBuilder()`

Method Summary
`void` | `addQuery(Query q)` Adds a query linked to the previous one by an OR.
`void` | `addQuery(Query q, int op)` Adds a query.
`static void` | `main(java.lang.String[] args)` Used for command line testing.

Methods inherited from class fr.gouv.culture.sdx.search.lucene.query.ComplexQuery
`addComponent, getBoost, prepare, removeLastComponent, setBoost, setUp, size, toSAX`

Methods inherited from class fr.gouv.culture.sdx.search.lucene.query.AbstractQuery
`addAttributesLucene, addAttributesText, addBaseQuery, addBaseQuery, addFilter, addSortSpecification, execute, getCachedQuery, getClassNameSuffix, getLuceneQuery, getOperator, getSearchLocations, initToSax, initVolatileObjectsToSax, setBoost, setLuceneQuery, setSearchLocations, setUp, setUp`

Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`configure, configureDescription, contextualize, enableLogging, getBaseAttributes, getConfiguration, getContext, getDescription, getEncoding, getId, getLocale, getLog, getServiceManager, getXmlLang, service, setDescription, setEncoding, setId, setLocale, setUpSdxObject, setUpSdxObject, setXmlLang, verifyConfigurationResources`

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
`getLog`

Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
`enableLogging`

Methods inherited from interface org.apache.avalon.framework.context.Contextualizable
`contextualize`

Methods inherited from interface org.apache.avalon.framework.service.Serviceable
`service`

Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
`configure`

Methods inherited from interface fr.gouv.culture.sdx.utils.Identifiable
`getId, setId`

Methods inherited from interface fr.gouv.culture.sdx.utils.Describable
`getDescription, setDescription`

Methods inherited from interface fr.gouv.culture.sdx.utils.Encodable
`getEncoding, setEncoding`

Methods inherited from interface fr.gouv.culture.sdx.utils.Localizable
`getLocale, getXmlLang, setLocale, setXmlLang`

Constructor Detail

### LinearComplexQueryBuilder

    public LinearComplexQueryBuilder()

Method Detail

### addQuery

    public void addQuery(Query q)
                  throws SDXException

  Adds a query linked to the previous one by an OR.

  Parameters:
    `q` -
  Throws:
    `SDXException`

### addQuery

    public void addQuery(Query q,
                         int op)
                  throws SDXException

  Adds a query. If it is the first query added, we will always consider an OR operator.

  Parameters:
    `q` - The query to add
    `op` - The operator linking this query to the previous one
  Throws:
    `SDXException`

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Used for command line testing.

  Parameters:
    `args` - A list of search criterais such as "or|A not|B and|C and|D or|E"
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.