|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.gouv.culture.sdx.utils.AbstractSdxObject fr.gouv.culture.sdx.documentbase.IndexParameters
public class IndexParameters
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 |
---|
public static final java.lang.String CLASS_NAME_SUFFIX
public static final int SAME_ID_REPLACE
public static final int SAME_ID_ERROR
public static final int SAME_ID_IGNORE
public static final int SAME_ID_REFRESH_SHARED_DOCUMENT
protected int attachedDocumentSameId
protected int subDocumentSameId
public static final int SEND_STATS_EVENTS
public static final int SEND_ERRORS_EVENTS
public static final int SEND_ALL_EVENTS
Constructor Detail |
---|
public IndexParameters()
These values are :
public IndexParameters(int sameId)
Other parameters are the defaults.
sameId
- A code to tell how documents with same ids are handled.public IndexParameters(int sameId, boolean handleAttachedDocuments, boolean handleTabularData)
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 |
---|
public void setSameId(int sameId)
public int handleSameId()
public void setAttachedDocumentSameId(int attachedDocumentSameId)
public int handleAttachedDocumentSameId()
public void setSubDocumentSameId(int subDocumentSameId)
public int handleSubDocumentSameId()
public boolean handleAttachedDocuments()
public boolean handleTabularData()
public void toSAX(org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXException
toSAX
in interface org.apache.excalibur.xml.sax.XMLizable
toSAX
in class AbstractSdxObject
handler
- The handler where to send the events.
org.xml.sax.SAXException
public org.apache.avalon.framework.parameters.Parameters getPipelineParams()
public void setPipelineParams(org.apache.avalon.framework.parameters.Parameters pipelineParams)
pipelineParams
- The pipeline parameterspublic User getUser()
public void setUser(User user) throws SDXException
user
- The user
SDXException
public Pipeline getPipeline()
public void setPipeline(Pipeline pipe)
pipe
- The desired Pipeline for indexationpublic int getBatchMax()
public void setBatchMax(int batchMax)
public boolean isSaveOriginalDocument()
public void setSaveOriginalDocument(boolean saveOriginalDocument)
public int getSendIndexationEvents()
public void setSendIndexationEvents(int sendIndexationEvents)
protected java.lang.String getClassNameSuffix()
AbstractSdxObject
getClassNameSuffix
in class AbstractSdxObject
protected boolean initToSax()
AbstractSdxObject
initToSax
in class AbstractSdxObject
protected void initVolatileObjectsToSax()
initVolatileObjectsToSax
in class AbstractSdxObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |