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.documentbase
Class IndexParameters

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.documentbase.IndexParameters

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

Direct Known Subclasses:
  LuceneIndexParameters

    public class IndexParameters

extends AbstractSdxObject

Parameters governing the way documents are added to a document base.

This class contains some basic information needed when a document is added to a document base. Information such as whether the document must replace another document with the same id or if attached documents should be handled or not.

Nested Class Summary

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

Field Summary
`protected int` | `attachedDocumentSameId` Refresh the physical attached document if one with the same id already exists.
`static java.lang.String` | `CLASS_NAME_SUFFIX`
`static int` | `SAME_ID_ERROR` Throws an error if a document with same id exists.
`static int` | `SAME_ID_IGNORE` Silently ignore a document if one with the same id already exists.
`static int` | `SAME_ID_REFRESH_SHARED_DOCUMENT`
`static int` | `SAME_ID_REPLACE` Replaces a document with the same id.
`static int` | `SEND_ALL_EVENTS` The sendIndexation events parameter indicating ALL events are desired after indexation
`static int` | `SEND_ERRORS_EVENTS` The sendIndexation events parameter indicating that error and stats events are only desired after indexation
`static int` | `SEND_STATS_EVENTS` The sendIndexation events parameter indicating that stats events are only desired after indexation
`protected int` | `subDocumentSameId` Refresh the sub document if one with the same id already exists.

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
`IndexParameters()` Creates parameters with default values.
`IndexParameters(int sameId)` Creates parameters with a given replace value.
`IndexParameters(int sameId, boolean handleAttachedDocuments, boolean handleTabularData)` Creates parameters with specified values.

