NAME
Keystone::Resolver::Database - Resource Database for an OpenURL v1.0 resolver
SYNOPSIS
$db = new Keystone::Resolver::Database($resolver);
$genre = $db->genre_by_mformat("info:ofi/fmt:kev:mtx:journal");
print $genre->name();
DESCRIPTION
This object represents the Resource Database, or RDB, for an OpenURL resolver. In includes the physical connection information to the underlying database together with application logic at the database level.
METHODS
new()
$db = new Keystone::Resolver::Database($resolver, $name);
$rwdb = new Keystone::Resolver::Database($resolver, $name, 1);
Constructs a new Database for the specified resolver, using the specified database name. If an optional third argument is present and true, then the database is opened in read-write mode rather than the default read-only mode.
Read-only and read-write modes are achieved by connecting to the user as one of two different users. In read-only mode, the user named by the KRuser
environment variable is used, together with the password specified by KRpw
. In read-write mode, the user named by the KRrwuser
environment variable is used, together with the password specified by KRrwpw
. These environment variables must be set of the resolver will not run.
The system administrator must ensure that the values provided for read-write access do match a username (and password) that has read-write access to the resolver database, and ideally that those provided for readonly access do not.
The DBMS used (via the DBI framework) defaults to mysql
, but this is overridden by the KRdbms
environment variable if set.