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.utils.lucene
Class LuceneDataField

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.utils.database.Property
              fr.gouv.culture.sdx.utils.lucene.LuceneDataField

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 LuceneDataField

extends Property

Nested Class Summary

Nested classes/interfaces inherited from interface fr.gouv.culture.sdx.utils.SdxObject
`SdxObject.ConfigurationNode`

Field Summary
`static int` | `DATE` Field type "date".
`static int` | `FIELD` Field type "field"
`static java.lang.String` | `FIELD_TYPE_DATE` String representation of the field type.
`static java.lang.String` | `FIELD_TYPE_FIELD` String representation of the field type.
`static java.lang.String` | `FIELD_TYPE_UNINDEXED` String representation of the field type.
`static java.lang.String` | `FIELD_TYPE_WORD` String representation of the field type.
`protected int` | `fieldType` Le type de champ dont il s'agit.
`protected boolean` | `inBrief` Indique s'il doit etre retourne dans la liste des resultats.
`protected org.apache.lucene.document.Field.Store` | `store`
`static int` | `UNINDEXED` Field type "unindexed".
`static int` | `WORD` Field type "word".

Fields inherited from class fr.gouv.culture.sdx.utils.database.Property
`CLASS_NAME_SUFFIX, firstValue, name, values`

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
`LuceneDataField()`

Method Summary
`org.apache.lucene.document.Field` | `getLuceneField(java.lang.String content)` Returns the Lucene field for the search field.
`java.lang.String` | `getTypeName()` Returns the type Name of the field.
`void` | `setFieldType(boolean store, boolean index, boolean token)`
`void` | `setFieldType(java.lang.String type)` Sets the type for this field
`void` | `setStore(boolean _store)`

Methods inherited from class fr.gouv.culture.sdx.utils.database.Property
`addValue, attemptToSetFirstValue, containsValue, deleteValue, getClassNameSuffix, getName, getValue, getValues, initToSax, initVolatileObjectsToSax, resetValues, setName, setValues`

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

### fieldType

    protected int fieldType

  Le type de champ dont il s'agit.

### inBrief

    protected boolean inBrief

  Indique s'il doit etre retourne dans la liste des resultats.

### store

    protected org.apache.lucene.document.Field.Store store

### FIELD_TYPE_WORD

    public static final java.lang.String FIELD_TYPE_WORD

  String representation of the field type.

  See Also:
    Constant Field Values

### FIELD_TYPE_FIELD

    public static final java.lang.String FIELD_TYPE_FIELD

  String representation of the field type.

  See Also:
    Constant Field Values

### FIELD_TYPE_DATE

    public static final java.lang.String FIELD_TYPE_DATE

  String representation of the field type.

  See Also:
    Constant Field Values

### FIELD_TYPE_UNINDEXED

    public static final java.lang.String FIELD_TYPE_UNINDEXED

  String representation of the field type.

  See Also:
    Constant Field Values

### WORD

    public static final int WORD

  Field type "word".

  See Also:
    Constant Field Values

### FIELD

    public static final int FIELD

  Field type "field"

  See Also:
    Constant Field Values

### DATE

    public static final int DATE

  Field type "date".

  See Also:
    Constant Field Values

### UNINDEXED

    public static final int UNINDEXED

  Field type "unindexed".

  See Also:
    Constant Field Values

Constructor Detail

### LuceneDataField

    public LuceneDataField()

Method Detail

### setFieldType

    public void setFieldType(java.lang.String type)

  Sets the type for this field

  Parameters:
    `type` - The field type as a string from our configuration object (element in app.xconf)

### setFieldType

    public void setFieldType(boolean store,
                             boolean index,
                             boolean token)

### getTypeName

    public java.lang.String getTypeName()

  Returns the type Name of the field.

### getLuceneField

    public org.apache.lucene.document.Field getLuceneField(java.lang.String content)

  Returns the Lucene field for the search field. In the case of a field of type "date", if the contents can be interpreted as a date it will be inserted this way, if not it will be inserted like a field of type "keyword".

  Parameters:
    `content` - The field's content.

### setStore

    public void setStore(boolean _store)

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.