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 TermInfo

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.search.lucene.query.TermInfo

All Implemented Interfaces:
  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 TermInfo

extends AbstractSdxObject

Information regarding a term of a search index

Nested Class Summary

Nested classes/interfaces inherited from interface 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
`TermInfo()` Creates this object A super.getLog() must be set and then this TermInfo must be setUp.

Method Summary
`java.lang.String` | `getAppId()` Returns an application id.
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`java.lang.String` | `getContent()` Returns the content of the term.
`java.lang.String` | `getDbId()` Returns a document base id.
`int` | `getDocFrequency()` Returns the number of documents in which the term is found.
`java.lang.String` | `getDocId()` Returns a document id.
`java.lang.String` | `getField()` Returns the field name for this term.
`org.apache.lucene.index.Term` | `getTerm()` Returns the Lucene term.
`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
`void` | `setAppId(java.lang.String appId)`
`void` | `setDbId(java.lang.String dbId)`
`void` | `setDocId(java.lang.String docId)`
`void` | `setUp(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term)` Builds the TermInfo from an index reader and a term.
`void` | `setUp(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term, int nb)` Builds an object from a filtered term.
`void` | `setUp(java.lang.String field, java.lang.String value)` Builds the TermInfo from an index reader and a term.
`void` | `update(org.apache.lucene.index.IndexReader r, org.apache.lucene.index.Term t)` Updates the information from a new occurrence of a term (in another document base usually).
`void` | `update(java.lang.String field, java.lang.String value)` Updates the information from a new occurrence of a term (in another document base usually).

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

### TermInfo

    public TermInfo()

  Creates this object

  A super.getLog() must be set and then this TermInfo must be setUp.

  See Also:
    `AbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)`, `setUp(java.lang.String, java.lang.String)`

Method Detail

### setUp

    public void setUp(java.lang.String field,
                      java.lang.String value)
               throws SDXException

  Builds the TermInfo from an index reader and a term.

  Parameters:
    `field` - The field name.
    `value` - The value.
  Throws:
    `SDXException`

### setUp

    public void setUp(org.apache.lucene.index.IndexReader reader,
                      org.apache.lucene.index.Term term)
               throws SDXException

  Builds the TermInfo from an index reader and a term.

  Parameters:
    `reader` - The index reader.
    `term` - The Lucene term.
  Throws:
    `SDXException`

### setUp

    public void setUp(org.apache.lucene.index.IndexReader reader,
                      org.apache.lucene.index.Term term,
                      int nb)
               throws SDXException

  Builds an object from a filtered term.

  Parameters:
    `reader` - The index reader.
    `term` - The Lucene term.
    `nb` - The number of documents.
  Throws:
    `SDXException`

### setDocId

    public void setDocId(java.lang.String docId)

### setDbId

    public void setDbId(java.lang.String dbId)

### setAppId

    public void setAppId(java.lang.String appId)

### getDocFrequency

    public int getDocFrequency()

  Returns the number of documents in which the term is found.

### getField

    public java.lang.String getField()

  Returns the field name for this term.

### getContent

    public java.lang.String getContent()

  Returns the content of the term.

### getTerm

    public org.apache.lucene.index.Term getTerm()

  Returns the Lucene term.

### getDocId

    public java.lang.String getDocId()

  Returns a document id.

### getDbId

    public java.lang.String getDbId()

  Returns a document base id.

### getAppId

    public java.lang.String getAppId()

  Returns an application id.

### update

    public void update(org.apache.lucene.index.IndexReader r,
                       org.apache.lucene.index.Term t)

  Updates the information from a new occurrence of a term (in another document base usually).

  Parameters:
    `r` - The index reader.
    `t` - The Lucene term.

### update

    public void update(java.lang.String field,
                       java.lang.String value)

  Updates the information from a new occurrence of a term (in another document base usually).

  Parameters:
    `field` - The field name.
    `value` - The value.

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