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.thesaurus
Class LuceneQueryExpander

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.thesaurus.LuceneQueryExpander

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

public class LuceneQueryExpander
extends AbstractSdxObject

Created by IntelliJ IDEA. User: rpandey Date: Jan 7, 2003 Time: 2:01:56 PM To change this template use Options | File Templates.

Nested Class Summary

Nested classes inherited from class fr.gouv.culture.sdx.utils.SdxObject
`SdxObject.ConfigurationNode`

Field Summary
`static java.lang.String` | `CLASS_NAME_SUFFIX`

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.utils.Encodable
`DEFAULT_ENCODING`

Constructor Summary
`LuceneQueryExpander()`

Method Summary
`org.apache.lucene.search.Query` | `expandQuery(Query query, int[] relations, int depth, java.lang.String[] langs)`
`org.apache.lucene.search.Query` | `expandQuery(Query query, java.lang.String fieldName, int[] relations, int depth, java.lang.String[] langs)`
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`protected boolean` | `initToSax()` Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML
`protected void` | `initVolatileObjectsToSax()` Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called
`protected org.apache.lucene.search.Query` | `rebuildQuery(org.apache.lucene.search.Query origQuery, java.lang.String field, int[] relations, int depth, java.lang.String[] langs)` TODO: this method is too big and dirty.
`void` | `setUp(SDXThesaurus lt)`

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, toSAX, verifyConfigurationResources`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CLASS_NAME_SUFFIX

    public static final java.lang.String CLASS_NAME_SUFFIX

See Also:
  Constant Field Values

Constructor Detail

### LuceneQueryExpander

    public LuceneQueryExpander()

Method Detail

### setUp

    public void setUp(SDXThesaurus lt)

### expandQuery

    public org.apache.lucene.search.Query expandQuery(Query query,
                                                      int[] relations,
                                                      int depth,
                                                      java.lang.String[] langs)
                                               throws SDXException

  Throws:
    `SDXException`

### expandQuery

    public org.apache.lucene.search.Query expandQuery(Query query,
                                                      java.lang.String fieldName,
                                                      int[] relations,
                                                      int depth,
                                                      java.lang.String[] langs)
                                               throws SDXException

  Throws:
    `SDXException`

### rebuildQuery

    protected org.apache.lucene.search.Query rebuildQuery(org.apache.lucene.search.Query origQuery,
                                                          java.lang.String field,
                                                          int[] relations,
                                                          int depth,
                                                          java.lang.String[] langs)
                                                   throws SDXException

  TODO: this method is too big and dirty. refactoring points 1) query analysis should be done externally (in another method) i) terms lists should be derived externally and passed in ii) queries should be cloned in a smarter fashion

  Parameters:
    `origQuery` -
    `field` -
    `relations` -
    `depth` -
    `langs` -
  Returns:
  Throws:
    `SDXException`

### getClassNameSuffix

    protected java.lang.String getClassNameSuffix()

  Description copied from class: `AbstractSdxObject`
  Sub classes should element this method to return their class name suffix for SAX output

  Specified by:
    `getClassNameSuffix` in class `AbstractSdxObject`

### initToSax

    protected boolean initToSax()

  Description copied from class: `AbstractSdxObject`
  Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML

  Specified by:
    `initToSax` in class `AbstractSdxObject`

### initVolatileObjectsToSax

    protected void initVolatileObjectsToSax()

  Init the LinkedHashMap _xmlizable_volatile_objects with the objects in order to describ them in XML Some objects need to be refresh each time a toSAX is called

  Specified by:
    `initVolatileObjectsToSax` in class `AbstractSdxObject`

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-2003 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.