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 AbstractDocumentBase

    java.lang.Object
      fr.gouv.culture.sdx.utils.AbstractSdxObject
          fr.gouv.culture.sdx.utils.database.DatabaseBacked
              fr.gouv.culture.sdx.documentbase.AbstractDocumentBase

All Implemented Interfaces:
  DocumentBase, Searchable, Describable, Encodable, Identifiable, Localizable, Saveable, 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:
  SDXDocumentBase

    public abstract class AbstractDocumentBase

extends DatabaseBacked
implements DocumentBase

an abstract document base class handling most common behaviors

Nested Class Summary

Nested classes/interfaces inherited from interface fr.gouv.culture.sdx.documentbase.DocumentBase
`DocumentBase.ConfigurationNode`

Field Summary
`protected Pipeline` | `_indexationPipeline` The default indexation pipeline
`protected OAIHarvester` | `_oaiHarv` The oai harvester wrapper for this document base
`protected java.lang.String` | `ATTRIBUTE_AUTO_OPTIMIZE` Attribute needed to make a choice of optimization method
`protected java.lang.String` | `ATTRIBUTE_COMPOUND_FILES` Attribute required to specify the compound files format for indexation
`protected java.lang.String` | `ATTRIBUTE_SPLIT_DOC` Attribute used to fix the document limit per index before splitting it
`protected java.lang.String` | `ATTRIBUTE_SPLIT_SIZE` Attribute used to fix the size limit per index before splitting it
`protected java.lang.String` | `ATTRIBUTE_SPLIT_UNIT` Very optionnal attribute used to tell wich unit must be use with the size one to determine max index size
`protected java.lang.String` | `DBELEM_ATTRIBUTE_DEFAULT` The implied attribute stating whether the document base is to be used by default or not.
`protected static java.lang.String` | `DBELEM_ATTRIBUTE_HPP` The implied attribute stating whether the document base is to be used by default or not.
`protected java.lang.String` | `DBELEM_ATTRIBUTE_KEEP_ORIGINAL` The implied attribute stating whether original documents should be stored or not.
`protected static java.lang.String` | `DBELEM_ATTRIBUTE_MAXSORT` The implied attribute stating whether the document base is to be used by default or not.
`protected int` | `defaultHitsPerPage` Number of results per page.
`protected int` | `defaultMaxSort` Maximum number of results to sort.
`protected Repository` | `defaultRepository` The default repository for this document base.
`protected static java.lang.String` | `ELEMENT_NAME_INDEX_SPLIT` Index splitting condition meta name
`protected static java.lang.String` | `ELEMENT_NAME_OPTIMIZE` Element for cron configuration (optimization)
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDX_OAI_DELETED_RECORD`
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXALL` Internal field name for a *fixed* value field.
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXAPPID` Internal field name for application id.
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXCONTENTLENGTH` Internal field name for document length in bytes.
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXDBID` Internal field name for document base id.
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXDOCID` Internal field name for document ids
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXDOCTYPE` Internal field name for document type.
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXMODDATE` Internal field name for modification date.
`static java.lang.String` | `INTERNAL_FIELD_NAME_SDXREPOID` Internal field name for repository id.
`static java.lang.String` | `INTERNAL_SDXALL_FIELD_VALUE` Internal value for this field.
`protected boolean` | `isDefault` True if this document base is the default one in the application.
`protected java.util.Locale` | `locale` The locale for this document base (found either in the configuration file or by using `Locale.getDefault()`).
`protected OAIRepository` | `oaiRepo` The oai repository wrapper for this document base
`protected java.util.Hashtable` | `oaiRepositories` The OAI repositories for this document base
`protected java.lang.String` | `PROPERTY_NAME_ATTACHED` Internal fields for relationships between documents (kind of metadata required/proposed by SDX) //TODO : move them to a framework/application/relationship class ?
`protected static java.lang.String` | `PROPERTY_NAME_CONTENT_LENGTH`
`protected java.lang.String` | `PROPERTY_NAME_DOCTYPE` A constant for the path property for the type of document, Binary, HTML, or XML.
`protected static java.lang.String` | `PROPERTY_NAME_MIMETYPE` A constant for the path property for attached documents.
`protected java.lang.String` | `PROPERTY_NAME_ORIGINAL` Internal value for this field : an original document relationship.
`protected java.lang.String` | `PROPERTY_NAME_PARENT`
`protected static java.lang.String` | `PROPERTY_NAME_REPO` A constant for the repository property in the database entities.
`protected java.lang.String` | `PROPERTY_NAME_SUB` Internal value for this field : a sub-document document relationship.
`protected java.util.Hashtable` | `repoConnectionPool` A pool of connections to the repositories.
`protected java.util.Hashtable` | `repositories` The repositories that are owned by this document base.
`boolean` | `useMetadata` Metadata usage defaulted to true

