IDocumentProvider Interface Reference

Inheritance diagram for IDocumentProvider:

List of all members.

Public Methods

IDocumentData getDocumentData (TeslaDocument doc) throws DocumentNotFoundException, DataSourceException
List< TeslaDocumentgetAllDocuments () throws DataSourceException
void initialize (DocumentProviderConfiguration config) throws DataSourceException
TeslaDocument getDocument (String documentId) throws DocumentNotFoundException, DataSourceException
int getNumberOfDocuments ()
DocumentProviderConfiguration getConfiguration ()
IDublinCoreMetadata getMetadata (TeslaDocument document) throws DataSourceException

Method Details

List<TeslaDocument> getAllDocuments ( ) throws DataSourceException

Returns all documents managed by the provider.

Parameters:
dataSourceIdwill be removed soon
Returns:
Exceptions:
DataSourceException

Implemented in TeslaDocumentProvider, and ZipDocumentProvider.

DocumentProviderConfiguration getConfiguration ( )

Returns the configuration of the provider.

Returns:

Implemented in TeslaDocumentProvider, and ZipDocumentProvider.

TeslaDocument getDocument ( String  documentId) throws DocumentNotFoundException, DataSourceException

Returns the document with the given id.

Parameters:
documentId
Returns:
Exceptions:
DocumentNotFoundException
DataSourceException

Implemented in TeslaDocumentProvider, and ZipDocumentProvider.

Returns content related to a TeslaDocument as IDocumentData.

Parameters:
docThe related TeslaDocument.
Returns:
IDocumentData of TeslaDocument

Implemented in TeslaDocumentProvider, and ZipDocumentProvider.

int getNumberOfDocuments ( )

Returns the number of documents managed by this provider. Returns -1, if the number of documents may vary.

Returns:

Implemented in TeslaDocumentProvider, and ZipDocumentProvider.

void initialize ( DocumentProviderConfiguration  config) throws DataSourceException

Initializes a document provider. The appropriate implementation of this interface is determined by the information found in a datasource-definition (as can be found in directory configurations/datasources in Tesla's main directory).

Parameters:
config
Exceptions:
DataSourceException

Implemented in TeslaDocumentProvider, ZipDocumentProvider, and BrownCorpusDocumentProvider.