public interface DocumentBase extends SdxObject, Searchable, Saveable
Modifier and Type | Interface and Description |
---|---|
static interface |
DocumentBase.ConfigurationNode |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME_SUFFIX
The document base's class name suffix.
|
static java.lang.String |
PACKAGE_QUALNAME
The document base's package name (including trailing separator ".").
|
DEFAULT_ENCODING
ALL_SAVE_ATTRIB, PATH_ATTRIB, SAVE_DIRECTORY_PARAM
Modifier and Type | Method and Description |
---|---|
void |
checkIntegrity()
Check the integrity of the documentBase
|
OAIRepository |
createOAIRepository()
Creates an OAIRepository for the documentbase
|
java.util.Date |
creationDate()
Returns the creation date of the document base
|
void |
delete(Document[] docs,
org.xml.sax.ContentHandler handler)
Deletes documents.
|
void |
delete(Document doc,
org.xml.sax.ContentHandler handler)
Deletes a document.
|
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.
|
Repository |
getDefaultRepository()
Returns the default repository for the DocumentBase.
|
java.io.InputStream |
getDocument(Document doc)
Provides the requested SDX document as an
InputStream . |
void |
getDocument(Document doc,
java.io.OutputStream os)
Supplies the provided output stream with the requested document
|
void |
getDocument(ParsableDocument doc,
org.apache.cocoon.xml.XMLConsumer consumer)
Sends a document as SAX events.
|
void |
getDocument(ParsableDocument doc,
org.apache.cocoon.xml.XMLConsumer consumer,
boolean docTypeKnown)
Sends a document as SAX events.
|
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.
|
OAIHarvester |
getOAIHarvester()
Gets the AbstractDocumentBaseOAIHarvester for the documentbase if one exists
|
int |
getOAIRepositoriesSize()
Returns the number of OAI repositories managed by this 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
|
Repository |
getRepository(java.lang.String id)
Returns a repository which is owned by this document base using its id.
|
org.apache.excalibur.source.SourceValidity |
getSourceValidity()
Returns a source validity object for this document base (for caching)
|
void |
index(IndexableDocument[] docs,
Repository repository,
IndexParameters params,
org.xml.sax.ContentHandler handler)
Indexes documents and stores them in a repository.
|
void |
index(IndexableDocument doc,
Repository repository,
IndexParameters params,
org.xml.sax.ContentHandler handler)
Indexes a document and stores it in a repository.
|
void |
init()
Initializes the document base.
|
boolean |
isDefault()
Returns
true if this document base is the default in the application. |
java.util.Date |
lastModificationDate()
Returns the last modification date of the document base
|
void |
optimize()
Process an optimization of the documentbase.
|
getId, setId
getDescription, setDescription
getEncoding, setEncoding
getLocale, getXmlLang, setLocale, setXmlLang
getId, getIndex
static final java.lang.String PACKAGE_QUALNAME
static final java.lang.String CLASS_NAME_SUFFIX
void init() throws SDXException, org.apache.avalon.framework.configuration.ConfigurationException
This method must be called after the super.getLog() has been set and the configuration done.
SDXException
org.apache.avalon.framework.configuration.ConfigurationException
boolean isDefault()
true
if this document base is the default in the application.int getDefaultHitsPerPage()
int getDefaultMaxSort()
Repository getRepository(java.lang.String id) throws SDXException
id
- The requested repository's id.SDXException
Repository getDefaultRepository()
Pipeline getIndexationPipeline()
void index(IndexableDocument doc, Repository repository, IndexParameters params, org.xml.sax.ContentHandler handler) throws SDXException, org.xml.sax.SAXException, org.apache.cocoon.ProcessingException
doc
- The document to index and add.repository
- The repository where the document have to be stored.params
- Parameters governing the indexing process.handler
- The SAX events consumer that receives informations about the indexing process.SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
void index(IndexableDocument[] docs, Repository repository, IndexParameters params, org.xml.sax.ContentHandler handler) throws SDXException, org.xml.sax.SAXException, org.apache.cocoon.ProcessingException
docs
- The documents to index and add.repository
- The repository where the documents have to be stored.params
- Parameters governing the indexing process.handler
- The SAX events consumer that receives informations about the indexing process.SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
void delete(Document doc, org.xml.sax.ContentHandler handler) throws SDXException, org.xml.sax.SAXException, org.apache.cocoon.ProcessingException
doc
- The id of the document to delete.handler
- The SAX events consumer that receives informations about the deletion process.SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
void delete(Document[] docs, org.xml.sax.ContentHandler handler) throws SDXException, org.xml.sax.SAXException, org.apache.cocoon.ProcessingException
docs
- The documents to delete.handler
- The SAX events consumer that receives informations about the deletion process.SDXException
org.xml.sax.SAXException
org.apache.cocoon.ProcessingException
void getDocument(ParsableDocument doc, org.apache.cocoon.xml.XMLConsumer consumer) throws SDXException
doc
- A ParsableDocument, i.e. XMLDocument or HTMLDocument.consumer
- A SAX content handler to feed with events.
The wrapped contentHandler for including events within an XSP page contentHandler should be created using
IncludeXMLConsumer stripper = new IncludeXMLConsumer(xspContentHandler);
and then the "stripper" should be passed
to this methodSDXException
void getDocument(ParsableDocument doc, org.apache.cocoon.xml.XMLConsumer consumer, boolean docTypeKnown) throws SDXException
doc
- A ParsableDocument, i.e. XMLDocument or HTMLDocument.consumer
- A SAX content handler to feed with events.docTypeKnown
- If set to false
implementations should attempt to determine the doctyp(see LuceneDocumentBase)
The wrapped contentHandler for including events within an XSP page contentHandler should be created using
IncludeXMLConsumer stripper = new IncludeXMLConsumer(xspContentHandler);
and then the "stripper" should be passed
to this methodSDXException
void getDocument(Document doc, java.io.OutputStream os) throws SDXException
doc
- The document.os
- The output stream.SDXException
java.io.InputStream getDocument(Document doc) throws SDXException
InputStream
.doc
- The document.SDXException
java.lang.String getMimeType(Document doc) throws SDXException
doc
- The document.SDXException
OAIRepository createOAIRepository() throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
OAIRepository getOAIRepository()
OAIRepository getOAIRepository(java.lang.String repo)
repo
- String The repository idint getOAIRepositoriesSize()
OAIHarvester getOAIHarvester()
java.util.Date lastModificationDate()
java.util.Date creationDate()
void optimize()
void checkIntegrity()
org.apache.excalibur.source.SourceValidity getSourceValidity()
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.