4Suite API Documentation

Module Ft.Rdf.Drivers.BerkeleyDB

A persistent RDF model driver using Berkeley (BSD) database files
This driver implements 4RDF in the same structural format as SQL.py,
but applies this interface on top of the embedded Berkeley DB.

Requires pybsddb (http://pybsddb.sourceforge.net/bsddb3.html), which is
the standard bsddb module in Python 2.3 and up. However, even if you are
using Python 2.3 up, it is possible that you won't have a functioning
bsddb at all.

If necessary, update your C libs (db4+ preferred for compatibility with
Berkeley DB XML). And if possible, upgrade or install pybsddb (this is
mandatory on Python 2.2, if you want this driver to work).

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


class DbAdapter


__init__(self, connectionInfo, modelName='default', environment=None)
add(self, statements)
begin(self, txn=None)
bind(self, object_, name, scope)
complete(self, subject, predicate, object_, statementUri, scope, flags)
contains(self, subject, predicate, object_, statementUri, scope, flags)
has_key(self, name, scope)
isResource(self, resource)
keys(self, scope)
lookup(self, name, scope)
objectsFromSubAndPreds(self, subject, predicates, scope)
Get a list of obejcts with the given predicates and subject
remove(self, statements)
removePattern(self, subject, predicate, object_, statementUri, scope, flags)
resources(self, scope)
size(self, scope)
subjectsFromPredAndObjs(self, predicate, objects, scope)
Get a list of resources with the given predicate and object
subjectsFromPredsAndObj(self, predicates, object_, scope)
unbind(self, name, scope)


properties = {1: True}


CreateDb(connectionInfo, modelName='default')
DestroyDb(connectionInfo, modelName='default')
ExistsDb(connectionInfo, modelName='default')
GetDb(connectionInfo, modelName='default')
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.


VERSION = '0.1'