Method Summary
`int` | `getBatchMax()` Returns the property of this object indicating the maximum number of documents to index from a batch at one time (default is 25)
`protected java.lang.String` | `getClassNameSuffix()` Sub classes should element this method to return their class name suffix for SAX output
`Pipeline` | `getPipeline()` Gets the desired indexation pipeline
`org.apache.avalon.framework.parameters.Parameters` | `getPipelineParams()` Sets the parameters for the pipeline
`int` | `getSendIndexationEvents()`
`User` | `getUser()` Gets the user for this indexation parameter
`boolean` | `handleAttachedDocuments()` Returns whether attached documents must be handled.
`int` | `handleAttachedDocumentSameId()` Returns a code that says how documents with same ids are handled.
`int` | `handleSameId()` Returns a code that says how documents with same ids are handled.
`int` | `handleSubDocumentSameId()` Returns a code that says how documents with same ids are handled.
`boolean` | `handleTabularData()` Returns whether tabular data must be handled.
`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
`boolean` | `isSaveOriginalDocument()`
`void` | `setAttachedDocumentSameId(int attachedDocumentSameId)`
`void` | `setBatchMax(int batchMax)` Sets the property of this object indicating the maximum number of documents to index from a batch at one time (default is 25)
`void` | `setPipeline(Pipeline pipe)` Sets the desired indexation pipeline
`void` | `setPipelineParams(org.apache.avalon.framework.parameters.Parameters pipelineParams)` Set's the parameters for the pipeline
`void` | `setSameId(int sameId)`
`void` | `setSaveOriginalDocument(boolean saveOriginalDocument)`
`void` | `setSendIndexationEvents(int sendIndexationEvents)`
`void` | `setSubDocumentSameId(int subDocumentSameId)`
`void` | `setUser(User user)` Sets the user for this indexation parameter
`void` | `toSAX(org.xml.sax.ContentHandler handler)` Sends an XML representation of these parameters.

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, 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

### SAME_ID_REPLACE

    public static final int SAME_ID_REPLACE

  Replaces a document with the same id.

  See Also:
    Constant Field Values

### SAME_ID_ERROR

    public static final int SAME_ID_ERROR

  Throws an error if a document with same id exists.

  See Also:
    Constant Field Values

### SAME_ID_IGNORE

    public static final int SAME_ID_IGNORE

  Silently ignore a document if one with the same id already exists.

  See Also:
    Constant Field Values

### SAME_ID_REFRESH_SHARED_DOCUMENT

    public static final int SAME_ID_REFRESH_SHARED_DOCUMENT

See Also:
  Constant Field Values

### attachedDocumentSameId

    protected int attachedDocumentSameId

  Refresh the physical attached document if one with the same id already exists.

### subDocumentSameId

    protected int subDocumentSameId

  Refresh the sub document if one with the same id already exists.

### SEND_STATS_EVENTS

    public static final int SEND_STATS_EVENTS

  The sendIndexation events parameter indicating that stats events are only desired after indexation

  See Also:
    Constant Field Values

### SEND_ERRORS_EVENTS

    public static final int SEND_ERRORS_EVENTS

  The sendIndexation events parameter indicating that error and stats events are only desired after indexation

  See Also:
    Constant Field Values

### SEND_ALL_EVENTS

    public static final int SEND_ALL_EVENTS

  The sendIndexation events parameter indicating ALL events are desired after indexation

  See Also:
    Constant Field Values

Constructor Detail

### IndexParameters

    public IndexParameters()

  Creates parameters with default values.

  These values are :

  - Documents with same id are replaced
  - Attached documents are handled
  - Tabular values are handled

### IndexParameters

    public IndexParameters(int sameId)

  Creates parameters with a given replace value.

  Other parameters are the defaults.

  Parameters:
    `sameId` - A code to tell how documents with same ids are handled.

### IndexParameters

    public IndexParameters(int sameId,
                           boolean handleAttachedDocuments,
                           boolean handleTabularData)

  Creates parameters with specified values.

  Parameters:
    `sameId` - A code to tell how documents with same ids are handled.
    `handleAttachedDocuments` - Whether to handle attached documents or not.
    `handleTabularData` - Whether to handle tabular data or not.

Method Detail

### setSameId

    public void setSameId(int sameId)

### handleSameId

    public int handleSameId()

  Returns a code that says how documents with same ids are handled.

### setAttachedDocumentSameId

    public void setAttachedDocumentSameId(int attachedDocumentSameId)

### handleAttachedDocumentSameId

    public int handleAttachedDocumentSameId()

  Returns a code that says how documents with same ids are handled.

### setSubDocumentSameId

    public void setSubDocumentSameId(int subDocumentSameId)

### handleSubDocumentSameId

    public int handleSubDocumentSameId()

  Returns a code that says how documents with same ids are handled.

### handleAttachedDocuments

    public boolean handleAttachedDocuments()

  Returns whether attached documents must be handled.

### handleTabularData

    public boolean handleTabularData()

  Returns whether tabular data must be handled.

### toSAX

    public void toSAX(org.xml.sax.ContentHandler handler)
               throws org.xml.sax.SAXException

  Sends an XML representation of these parameters.

  Specified by:
    `toSAX` in interface `org.apache.excalibur.xml.sax.XMLizable`
  Overrides:
    `toSAX` in class `AbstractSdxObject`
  Parameters:
    `handler` - The handler where to send the events.
  Throws:
    `org.xml.sax.SAXException`

### getPipelineParams

    public org.apache.avalon.framework.parameters.Parameters getPipelineParams()

  Sets the parameters for the pipeline

  Returns:
    The parameters for the pipeline, null if none set

### setPipelineParams

    public void setPipelineParams(org.apache.avalon.framework.parameters.Parameters pipelineParams)

  Set's the parameters for the pipeline

  Parameters:
    `pipelineParams` - The pipeline parameters

### getUser

    public User getUser()

  Gets the user for this indexation parameter

  Returns:
    The sdx user

### setUser

    public void setUser(User user)
                 throws SDXException

  Sets the user for this indexation parameter

  Parameters:
    `user` - The user
  Throws:
    `SDXException`

### getPipeline

    public Pipeline getPipeline()

  Gets the desired indexation pipeline

  Returns:

### setPipeline

    public void setPipeline(Pipeline pipe)

  Sets the desired indexation pipeline

  Parameters:
    `pipe` - The desired Pipeline for indexation

### getBatchMax

    public int getBatchMax()

  Returns the property of this object indicating the maximum number of documents to index from a batch at one time (default is 25)

  Returns:
    The number of documents per batch

### setBatchMax

    public void setBatchMax(int batchMax)

  Sets the property of this object indicating the maximum number of documents to index from a batch at one time (default is 25)

### isSaveOriginalDocument

    public boolean isSaveOriginalDocument()

### setSaveOriginalDocument

    public void setSaveOriginalDocument(boolean saveOriginalDocument)

### getSendIndexationEvents

    public int getSendIndexationEvents()

### setSendIndexationEvents

    public void setSendIndexationEvents(int sendIndexationEvents)

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