Fields inherited from class fr.gouv.culture.sdx.utils.database.DatabaseBacked
`_database, CLASS_NAME_SUFFIX, DATABASE_DIR_NAME, databaseConf, dbLocation, dbPath, DEFAULT_DATABASE_TYPE`

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.documentbase.DocumentBase
`CLASS_NAME_SUFFIX, PACKAGE_QUALNAME`

Fields inherited from interface fr.gouv.culture.sdx.utils.Encodable
`DEFAULT_ENCODING`

Fields inherited from interface fr.gouv.culture.sdx.utils.save.Saveable
`ALL_SAVE_ATTRIB, PATH_ATTRIB, SAVE_DIRECTORY_PARAM`

Constructor Summary
`AbstractDocumentBase()`

Method Summary
`protected void` | `addOaiDeletedRecord(IndexableDocument doc)` Adds an indexable document to the list of the OAI deleted records.
`protected void` | `addOAIRepository(OAIRepository _repo, org.apache.avalon.framework.configuration.Configuration _conf, java.lang.String _repoid)` Adds an OAI repository to the repositories list.
`void` | `backup(SaveParameters save_config)` Save the DocumentBase data objects
`protected void` | `configurePipeline(org.apache.avalon.framework.configuration.Configuration configuration)`
`protected DatabaseEntity` | `createEntityForDocMetaData(Document doc, Repository repository, java.lang.String[] parentDocId)`
`OAIRepository` | `createOAIRepository()` Creates an OAIRepository for the documentbase
`OAIRepository` | `createOAIRepository(java.lang.String repo)` Creates an OAIRepository for the documentbase
`void` | `delete(Document doc, org.xml.sax.ContentHandler handler)` Deletes a document and any attached document(s) if not used by any other document(s).
`protected void` | `deletePhysicalDocument(Document doc, Repository repo, org.xml.sax.ContentHandler handler)` This method does a special delete.
`int` | `getDefaultHitsPerPage()` Returns the default number of results on page for this DocumentBase.
`int` | `getDefaultMaxSort()` Returns the default maximum number of results to sort for this DocumentBase.
`OAIRepository` | `getDefaultOAIRepository()` Returns the default OAI repository
`Repository` | `getDefaultRepository()` Returns the default repository for this document base.
`java.io.InputStream` | `getDocument(Document doc)` Does param checks for subclasses
`void` | `getDocument(Document doc, java.io.OutputStream os)` Does param checks for subclasses
`void` | `getDocument(ParsableDocument doc, org.apache.cocoon.xml.XMLConsumer consumer)` Does param checks for subclasses
`IDGenerator` | `getIdGenerator()` Providing access to the id generator as this maybe be useful when building documents externally
`Pipeline` | `getIndexationPipeline()` Returns the default indexation pipeline used for indexation in this document base.
`java.lang.String` | `getMimeType(Document doc)` Supplies the mimeType for the the document if it exists otherwise the binary document default mimetype is returned
`OAIHarvester` | `getOAIHarvester()` Returns the OAI harvester
`int` | `getOAIRepositoriesSize()` Return the number (int) of OAI repositories managed by the document base.
`OAIRepository` | `getOAIRepository()` Gets the default OAIRepository for the documentbase if one exists
`OAIRepository` | `getOAIRepository(java.lang.String repo)` Returns the specified OAI repository
`protected RepositoryConnection` | `getPooledRepositoryConnection(java.lang.String repoId)`
`Repository` | `getRepository(java.lang.String id)` Gets a repository in this document base.
`org.apache.excalibur.source.SourceValidity` | `getSourceValidity()` Returns the source validity of the document base.
`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` | `isDefault()` Returns `true` if this document base is the default in the application.
`boolean` | `isUseMetadata()` Return `true` or `false` if this document base should use metadata or not
`protected void` | `managedOaiDeletedRecord(IndexableDocument doc, java.lang.String action)` Manages the list of OAI deleted documents
`protected void` | `optimizeDatabase()` Optimizes the database of the document base.
`protected void` | `optimizeRepositories()` Optimizes the repositories of the document base.
`protected void` | `releasePooledRepositoryConnections()`
`protected void` | `removeOaiDeletedRecord(IndexableDocument doc)` Remove an indexable document to the list of the OAI deleted records.
`void` | `restore(SaveParameters save_config)` restore the DocumentBase data objects

