2005-03-30 23:06:12

4Suite repository low-level driver for ordinary file system storage

Copyright 2004 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, distributions: http://4suite.org/

Implements repository containers as directories on the underlying file system. Overides _createContainer to attempt an os.mkdir on the filesystem

Used if instanciated directly in order to do initialization

Returns a list of child uris for the given parent. Parent is a PathImp Needs to hit the file system to do a directory listing of the parent PathImp as a file system path

Initialize the table

Adds/remove the child specified by the given path to the parent (parent - a PathImp) Needs to add/remove children from _children (so they are accounted for if accessed within the same transaction)

The FlatFile Driver will store information in a directory tree. This driver will not support any locking or concurrency. See ConcurrentFlatFileDriver for information on that.

To store information, the flat file driver will create two directories in its root directory. The first will be called 'metadata' and under it will be a picture of the metadata in the tree. The second will be called content and will contain the content of the tree.

In the root, it will also create a file called system-rdf which is the RDF of the system using the Dbm driver of 4RDF. from Ft.Server.Server.Drivers.FlatFile import Also in the Root will be a file called user.rdf which is a second RDF Model with user information.

Make it so!

When creating a resource, store the content.

Delete an object

See if we have any meta information about this resource

Undo it

Update only the content about this resource

Begin a new transaction. Every driver must support this interface. The properties keyword arguments are passed from the config file (or where ever) to the driver. The Begin file is responsible for doing what ever is needed to validate these arguements

Given the absolute path of a directory on the file system to use as the root container of the repository, plus a repo path and a resource type, returns a file system path corresponding to the given repo path and type.

Completly destroy the repo

See if this repo exists. The return value for this is three states: 1. Everything is present 0. Some things are there -1 Nothing is there.

Initialize a new copy of the repo. This is not the same as a '4ss_manager init'. This is very raw. The adapter will take care of calling our other interfaces (createContainer, createUser, etc) with all of the information about the rest of the 'init' stuff to do.

Post-import hook to initialize module's runtime variables that are not required at import time, but will be needed before the module-level functions are called.

Perform any maintenance on the db

Given the absolute path of a directory on the file system to use as the root container of the repository, plus a repo path and a resource type, returns a file system path corresponding to the given repo path and type.

'http://xmlns.4suite.org/reserved'
'Flat File'
'system-rdf'
'user-rdf'
u'http://www.w3.org/1999/xlink'
{}
{1: 'metadata', 2: 'content', 3: 'cache', 4: 'sessions'}