Like most Perl modules, the RefDBClient::Client module is object-oriented. This section introduces the two classes that you need to know in order to work with the module. To see a working example, please check the test.pl script shipped with the module.
The main class that is used to access all refdb client functions is called RefDBClient::Client. To get started, create a new instance and set the communication parameters:
use RefDBClient::Client; my $client = new RefDBClient::Client; $client->set_conninfo("127.0.0.1", "9734", "markus", "pass", "refdbtest", "/home/markus/literature", "/usr/local/share/refdb/css/refdb.css"); |
Then you can go ahead and send commands to the server like this:
$summary = $client->refdb_listdb(""); $data = $client->get_data(); |
Note: As you can easily guess the functions implementing the client commands are analogous to the commands found in the refdba and refdbc clients. See the reference pages about these apps for further information about the commands.
There are three helper classes:
RefDBClient::Risdata provides a simple interface to RIS data
ReFDBClient::Simplelist is used internally
RefDBClient::Enigma handles the password encryption
$client->set_conninfo
($server_ip, $port_address, $username, $password, $database, $pdf_root, $css_url);
sets the initial connection parameters of a Client object
IP address or hostname of the server that runs refdbd
Port address at which refdbd listens
Username for database password authentication
Password for database password authentication
Name of the reference database
Path of the root directory of all electronic offprints
URL of a Cascading Stylesheets file for (X)HTML output
adds a citation/bibliography style to the database
XML data representing the bibliography style
adds new users to the database
host specification from which the user is allowed to connect
name of the reference database
password (required only for new users)
name of the user, as used to authenticate at the database engine
deletes users from the database
host specification from which the user is allowed to connect
name of the reference database
name of the user, as used to authenticate at the database engine
removes reserved words from the main database
space-separated list of words
sends a configuration command to the server
the command proper, optionally followed by an argument
creates a new database
name of the reference database
character encoding
deletes citation/bibliography styles
regular expression describing the names of the styles to be deleted
retrieves a citation/bibliography style as a citestylex doc
name of the style
lists matching databases
regular expression describing the database names
lists matching user names
regular expression describing the user names
lists matching journal name words
regular expression describing the word names
lists matching citation/bibliography styles
regular expression describing the style names
requests version/connection info from the server
runs a thorough keyword scan in the given database
name of the reference database
adds references to the database
name of the dataset owner, if different from current user
string containing the reference data
data type, must be one of 'ris' or 'risx'
character encoding of the input data (only for RIS data)
updates references in the database
name of the dataset owner, if different from current user
set to 't' if only the personal information shall be updated
string containing the reference data
data type, must be one of 'ris' or 'risx'
character encoding of the input data (only for RIS data)
deletes references from the database
string specifying the IDs of the references to be deleted
adds notes to the database
owner of the note, if different from the current user
XML data specifying the note
updates references in the database
owner of the note, if different from the current user
set to 't' if only the personal information shall be updated
XML data specifying the note
deletes notes from the database
string specifying the ID values of the notes to be deleted
links notes to database objects
string specifying the link(s) to be created
unlinks notes from database objects
string specifying the link(s) to be deleted
retrieves matching series authors
regular expression describing the names to be retrieved
retrieves matching authors
regular expression describing the names to be retrieved
retrieves matching editors
regular expression describing the names to be retrieved
retrieves matching keywords
regular expression describing the keywords to be retrieved
retrieves matching periodicals (full names)
set to 't' if all synonymous journal names shall be returned
regular expression describing the names to be retrieved
retrieves matching periodical names (abbrev)
set to 't' if all synonymous journal names shall be returned
regular expression describing the names to be retrieved
retrieves matching periodical names (custom abbrev 1)
set to 't' if all synonymous journal names shall be returned
regular expression describing the names to be retrieved
retrieves matching periodical names (custom abbrev 2)
set to 't' if all synonymous journal names shall be returned
regular expression describing the names to be retrieved
retrieves references
select output format
specify additional fields to be retrieved
specify sorting key
set to 't' to retrieve only references in the current users personal interest list
the character encoding for the output data
the query that describes the datasets to be retrieved
adds references to the users personal reference list
specifies the ID values of the references to be picked
removes references from personal reference list
specifies the ID values of the references to be dumped
retrieves references
select output format
specify additional fields to be retrieved
specify sorting key
the character encoding for the output data
the query that describes the datasets to be retrieved
selects an existing database as the current database
name of the reference database
displays information about the current database
retrieves a bibliography in bibtex format based on citationlistx data
the name of the citation/bibliography style
XML data describing the references
retrieves an XML/SGML bibliography based on citationlistx data
type of the bibliography output
name of the citation/bibliography style
character encoding of the output data
XML data specifying the references