Cheshire3 Object Model - DocumentStore

API

class cheshire3.baseObjects.DocumentStore(session, config, parent=None)[source]

A persistent storage mechanism for Documents and their metadata.

create_document(session, doc=None)[source]

Create an identifier, store and return a Document

Generate a new identifier. If a Document is given, assign the identifier to the Document and store it using store_document. If Document not given create a placeholder Document. Return the Document.

delete_document(session, id)[source]

Delete the Document with the given identifier from storage.

fetch_document(session, id)[source]

Fetch and return Document with the given identifier.

store_document(session, doc)[source]

Store a Document that already has an identifier assigned.

Implementations

The following implementations are included in the distribution by default:

class cheshire3.documentStore.BdbDocumentStore(session, config, parent)[source]
class cheshire3.documentStore.FileSystemDocumentStore(session, config, parent)[source]

In addition to the default implementation, the cheshire3.sql provides the following implementations: