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 ResultDocument

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

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 ResultDocument

extends AbstractSdxObject
implements org.apache.avalon.framework.logger.LogEnabled

A result document of a search.

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
`ResultDocument()` Creates a ResultDocument object A super.getLog() must be set and then this object must be setUp.

Method Summary
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`org.apache.lucene.document.Document` | `getDocument()` Returns the Lucene document associated with this result.
`java.lang.String` | `getFieldValue(java.lang.String field)` Returns the value of a field within this document.
`float` | `getScore()` Returns the relavance ranking for this document.
`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` | `setUp(org.apache.lucene.document.Document doc, float score)` Builds a ResultDocument with a Lucene document and a relavance ranking.

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`

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

Field Detail

### CLASS_NAME_SUFFIX

    public static final java.lang.String CLASS_NAME_SUFFIX

See Also:
  Constant Field Values

Constructor Detail

### ResultDocument

    public ResultDocument()

  Creates a ResultDocument object

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

  See Also:
    `AbstractSdxObject.enableLogging(org.apache.avalon.framework.logger.Logger)`, `setUp(org.apache.lucene.document.Document, float)`

Method Detail

### setUp

    public void setUp(org.apache.lucene.document.Document doc,
                      float score)
               throws SDXException

  Builds a ResultDocument with a Lucene document and a relavance ranking.

  Parameters:
    `doc` - The Lucene document
    `score` - The relavance ranking
  Throws:
    `SDXException`

### getFieldValue

    public java.lang.String getFieldValue(java.lang.String field)

  Returns the value of a field within this document. This method never returns `null`, it will turn over a `null` String if the field does not exist.

  Parameters:
    `field` - The name of the field.

### getScore

    public float getScore()

  Returns the relavance ranking for this document.

### getDocument

    public org.apache.lucene.document.Document getDocument()

  Returns the Lucene document associated with this result.

### 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.