Methods inherited from class fr.gouv.culture.sdx.utils.database.DatabaseBacked
`configure, configure, getClassNameSuffix, getDatabase, init`

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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface fr.gouv.culture.sdx.documentbase.DocumentBase
`checkIntegrity, creationDate, delete, getDocument, index, index, init, lastModificationDate, optimize`

Methods inherited from interface fr.gouv.culture.sdx.utils.SdxObject
`getLog`

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

Methods inherited from interface org.apache.avalon.framework.context.Contextualizable
`contextualize`

Methods inherited from interface org.apache.avalon.framework.service.Serviceable
`service`

Methods inherited from interface org.apache.avalon.framework.configuration.Configurable
`configure`

Methods inherited from interface fr.gouv.culture.sdx.utils.Identifiable
`getId, setId`

Methods inherited from interface fr.gouv.culture.sdx.utils.Describable
`getDescription, setDescription`

Methods inherited from interface fr.gouv.culture.sdx.utils.Encodable
`getEncoding, setEncoding`

Methods inherited from interface fr.gouv.culture.sdx.utils.Localizable
`getLocale, getXmlLang, setLocale, setXmlLang`

Methods inherited from interface org.apache.excalibur.xml.sax.XMLizable
`toSAX`

Methods inherited from interface fr.gouv.culture.sdx.search.Searchable
`getId, getIndex`

Field Detail

### isDefault

    protected boolean isDefault

  True if this document base is the default one in the application.

### defaultHitsPerPage

    protected int defaultHitsPerPage

  Number of results per page.

### defaultMaxSort

    protected int defaultMaxSort

  Maximum number of results to sort.

### _indexationPipeline

    protected Pipeline _indexationPipeline

  The default indexation pipeline

### repositories

    protected java.util.Hashtable repositories

  The repositories that are owned by this document base.

### defaultRepository

    protected Repository defaultRepository

  The default repository for this document base.

### oaiRepo

    protected OAIRepository oaiRepo

  The oai repository wrapper for this document base

### oaiRepositories

    protected java.util.Hashtable oaiRepositories

  The OAI repositories for this document base

### _oaiHarv

    protected OAIHarvester _oaiHarv

  The oai harvester wrapper for this document base

### locale

    protected java.util.Locale locale

  The locale for this document base (found either in the configuration file or by using `Locale.getDefault()`).

### repoConnectionPool

    protected java.util.Hashtable repoConnectionPool

  A pool of connections to the repositories.

