fr.gouv.culture.sdx.search.lucene.query
Class TermInfo

java.lang.Object
  extended byfr.gouv.culture.sdx.search.lucene.query.TermInfo
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled

public class TermInfo
extends java.lang.Object
implements org.apache.avalon.framework.logger.LogEnabled

Information regarding a term of a search index


Constructor Summary
TermInfo()
          Creates this object A logger must be set and then this TermInfo must be setUp.
 
Method Summary
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
          Sets the logger.
 java.lang.String getAppId()
          Returns an application id.
 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.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TermInfo

public TermInfo()
Creates this object

A logger must be set and then this TermInfo must be setUp.

See Also:
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.


enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Sets the logger.

Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled
Parameters:
logger - The logger.

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.


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