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
Class FieldList

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

All Implemented Interfaces:
  Describable, Encodable, Identifiable, Localizable, SdxObject, java.lang.Cloneable, 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 FieldList

extends AbstractSdxObject
implements java.lang.Cloneable

Definition of fields for a document base.

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
`FieldList()` This object is used for indexing; it contains a list of fields for a DocumentBase object and contains defaults for fields that do not specify indexing information.

Method Summary
`void` | `add(Field field)` Adds a field to the list
`void` | `addInternalFields(org.apache.avalon.framework.configuration.Configuration conf)` Adds the internal fields defined in sdx.xconf to the list to allow searching using these fields
`java.lang.Object` | `clone()` Returns a clone of this FieldsDef.
`void` | `configure(org.apache.avalon.framework.configuration.Configuration configuration)` Sets the configuration options for the field definition.
`void` | `configureFields(org.apache.avalon.framework.configuration.Configuration configuration)`
`Analyzer` | `getAnalyzer()` Provides access to the analyzer for the field definition.
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`Field` | `getDefaultField()` Returns the default search field.
`Field` | `getField(java.lang.String name)` Returns a field given a field name.
`java.util.Enumeration` | `getFields()` Returns all fields in the FieldList
`int` | `getFieldType(java.lang.String name)` Returns the field type.
`java.util.Locale` | `getLocale(java.lang.String name)` Returns a locale for a given field.
`org.apache.lucene.document.Field` | `getLuceneField(Property prop)` Gets a Lucene field from a property.
`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

Methods inherited from class fr.gouv.culture.sdx.utils.AbstractSdxObject
`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
`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

### FieldList

    public FieldList()

  This object is used for indexing; it contains a list of fields for a DocumentBase object and contains defaults for fields that do not specify indexing information.

Method Detail

### configure

    public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
                   throws org.apache.avalon.framework.configuration.ConfigurationException

  Sets the configuration options for the field definition.

  Specified by:
    `configure` in interface `org.apache.avalon.framework.configuration.Configurable`
  Overrides:
    `configure` in class `AbstractSdxObject`
  Parameters:
    `configuration` - The configuration object from which to build the field definition.
  Throws:
    `org.apache.avalon.framework.configuration.ConfigurationException`

### configureFields

    public void configureFields(org.apache.avalon.framework.configuration.Configuration configuration)
                         throws org.apache.avalon.framework.configuration.ConfigurationException

  Throws:
    `org.apache.avalon.framework.configuration.ConfigurationException`

### addInternalFields

    public void addInternalFields(org.apache.avalon.framework.configuration.Configuration conf)
                           throws SDXException,
                                  org.apache.avalon.framework.configuration.ConfigurationException

  Adds the internal fields defined in sdx.xconf to the list to allow searching using these fields

  Parameters:
    `conf` - The configuration object containing the list of internal fields
  Throws:
    `SDXException`
    `org.apache.avalon.framework.configuration.ConfigurationException`

### getAnalyzer

    public Analyzer getAnalyzer()

  Provides access to the analyzer for the field definition.

  Returns:
    The analyzer for the field definition.

### getDefaultField

    public Field getDefaultField()

  Returns the default search field.

### getFieldType

    public int getFieldType(java.lang.String name)

  Returns the field type.

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

### add

    public void add(Field field)
             throws SDXException

  Adds a field to the list

  Parameters:
    `field` - The field to add.
  Throws:
    `SDXException`

### getLuceneField

    public org.apache.lucene.document.Field getLuceneField(Property prop)
                                                    throws SDXException

  Gets a Lucene field from a property.

  Parameters:
    `prop` - The property from which the field will be dervived
  Throws:
    `SDXException`

### getField

    public Field getField(java.lang.String name)

  Returns a field given a field name.

  Parameters:
    `name` - The field name

### getLocale

    public java.util.Locale getLocale(java.lang.String name)

  Returns a locale for a given field.

### getFields

    public java.util.Enumeration getFields()

  Returns all fields in the FieldList

### clone

    public java.lang.Object clone()

  Returns a clone of this FieldsDef.

  Overrides:
    `clone` in class `java.lang.Object`

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