### PROPERTY_NAME_ATTACHED

    protected final java.lang.String PROPERTY_NAME_ATTACHED

  Internal fields for relationships between documents (kind of metadata required/proposed by SDX) //TODO : move them to a framework/application/relationship class ? -pb /** Internal value for this field : an attached document relationship.

  See Also:
    Constant Field Values

### PROPERTY_NAME_ORIGINAL

    protected final java.lang.String PROPERTY_NAME_ORIGINAL

  Internal value for this field : an original document relationship.

  See Also:
    Constant Field Values

### PROPERTY_NAME_SUB

    protected final java.lang.String PROPERTY_NAME_SUB

  Internal value for this field : a sub-document document relationship.

  See Also:
    Constant Field Values

### PROPERTY_NAME_PARENT

    protected final java.lang.String PROPERTY_NAME_PARENT

See Also:
  Constant Field Values

### DBELEM_ATTRIBUTE_DEFAULT

    protected final java.lang.String DBELEM_ATTRIBUTE_DEFAULT

  The implied attribute stating whether the document base is to be used by default or not.

  See Also:
    Constant Field Values

### DBELEM_ATTRIBUTE_MAXSORT

    protected static final java.lang.String DBELEM_ATTRIBUTE_MAXSORT

  The implied attribute stating whether the document base is to be used by default or not.

  See Also:
    Constant Field Values

### DBELEM_ATTRIBUTE_HPP

    protected static final java.lang.String DBELEM_ATTRIBUTE_HPP

  The implied attribute stating whether the document base is to be used by default or not.

  See Also:
    Constant Field Values

### DBELEM_ATTRIBUTE_KEEP_ORIGINAL

    protected final java.lang.String DBELEM_ATTRIBUTE_KEEP_ORIGINAL

  The implied attribute stating whether original documents should be stored or not.

  See Also:
    Constant Field Values

### ATTRIBUTE_COMPOUND_FILES

    protected final java.lang.String ATTRIBUTE_COMPOUND_FILES

  Attribute required to specify the compound files format for indexation

  See Also:
    Constant Field Values

### ATTRIBUTE_AUTO_OPTIMIZE

    protected final java.lang.String ATTRIBUTE_AUTO_OPTIMIZE

  Attribute needed to make a choice of optimization method

  See Also:
    Constant Field Values

### ELEMENT_NAME_OPTIMIZE

    protected static final java.lang.String ELEMENT_NAME_OPTIMIZE

  Element for cron configuration (optimization)

  See Also:
    Constant Field Values

### ELEMENT_NAME_INDEX_SPLIT

    protected static final java.lang.String ELEMENT_NAME_INDEX_SPLIT

  Index splitting condition meta name

  See Also:
    Constant Field Values

### ATTRIBUTE_SPLIT_SIZE

    protected final java.lang.String ATTRIBUTE_SPLIT_SIZE

  Attribute used to fix the size limit per index before splitting it

  See Also:
    Constant Field Values

### ATTRIBUTE_SPLIT_UNIT

    protected final java.lang.String ATTRIBUTE_SPLIT_UNIT

  Very optionnal attribute used to tell wich unit must be use with the size one to determine max index size

  See Also:
    Constant Field Values

### ATTRIBUTE_SPLIT_DOC

    protected final java.lang.String ATTRIBUTE_SPLIT_DOC

  Attribute used to fix the document limit per index before splitting it

  See Also:
    Constant Field Values

### useMetadata

    public boolean useMetadata

  Metadata usage defaulted to true

### PROPERTY_NAME_REPO

    protected static final java.lang.String PROPERTY_NAME_REPO

  A constant for the repository property in the database entities.

  See Also:
    Constant Field Values

### PROPERTY_NAME_MIMETYPE

    protected static final java.lang.String PROPERTY_NAME_MIMETYPE

  A constant for the path property for attached documents.

  See Also:
    Constant Field Values

