4Suite API Documentation

Module Ft.Rdf.Drivers.Util

Configuration library for managing 4Suite RDF Drivers. Only those known to work are registered, the others can be added easily. The neccessary configuration parameters for each driver are listed below :
MySQL Configuration:
driver: mysql
dbHandle: rdf:userName/password@hostName:port:dbName
model: <modelName>

Postgres Configuration:
driver: postgres
dbHandle: rdf:userName/password@hostName:port:dbName
model: <modelName>

Dbm Configuration:
driver: dbm
dbHandle: <dbName>
model: <modelName>

Memory Configuration:
driver: memory
dbHandle: <dbName>
model: <modelName>

Bsd Db Configuration:
driver: bsddb
model: <modelName>

modelName - The name of the RDF Model
dbName    - The name of the database

The parameters are passed to the Configuration Manager's constructor in the following format:
driver=bsddb|mysql|postgres|dbm|memory,model=modelName,dbHandle=connString|dbName

for example:

driver=mysql,model=system,dbHandle=rdf:root/toor@localhost:3306:ft__xmlserver


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

Classes

class FtRDFConfigurationManager(object)
The Configuration Manager takes a configuration string which provides the neccessary parameters for connecting to a particular driver. The create argument is a boolean which specifies whether or not to create a new database (destroying any existing database in the process).

Methods

__init__(self, configuration, create=False)
Overrides: __init__ from class object
createDriver(self)
Creates an instance of the driver specified by the configuration string and returns it. Note: The returned driver isn't live and it's begin() function needs to be invokeds

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'FtRDFConfigurationManager' objects>
__weakref__ = <attribute '__weakref__' of 'FtRDFConfigurationManager' objects>

Members inherited from class object

__class__

Functions

configureBsdDb(modelName, dbHandle, create)
Utility function for creating a BsdDb driver instance
configureDbm(modelName, dbName, create)
Utility function for creating a Dbm driver instance
configureMemory(modelName, dbName, create)
Utility function for creating a Memory driver instance
configureMySQL(modelName, connectString, create)
Utility function for creating a MySQL driver instance
configurePostgres(modelName, connectString, create)
Utility function for creating a Postgres driver instance

Globals

DRIVER_CONFIGURATION_HANDLERS = {'bsddb': <function configureBsdDb>, 'dbm': <function configureDbm>, 'memory': <function configureMemory>, 'mysql': <function configureMySQL>, 'postgres': <function configurePostgres>}