### PROPERTY_NAME_CONTENT_LENGTH

    protected static final java.lang.String PROPERTY_NAME_CONTENT_LENGTH

See Also:
  Constant Field Values

### PROPERTY_NAME_DOCTYPE

    protected final java.lang.String PROPERTY_NAME_DOCTYPE

  A constant for the path property for the type of document, Binary, HTML, or XML.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXDOCID

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXDOCID

  Internal field name for document ids

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXALL

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXALL

  Internal field name for a *fixed* value field. This field can serve several purposes : 1) permit a search that is able to retrieve all the documents (no 'SELECT *' in Lucene), 2) act as a hack that permits to allow creation of binary queries when user wants only to provide an unary one

  See Also:
    Constant Field Values

### INTERNAL_SDXALL_FIELD_VALUE

    public static final java.lang.String INTERNAL_SDXALL_FIELD_VALUE

  Internal value for this field.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXAPPID

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXAPPID

  Internal field name for application id.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXDBID

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXDBID

  Internal field name for document base id.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXREPOID

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXREPOID

  Internal field name for repository id.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXDOCTYPE

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXDOCTYPE

  Internal field name for document type.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXMODDATE

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXMODDATE

  Internal field name for modification date.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDXCONTENTLENGTH

    public static final java.lang.String INTERNAL_FIELD_NAME_SDXCONTENTLENGTH

  Internal field name for document length in bytes.

  See Also:
    Constant Field Values

### INTERNAL_FIELD_NAME_SDX_OAI_DELETED_RECORD

    public static final java.lang.String INTERNAL_FIELD_NAME_SDX_OAI_DELETED_RECORD

See Also:
  Constant Field Values

Constructor Detail

### AbstractDocumentBase

    public AbstractDocumentBase()

Method Detail

### isDefault

    public boolean isDefault()

  Returns `true` if this document base is the default in the application.

  Specified by:
    `isDefault` in interface `DocumentBase`

### getOAIRepositoriesSize

    public int getOAIRepositoriesSize()

  Return the number (int) of OAI repositories managed by the document base.

  Specified by:
    `getOAIRepositoriesSize` in interface `DocumentBase`
  Returns:
    The number of OAI repositories as an int

### isUseMetadata

    public final boolean isUseMetadata()

  Return `true` or `false` if this document base should use metadata or not

  Returns:
    boolean

### getDefaultHitsPerPage

    public int getDefaultHitsPerPage()

  Description copied from interface: `DocumentBase`
  Returns the default number of results on page for this DocumentBase.

  Specified by:
    `getDefaultHitsPerPage` in interface `DocumentBase`
  Returns:
    The default hpp for the DocumentBase

### getDefaultMaxSort

    public int getDefaultMaxSort()

  Description copied from interface: `DocumentBase`
  Returns the default maximum number of results to sort for this DocumentBase.

  Specified by:
    `getDefaultMaxSort` in interface `DocumentBase`
  Returns:
    The default maxsort for the DocumentBase

### getIndexationPipeline

    public Pipeline getIndexationPipeline()

  Returns the default indexation pipeline used for indexation in this document base.

  Specified by:
    `getIndexationPipeline` in interface `DocumentBase`

### getMimeType

    public java.lang.String getMimeType(Document doc)
                                 throws SDXException

  Supplies the mimeType for the the document if it exists otherwise the binary document default mimetype is returned

  Specified by:
    `getMimeType` in interface `DocumentBase`
  Parameters:
    `doc` - The document.
  Throws:
    `SDXException`

### configurePipeline

    protected void configurePipeline(org.apache.avalon.framework.configuration.Configuration configuration)
                              throws org.apache.avalon.framework.configuration.ConfigurationException

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

### getDocument

    public void getDocument(ParsableDocument doc,
                            org.apache.cocoon.xml.XMLConsumer consumer)
                     throws SDXException

  Does param checks for subclasses

  Specified by:
    `getDocument` in interface `DocumentBase`
  Parameters:
    `doc` -
    `consumer` -
  Throws:
    `SDXException`

### getDocument

    public void getDocument(Document doc,
                            java.io.OutputStream os)
                     throws SDXException

  Does param checks for subclasses

  Specified by:
    `getDocument` in interface `DocumentBase`
  Parameters:
    `doc` -
    `os` -
  Throws:
    `SDXException`

### getDocument

    public java.io.InputStream getDocument(Document doc)
                                    throws SDXException

  Does param checks for subclasses

  Specified by:
    `getDocument` in interface `DocumentBase`
  Parameters:
    `doc` -
  Returns:
  Throws:
    `SDXException`

### getDefaultRepository

    public Repository getDefaultRepository()

  Returns the default repository for this document base.

  Specified by:
    `getDefaultRepository` in interface `DocumentBase`
  Returns:
    The default repository object.

### getRepository

    public Repository getRepository(java.lang.String id)
                             throws SDXException

  Gets a repository in this document base.

  Specified by:
    `getRepository` in interface `DocumentBase`
  Parameters:
    `id` - The repository's id, if `null` for the default repository is returned
  Returns:
    The repository object
  Throws:
    `SDXException`

### createOAIRepository

    public OAIRepository createOAIRepository(java.lang.String repo)
                                      throws org.apache.avalon.framework.configuration.ConfigurationException

  Creates an OAIRepository for the documentbase

  Parameters:
    `repo` - String The id of the repository to create
  Returns:
    OAIRepository
  Throws:
    `org.apache.avalon.framework.configuration.ConfigurationException`

### createOAIRepository

    public OAIRepository createOAIRepository()
                                      throws org.apache.avalon.framework.configuration.ConfigurationException

  Creates an OAIRepository for the documentbase

  Specified by:
    `createOAIRepository` in interface `DocumentBase`
  Returns:
  Throws:
    `org.apache.avalon.framework.configuration.ConfigurationException`

### getOAIRepository

    public OAIRepository getOAIRepository(java.lang.String repo)

  Returns the specified OAI repository

  Specified by:
    `getOAIRepository` in interface `DocumentBase`
  Parameters:
    `repo` - String The repository id
  Returns:
    OAIRepository

### getOAIRepository

    public OAIRepository getOAIRepository()

  Description copied from interface: `DocumentBase`
  Gets the default OAIRepository for the documentbase if one exists

  Specified by:
    `getOAIRepository` in interface `DocumentBase`
  Returns:
    OAIRepository
  See Also:
    `getDefaultOAIRepository()`

### getDefaultOAIRepository

    public OAIRepository getDefaultOAIRepository()

  Returns the default OAI repository

  Returns:
    OAIRepository

### getOAIHarvester

    public OAIHarvester getOAIHarvester()

  Returns the OAI harvester

  Specified by:
    `getOAIHarvester` in interface `DocumentBase`
  Returns:
    OAIHarvester

### addOAIRepository

    protected void addOAIRepository(OAIRepository _repo,
                                    org.apache.avalon.framework.configuration.Configuration _conf,
                                    java.lang.String _repoid)

  Adds an OAI repository to the repositories list.

  Parameters:
    `_repo` -
    `_conf` -
    `_repoid` -

### addOaiDeletedRecord

    protected void addOaiDeletedRecord(IndexableDocument doc)
                                throws SDXException

  Adds an indexable document to the list of the OAI deleted records. This method is called by the delete document process.

  Parameters:
    `doc` - The indexable document to add to the list
  Throws:
    `SDXException`
  See Also:
    `managedOaiDeletedRecord(IndexableDocument, String)`

### removeOaiDeletedRecord

    protected void removeOaiDeletedRecord(IndexableDocument doc)
                                   throws SDXException

  Remove an indexable document to the list of the OAI deleted records. This method is called by the indexation document process.

  Parameters:
    `doc` - The indexable document to remove from the list
  Throws:
    `SDXException`
  See Also:
    `managedOaiDeletedRecord(IndexableDocument, String)`

### managedOaiDeletedRecord

    protected void managedOaiDeletedRecord(IndexableDocument doc,
                                           java.lang.String action)
                                    throws SDXException

  Manages the list of OAI deleted documents

  Parameters:
    `action` - Actions are: `add` or `remove`
  Throws:
    `SDXException`

### optimizeDatabase

    protected void optimizeDatabase()
                             throws SDXException

  Optimizes the database of the document base.

  Throws:
    `SDXException`

### optimizeRepositories

    protected void optimizeRepositories()
                                 throws SDXException

  Optimizes the repositories of the document base. This method should be called before releasePooledRepositoryConnections(); so we have something to optimize.

  Throws:
    `SDXException`

### releasePooledRepositoryConnections

    protected void releasePooledRepositoryConnections()
                                               throws SDXException

  Throws:
    `SDXException`

### getPooledRepositoryConnection

    protected RepositoryConnection getPooledRepositoryConnection(java.lang.String repoId)
                                                          throws SDXException

  Throws:
    `SDXException`

### createEntityForDocMetaData

    protected DatabaseEntity createEntityForDocMetaData(Document doc,
                                                        Repository repository,
                                                        java.lang.String[] parentDocId)
                                                 throws SDXException

  Throws:
    `SDXException`

### delete

    public void delete(Document doc,
                       org.xml.sax.ContentHandler handler)
                throws SDXException,
                       org.xml.sax.SAXException,
                       org.apache.cocoon.ProcessingException

  Deletes a document and any attached document(s) if not used by any other document(s).

  Specified by:
    `delete` in interface `DocumentBase`
  Parameters:
    `doc` - The document to delete.
    `handler` - A content handler to feed with information.
  Throws:
    `SDXException`
    `org.xml.sax.SAXException`
    `org.apache.cocoon.ProcessingException`

### deletePhysicalDocument

    protected void deletePhysicalDocument(Document doc,
                                          Repository repo,
                                          org.xml.sax.ContentHandler handler)
                                   throws SDXException,
                                          org.xml.sax.SAXException,
                                          org.apache.cocoon.ProcessingException

  This method does a special delete. Only the document and it's lookup information are deleted any relations will remain

  Parameters:
    `doc` -
    `handler` -
  Throws:
    `SDXException`
    `org.xml.sax.SAXException`
    `org.apache.cocoon.ProcessingException`

### getIdGenerator

    public IDGenerator getIdGenerator()

  Providing access to the id generator as this maybe be useful when building documents externally

### initToSax

    protected boolean initToSax()

  Description copied from class: `AbstractSdxObject`
  Init the LinkedHashMap _xmlizable_objects with the objects in order to describ them in XML

  Overrides:
    `initToSax` in class `DatabaseBacked`

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

  Overrides:
    `initVolatileObjectsToSax` in class `DatabaseBacked`

### backup

    public void backup(SaveParameters save_config)
                throws SDXException

  Save the DocumentBase data objects

  Specified by:
    `backup` in interface `Saveable`
  Throws:
    `SDXException`
  See Also:
    `Saveable.backup(fr.gouv.culture.sdx.utils.save.SaveParameters)`

### restore

    public void restore(SaveParameters save_config)
                 throws SDXException

  restore the DocumentBase data objects

  Specified by:
    `restore` in interface `Saveable`
  Throws:
    `SDXException`
  See Also:
    `Saveable.restore(fr.gouv.culture.sdx.utils.save.SaveParameters)`

### getSourceValidity

    public org.apache.excalibur.source.SourceValidity getSourceValidity()

  Returns the source validity of the document base. The source validity is used by the cache of Cocoon.

  Specified by:
    `getSourceValidity` in interface `DocumentBase`
  Returns:
    DocumentBaseSourceValidity

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.