RefDB-Client-1.18000755 001750 001750 00000000000 10713341147 014371 5ustar00markusmarkus000000 000000 RefDB-Client-1.18/testdata000755 001750 001750 00000000000 10713341147 016202 5ustar00markusmarkus000000 000000 RefDB-Client-1.18/test.pl000755 001750 001750 00000045534 10712455012 015776 0ustar00markusmarkus000000 000000 # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "0..48\n"; } END {print "not ok 0\n" unless $loaded;} use RefDB::Client; $loaded = 1; print "ok 0\n"; ######################### End of black magic. # set a few initial params my $auser = "root"; # must match your database server my $apasswd = ""; # must match your database server my $server_ip = "127.0.0.1"; # where refdbd runs my $port = "9734"; # where refdbd listens # these are used internally and should be ok my $cuser = "testuser"; my $cpasswd = "pass"; my $puser = "pickuser"; my $ppasswd = "pass"; my $testdb = "perltest"; my $adduser_ip = "localhost"; my $bibencoding = "UTF-8"; my $author_regex = ""; my $keyword_regex = ""; my $periodical_regex = ""; ## ask user for connection parameters my $input; print "This test script requires a running refdbd server that we can connect to. Please provide the following connection parameters (hitting ENTER will use the defaults):\n\n"; print "username of database administrator [$auser]:"; chomp($input = ); if (length($input) > 0) { $auser = $input; } print "password of database administrator [$apasswd]:"; chomp($input = ); if (length($input) > 0) { $apasswd = $input; } print "IP address of refdbd server [$server_ip]:"; chomp($input = ); if (length($input) > 0) { $server_ip = $input; } print "port of refdbd server [$port]:"; chomp($input = ); if (length($input) > 0) { $port = $input; } ### ### here the real tests start ### my $numtest = 1; my $numok = 1; my $numtotal = 48; # password encryption test print "$numtest..$numtotal: password encryption\n"; $numtest++; my $enigma = new RefDB::Enigma; my $scramble; my $randno = abs(rand() * 6); if ($randno < 1) { $scramble = "012"; } elsif ($randno < 2) { $scramble = "021"; } elsif ($randno < 3) { $scramble = "120"; } elsif ($randno < 4) { $scramble = "102"; } elsif ($randno < 5) { $scramble = "201"; } else { $scramble = "210"; } for my $i (0 .. 2) { $randno = abs(rand() * 93); $scramble .= sprintf("-%02d", $randno); } $enigma->init("heinzmeier", $scramble); $enigma->eenc(); my $renigma = new RefDB::Enigma; $renigma->init($enigma->{encodedpass}, $scramble); $renigma->eenc(); if ($enigma->{rawpass} eq $renigma->{encodedpass}) { print "password encryption ok:$renigma->{encodedpass}\n"; } else { print "password encryption broken\n"; exit 1; } # we need one refdba and two refdbc clients as the # username/password may differ my $clienta = new RefDB::Client; $clienta->set_conninfo($server_ip, $port, $auser, $apasswd, "", "/home/testuser/literature", "/usr/local/share/refdb/css/refdb.css"); my $clientc = new RefDB::Client; $clientc->set_conninfo($server_ip, $port, $cuser, $cpasswd, "", "/home/testuser/literature", "/usr/local/share/refdb/css/refdb.css"); my $clientcp = new RefDB::Client; $clientcp->set_conninfo($server_ip, $port, $puser, $ppasswd, "$testdb", "/home/testuser/literature", "/usr/local/share/refdb/css/refdb.css"); # run the refdba:viewstat command to test the connection print "$numtest..$numtotal: viewstat\n"; $numtest++; my $summary = $clienta->refdb_viewstat(); if ($clienta->get_status() ne "000") { print $clienta->get_status_msg() . "\n"; } else { print "start viewstat result:\n"; print $clienta->get_data(); print "end viewstat result:\n"; print "viewstat result summary: $summary\n"; } # prepare some database engine specific strings if ($clienta->get_data() =~ /pgsql/) { print "self-adapt to PostgreSQL\n\n"; $author_regex = ".*"; $keyword_regex = ".*"; $periodical_regex = "J.*"; } elsif ($clienta->get_data() =~ /mysql/) { print "self-adapt to MySQL\n\n"; $author_regex = ".*"; $keyword_regex = ".*"; $periodical_regex = "J.*"; } elsif ($clienta->get_data() =~ /sqlite/) { print "self-adapt to SQLite\n\n"; $author_regex = "%"; $keyword_regex = "%"; $periodical_regex = "J%"; } elsif ($clienta->get_data() =~ /sqlite3/) { print "self-adapt to SQLite3\n\n"; $author_regex = "%"; $keyword_regex = "%"; $periodical_regex = "J%"; } else { print "Unknown database engine\n" } # add a bibliography style to the database print "$numtest..$numtotal: addstyle\n"; $numtest++; my $file = "testdata/refdbteststyle.xml"; #my $file = "testdata/bibtex-invalid.xml"; open IN, "< $file"; while () { $instring .= $_; } close IN; $summary = $clienta->refdb_addstyle($instring); print "start addstyle result:\n"; print $clienta->get_data(); print "end addstyle result:\n"; print "addstyle result summary: $summary\n"; # see whether the new style appears in the style list print "$numtest..$numtotal: liststyle\n"; $numtest++; $summary = $clienta->refdb_liststyle(""); print "start liststyle result:\n"; print $clienta->get_data(); print "end liststyle result:\n"; print "liststyle result summary: $summary\n"; # retrieve the style again print "$numtest..$numtotal: getstyle\n"; $numtest++; $summary = $clienta->refdb_getstyle("refdbteststyle"); print "start getstyle result:\n"; print $clienta->get_data(); print "end getstyle result:\n"; print "getstyle result summary: $summary\n"; # create a new reference database print "$numtest..$numtotal: createdb\n"; $numtest++; $summary = $clienta->refdb_createdb("$testdb"); print "start createdb result:\n"; print $clienta->get_data(); print "end createdb result:\n"; print "createdb result summary: $summary\n"; # add users print "$numtest..$numtotal: adduser\n"; $numtest++; $summary = $clienta->refdb_adduser($adduser_ip, "$testdb", $cpasswd, $cuser); print "start adduser result:\n"; print $clienta->get_data(); print "end adduser result:\n"; print "adduser result summary: $summary\n"; # silently add another user for picking refs $summary = $clienta->refdb_adduser($adduser_ip, "$testdb", $ppasswd, $puser); # select the new database print "$numtest..$numtotal: selectdb\n"; $numtest++; $summary = $clientc->refdb_selectdb("$testdb"); print "start selectdb result:\n"; print $clientc->get_data(); print "end selectdb result:\n"; print "selectdb result summary: $summary\n"; # add RIS datasets print "$numtest..$numtotal: addref (RIS data)\n"; $numtest++; my $risdata = new RefDB::Risdata; $risdata->read_ris("testdata/pubmed.ris"); $summary = $clientc->refdb_addref(undef, $risdata, "ris", "ISO-8859-1"); print "start addref ris result:\n"; print $clientc->get_data(); print "end addref ris result:\n"; print "addref ris result summary: $summary\n"; # wait until background process releases lock on SQLite database print "now sleep for five seconds...\n"; sleep 5; print "done\n"; # add risx datasets print "$numtest..$numtotal: addref (risx data)"; $numtest++; my $risxstring; open IN, "< testdata/alltypes.xml"; while () { $risxstring .= $_; } close IN; $summary = $clientc->refdb_addref(undef, $risxstring, "risx", undef); print "start addref risx result:\n"; print $clientc->get_data(); print "end addref risx result:\n"; print "addref risx result summary: $summary\n"; # add xnote datasets print "$numtest..$numtotal: addnote\n"; $numtest++; my $xnotestring; open IN, "< testdata/xnoteset.xml"; while () { $xnotestring .= $_; } close IN; $summary = $clientc->refdb_addnote(undef, $xnotestring); print "start addnote result:\n"; print $clientc->get_data(); print "end addnote result:\n"; print "addnote result summary: $summary\n"; # add link print "$numtest..$numtotal: addlink\n"; $numtest++; $summary = $clientc->refdb_addlink(":NID:=1 :CK:=MILLER1999"); print "start addlink result:\n"; print $clientc->get_data(); print "end addlink result:\n"; print "addlink result summary: $summary\n"; # count references print "$numtest..$numtotal: countref\n"; $numtest++; $summary = $clientc->refdb_countref("", "", ":ID:>0"); print "start countref result:\n"; print $clientc->get_data(); print "end countref result:\n"; print "countref result summary: $summary\n"; # count notes print "$numtest..$numtotal: countnote\n"; $numtest++; $summary = $clientc->refdb_countnote("", "", ":NID:>0"); print "start countnote result:\n"; print $clientc->get_data(); print "end countnote result:\n"; print "countnote result summary: $summary\n"; # retrieve references print "$numtest..$numtotal: getref as ris\n"; $numtest++; $summary = $clientc->refdb_getref("ris", "AB", undef, "", "ISO-8859-1", "", "", "f", ":ID:=1"); print "start getref result:\n"; print $clientc->get_data(); print "end getref result:\n"; print "getref result summary: $summary\n"; # retrieve references with limit and offset print "$numtest..$numtotal: getref as risx using limit:offset\n"; $numtest++; $summary = $clientc->refdb_getref("risx", "AB", undef, "", "ISO-8859-1", "10:5", "X", "t", ":ID:>0"); print "start getref limit:offset result:\n"; print $clientc->get_data(); print "end getref limit:offset result:\n"; print "getref result summary: $summary\n"; # retrieve notes print "$numtest..$numtotal: getnote\n"; $numtest++; $summary = $clientc->refdb_getnote("xnote", "AB", undef, "UTF-8", "", "X", ":ID:=1"); print "start getnote result:\n"; print $clientc->get_data(); print "end getnote result:\n"; print "getnote result summary: $summary\n"; # retrieve notes using limit:offset print "$numtest..$numtotal: getnote limit:offset\n"; $numtest++; $summary = $clientc->refdb_getnote("xnote", "AB", undef, "UTF-8", "1:1", "X", ":ID:>0"); print "start getnote limit:offset result:\n"; print $clientc->get_data(); print "end getnote limit:offset result:\n"; print "getnote limit:offset result summary: $summary\n"; # test the refdbc:checkref command print "$numtest..$numtotal: checkref\n"; $numtest++; $summary = $clientc->refdb_checkref($risdata, "ris", "ISO-8859-1", "scrn"); print "start checkref result:\n"; print $clientc->get_data(); print "end checkref result:\n"; print "checkref result summary: $summary\n"; # test the refdbc:pickref command print "$numtest..$numtotal: pickref\n"; $numtest++; $summary = $clientcp->refdb_pickref("1-5"); print "start pickref result:\n"; print $clientcp->get_data(); print "end pickref result:\n"; print "pickref result summary: $summary\n"; # test the refdba:listuser command print "$numtest..$numtotal: listuser\n"; $numtest++; $summary = $clienta->refdb_listuser("$testdb"); print "start listuser result:\n"; print $clienta->get_data(); print "end listuser result:\n"; print "listuser result summary: $summary\n"; # test the refdbc:dumpref command print "$numtest..$numtotal: dumpref\n"; $numtest++; $summary = $clientcp->refdb_dumpref("1-5"); print "start dumpref result:\n"; print $clientcp->get_data(); print "end dumpref result:\n"; print "dumpref result summary: $summary\n"; # use the refdbc:whichdb command to see the total number of refs print "$numtest..$numtotal: whichdb\n"; $numtest++; $summary = $clientc->refdb_whichdb(); print "start whichdb result:\n"; print $clientc->get_data(); print "end whichdb result:\n"; print "whichdb result summary: $summary\n"; # test the refdbc:listdb command to list available databases print "$numtest..$numtotal: listdb\n"; $numtest++; $summary = $clientc->refdb_listdb(""); print "start listdb result:\n"; print $clientc->get_data(); print "end listdb result:\n"; print "listdb result summary: $summary\n"; # create a bibliography from a TeX document (or rather, from the .aux file) print "$numtest..$numtotal: getbib (bibtex)\n"; $numtest++; $file = "testdata/bibtest.aux"; my $idstring = $clientc->id_from_aux($file); $summary = $clientc->refdb_texbib("refdbteststyle", $idstring); print "start texbib result:\n"; print $clientc->get_data(); print "end texbib result:\n"; print "texbib result summary: $summary\n"; # create a formatted bibliography print "$numtest..$numtotal: getbib (cooked DocBook)\n"; $numtest++; my $instring; my $file = "testdata/refdbtest.id.xml"; open IN, "< $file"; while () { $instring .= $_; } close IN; $summary = $clientc->refdb_dbib("db31", "refdbteststyle", $bibencoding, $instring); print "start dbib result:\n"; print $clientc->get_data(); print "end dbib result:\n"; print "dbib result summary: $summary\n"; # create a raw bibliography print "$numtest..$numtotal: getrefx (raw DocBook)\n"; $numtest++; my $instring; my $file = "testdata/refdbtest.id.xml"; open IN, "< $file"; while () { $instring .= $_; } close IN; $summary = $clientc->refdb_getrefx("db31", $bibencoding, $instring); print "start getrefx result:\n"; print $clientc->get_data(); print "end getrefx result:\n"; print "getrefx result summary: $summary\n"; # get author names print "$numtest..$numtotal: getau\n"; $numtest++; $summary = $clientc->refdb_getau("", "freq", $author_regex); print "start getau result:\n"; print $clientc->get_data(); print "end getau result:\n"; print "getau result summary: $summary\n"; # get editor names print "$numtest..$numtotal: geted\n"; $numtest++; $summary = $clientc->refdb_geted("", "relfreq", $author_regex); print "start geted result:\n"; print $clientc->get_data(); print "end geted result:\n"; print "geted result summary: $summary\n"; # get series editor names print "$numtest..$numtotal: getas\n"; $numtest++; $summary = $clientc->refdb_getas("", "freq", $author_regex); print "start getas result:\n"; print $clientc->get_data(); print "end getas result:\n"; print "getas result summary: $summary\n"; # get keywords print "$numtest..$numtotal: getkw\n"; $numtest++; $summary = $clientc->refdb_getkw("", "freq", $keyword_regex); print "start getkw result:\n"; print $clientc->get_data(); print "end getkw result:\n"; print "getkw result summary: $summary\n"; # get keywords with limit and offset print "$numtest..$numtotal: getkw using limit:offset\n"; $numtest++; $summary = $clientc->refdb_getkw("5:10", "relfreq", $keyword_regex); print "start getkw limit:offset result:\n"; print $clientc->get_data(); print "end getkw limit:offset result:\n"; print "getkw limit:offset result summary: $summary\n"; # get journal names print "$numtest..$numtotal: getjo\n"; $numtest++; $summary = $clientc->refdb_getjo("f", "", "freq", $periodical_regex); print "start getjo result:\n"; print $clientc->get_data(); print "end getjo result:\n"; print "getjo result summary: $summary\n"; # get journal names (full) print "$numtest..$numtotal: getjf\n"; $numtest++; $summary = $clientc->refdb_getjf("f", "", "freq", $periodical_regex); print "start getjf result:\n"; print $clientc->get_data(); print "end getjf result:\n"; print "getjf result summary: $summary\n"; # get journal names (user abbrev 1) print "$numtest..$numtotal: getj1\n"; $numtest++; $summary = $clientc->refdb_getj1("f", "", "freq", $periodical_regex); print "start getj1 result:\n"; print $clientc->get_data(); print "end getj1 result:\n"; print "getj1 result summary: $summary\n"; # get journal names (user abbrev 2) print "$numtest..$numtotal: getj2\n"; $numtest++; $summary = $clientc->refdb_getj2("f", "", "freq", $periodical_regex); print "start getj2 result:\n"; print $clientc->get_data(); print "end getj2 result:\n"; print "getj2 result summary: $summary\n"; # update journal names print "$numtest..$numtotal: updatejo\n"; $numtest++; $summary = $clientc->refdb_updatejo(":JA:=\'Biochem.Pharmacol.\' :JF:=\'Biochemical Pharmacology\'"); print "start updatejo result:\n"; print $clientc->get_data(); print "end updatejo result:\n"; print "updatejo result summary: $summary\n"; # run keyword scan print "$numtest..$numtotal: scankw\n"; $numtest++; $summary = $clienta->refdb_scankw("perltest"); # take a good nap until the keyword scan is done print "now sleep for 10 seconds..."; sleep 10; print "done\n"; print "start scankw result:\n"; print $clienta->get_data(); print "end scankw result:\n"; print "scankw result summary: $summary\n"; # delete link print "$numtest..$numtotal: deletelink\n"; $numtest++; $summary = $clientc->refdb_deletelink(":NID:=1 :CK:=MILLER1999"); print "start deletelink result:\n"; print $clientc->get_data(); print "end deletelink result:\n"; print "deletelink result summary: $summary\n"; # delete notes print "$numtest..$numtotal: deletenote\n"; $numtest++; $summary = $clientc->refdb_deletenote("1"); print "start deletenote result:\n"; print $clientc->get_data(); print "end deletenote result:\n"; print "deletenote result summary: $summary\n"; # delete references print "$numtest..$numtotal: deleteref\n"; $numtest++; $summary = $clientc->refdb_deleteref("1-20"); print "start deleteref result:\n"; print $clientc->get_data(); print "end deleteref result:\n"; print "deleteref result summary: $summary\n"; # remove the user print "$numtest..$numtotal: deleteuser\n"; $numtest++; $summary = $clienta->refdb_deleteuser($adduser_ip, "$testdb", $cuser); print "start deleteuser result:\n"; print $clientc->get_data(); print "end deleteuser result:\n"; print "deleteuser result summary: $summary\n"; # silently remove the user that picked refs, and the system db entries $summary = $clienta->refdb_deleteuser($adduser_ip, "$testdb", $puser); $summary = $clienta->refdb_deleteuser($adduser_ip, "refdb", $cuser); $summary = $clienta->refdb_deleteuser($adduser_ip, "refdb", $puser); # delete the test database print "$numtest..$numtotal: deletedb\n"; $numtest++; $summary = $clienta->refdb_deletedb("$testdb"); print "start deletedb result:\n"; print $clienta->get_data(); print "end deletedb result:\n"; print "deletedb result summary: $summary\n"; # add reserved journal words to the system database print "$numtest..$numtotal: addword"; $numtest++; $summary = $clienta->refdb_addword("BIMMEL BAMMEL BUMMEL"); print "start addword result:\n"; print $clienta->get_data(); print "end addword result:\n"; print "addword result summary: $summary\n"; # test the refdba:listword command print "$numtest..$numtotal: listword\n"; $numtest++; $summary = $clienta->refdb_listword(""); print "start listword result:\n"; print $clienta->get_data(); print "end listword result:\n"; print "listword result summary: $summary\n"; # remove the reserved journal words again print "$numtest..$numtotal: deleteword\n"; $numtest++; $summary = $clienta->refdb_deleteword("BIMMEL BAMMEL BUMMEL"); print "start deleteword result:\n"; print $clienta->get_data(); print "end deleteword result:\n"; print "deleteword result summary: $summary\n"; # delete the bibliography style print "$numtest..$numtotal: deletestyle\n"; $numtest++; $summary = $clienta->refdb_deletestyle("refdbteststyle"); print "start deletestyle result:\n"; print $clienta->get_data(); print "end deletestyle result:\n"; print "deletestyle result summary: $summary\n"; # reconfigure the server print "$numtest..$numtotal: confserv\n"; $numtest++; $summary = $clienta->refdb_confserv("ping"); print "start confserv result:\n"; print $clienta->get_data(); print "end confserv result:\n"; print "confserv result summary: $summary\n"; print "we're done\n"; exit 0; RefDB-Client-1.18/Client.pm000644 001750 001750 00000304526 10712437672 016246 0ustar00markusmarkus000000 000000 ## package RefDB::Client; ## RefDB Client module ## markus@mhoenicka.de 2003-03-03 ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## Package main documentation =head1 NAME RefDB::Client - Perl extension for talking to a RefDB server =head1 SYNOPSIS use RefDB::Client; =head1 DESCRIPTION RefDB::Client provides functions to talk to a refdbd process like the RefDB C clients do. This module isn't a wrapper for the C clients but uses native Perl code to talk to the server. =head1 FEEDBACK Send bug reports, questions, and comments to the refdb-users mailing list at: refdb-users@lists.sourceforge.net For list information and archives, please visit: http://lists.sourceforge.net/lists/listinfo/refdb-users =head1 AUTHOR Markus Hoenicka, markus@mhoenicka.de =head1 SEE ALSO This module is part of the RefDB package, a reference manager and bibliography tool for markup languages. Please visit http://refdb.sourceforge.net for further information. =cut ###################################################################### ###################################################################### ## defines a class to deal with RIS data package RefDB::Risdata; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); =head2 new Title : new Usage : new RefDB::Risdata(); Function: Creates a new Risdata object =cut ###################################################################### ## new(): creates a new Risdata element ###################################################################### sub new() { my $class = shift; my $self = {}; ## the list that holds the datasets $self->{sets} = (); bless $self, $class; return $self; } =head2 read_ris Title : read_ris Usage : $data->read_ris($file); Function: loads RIS data from a file Parameter: $file: path of file =cut ###################################################################### ## read_ris(): loads RIS data from a file ###################################################################### sub read_ris { my ($self, $file) = @_; my $instring; open IN, "< $file"; while () { $instring .= $_; if ($_ =~ /^ER - /) { push(@{$self->{sets}}, $instring); $instring = ""; } } close IN; $self->{sets}; } =head2 get_ris Title : get_ris Usage : $data->get_ris(); Function: returns previously loaded RIS data =cut ###################################################################### ## get_ris(): returns previously loaded RIS data ###################################################################### sub get_ris { my ($self) = @_; $self->{sets}; } ###################################################################### ###################################################################### ## defines a helper class for retrieving simple lists from the server package RefDB::Simplelist; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use constant REFDB_PROTOCOL_VERSION => 6; use constant COMMAND_INBUF_LENGTH => 4096; use constant OUTBUF_LEN => 4096; =head2 new Title : new Usage : new RefDB::Simplelist; Function: creates a new Simplelist element =cut ###################################################################### ## new(): creates a new Simplelist element ###################################################################### sub new() { my $class = shift; my $self = {}; ## the buffer that holds the command sent to the server $self->{cmd} = undef; ## the buffer that holds the message received from the server $self->{inbuffer} = undef; ## the buffer that holds the summary received from the server #$self->{summary} = undef; ## the data in list format $self->{result} = (); ## whether or not to close $self->{close} = "t"; bless $self, $class; return $self; } ###################################################################### ###################################################################### ## defines a helper class for password encryption package RefDB::Enigma; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); =head2 new Title : new Usage : new RefDB::Enigma; Function: creates a new Enigma element =cut ###################################################################### ## new(): creates a new Enigma element ###################################################################### sub new() { my $class = shift; my $self = {}; ## the buffer that holds the raw password string $self->{rawpass} = undef; ## the buffer that receives the encoded password string $self->{encodedpass} = undef; ## the buffer that receives the numberized encoded password string $self->{numberpass} = undef; ## the buffer that holds the scramble string $self->{scramble} = undef; ## this array maps the available rotors 0-2 to the slots 0-2 @{$self->{rotormap}} = (); ## this array holds the rotor positions for the rotors in the slots 0-2 @{$self->{rotorpos}} = (); ## the rotor wirings for the rotors 0-2 @{$self->{rotor}} = ( # Input "!\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" ["0", "u", "V", "`", "\$", "/", "z", "G", "7", "3", "L", "a", "*", "N", "[", ";", "U", "F", "Z", "^", "l", "t", "m", "{", "]", "\"", "s", "=", "b", "Q", "+", "?", "O", "A", "g", "w", "T", "5", "c", "W", "v", "#", "~", "}", ")", "o", "M", "S", "\'", "_", "\\", "@", "K", "(", "d", "D", "p", "|", "y", "8", "B", "%", "Y", "x", "J", "2", ":", "9", "&", "r", "4", "!", "k", "f", "-", "j", ".", "h", "1", "6", "I", "C", "i", ",", "R", "n", "e", "<", "E", "P", "q", ">", "X", "H"], # 0 ["E", "P", "l", "b", "(", "S", "O", "\'", "D", "p", "|", "y", "8", "B", "x", "t", "J", "2", ":", "j", ".", "h", "f", "-", "I", "C", "i", ",", "R", "n", "e", "0", "G", "\"", "1", "6", "9", "&", "%", "Y", "_", "\\", "k", "7", "3", "u", "V", "\$", "/", "z", "N", "@", "F", "Z", "^", "m", "{", "]", "s", "w", "X", "U", "T", "5", "c", "W", "v", "#", "=", "H", "q", "r", "4", "!", "[", ";", "<", ">", "g", "~", "}", ")", "Q", "+", "L", "a", "*", "d", "?", "A", "K", "`", "o", "M"], # 1 ["r", "4", "!", "[", ";", "<", "/", "z", "\$", "s", "`", "w", "X", "U", "T", "q", "{", "]", ">", "S", "5", ")", "@", "F", "Z", "Q", "D", "M", "|", "y", "8", "c", "W", "0", "G", "\"", "u", "v", "R", "Y", "_", "\\", "#", "=", "p", "a", "*", "d", "?", "A", "K", "+", "L", "E", "P", "l", "b", "(", "\'", "H", "1", "6", "t", "J", "2", ":", "j", ".", "n", "e", "9", "&", "%", "h", "f", "-", "I", "C", "i", "m", "o", "B", "x", ",", "k", "7", "O", "3", "V", "g", "~", "}", "N", "^"] # 2 ); # the reflector array must be symmetrical, e.g. if ! maps to /, / must also map to ! @{$self->{reflector}} = ( "/", "-", "Q", "=", "~", "E", "1", ".", "6", "4", "2", "H", "\"", "(", "!", "?", "\'", "+", "X", "*", ">", ")", "S", "c", "v", "@", "<", ";", "\$", "5", "0", ":", "R", "u", "n", "Z", "&", "r", "{", ",", "Y", "M", "s", "p", "J", "^", "z", "q", "#", "A", "7", "g", "\\", "f", "h", "3", "I", "D", "e", "U", "}", "N", "y", "w", "d", "o", "8", "a", "[", "V", "T", "W", "|", "m", "x", "t", "j", "C", "b", "L", "P", "F", "K", "l", "B", "9", "`", "k", "_", "O", "G", "i", "]", "%" ); bless $self, $class; return $self; } ###################################################################### ## init(): set the parameters ## Arguments: - raw password ## - scramble string ###################################################################### sub init { my ($self, $rawpass, $scramble) = @_; $self->{rawpass} = $rawpass; $self->{scramble} = $scramble; } ###################################################################### ## get_pass(): get the numberized encoded password ###################################################################### sub get_pass { my ($self) = @_; return $self->{numberpass}; } ###################################################################### ## eenc(): encode or decode a password string ## returns the numberized encoded password ###################################################################### sub eenc { my ($self) = @_; # set initial wheel sequence and wheel positions $self->_set_wheels(); # split the raw password into individual characters my @pw = split(/ */, $self->{rawpass}); my $scrambledchar = undef; # this array will receive the permuted characters my @encchar = (); # loop over all characters in the raw password foreach my $pwchar (@pw) { # first send the character through all rotors in the forward direction $scrambledchar = $self->_wheel($pwchar, 0); $scrambledchar = $self->_wheel($scrambledchar, 1); $scrambledchar = $self->_wheel($scrambledchar, 2); # send the character through the reflector $scrambledchar = $self->_reflect($scrambledchar); # send the character through all rotors in the reverse direction $scrambledchar = $self->_rwheel($scrambledchar, 2); $scrambledchar = $self->_rwheel($scrambledchar, 1); $scrambledchar = $self->_rwheel($scrambledchar, 0); # advance all wheels one position $self->_move_wheels(); # add the permuted character to the encoded password push @encchar, $scrambledchar; } # glue the permuted characters together $self->{encodedpass} = join('', @encchar); # numberize the encoded password and return it $self->_numberize(); } ###################################################################### ## _set_wheels(): set the wheel position ###################################################################### sub _set_wheels { my ($self) = @_; # sanity check if (length($self->{scramble}) < 12) { return 1; } # use first three characters of the scramble string as rotor map $self->{rotormap}[0] = ord(substr($self->{scramble}, 0, 1)) - 48; $self->{rotormap}[1] = ord(substr($self->{scramble}, 1, 1)) - 48; $self->{rotormap}[2] = ord(substr($self->{scramble}, 2, 1)) - 48; # slot values must be between 0 and 2 and we don't use # a wheel twice if ($self->{rotormap}[0] == $self->{rotormap}[1] || $self->{rotormap}[1] == $self->{rotormap}[2] || $self->{rotormap}[0] == $self->{rotormap}[2] || $self->{rotormap}[0] < 0 || $self->{rotormap}[0] > 2 || $self->{rotormap}[1] < 0 || $self->{rotormap}[1] > 2 || $self->{rotormap}[2] < 0 || $self->{rotormap}[2] > 2) { return 1; } # loop over slots foreach my $i (0 .. 2) { # retrieve wheel positions from scramble string $self->{rotorpos}->[$i] = substr($self->{scramble}, ($i*3)+4, 2); if ($self->{rotorpos}->[$i] < 0 || $self->{rotorpos}->[$i] > 94) { return 1; # out of range } } return 0; } ###################################################################### ## _wheel(): performs character permutation on a wheel in the forward ## direction ###################################################################### sub _wheel { my ($self, $char, $wheel) = @_; my $outchar = undef; $outchar = $self->{rotor}[$self->{rotormap}[$wheel]][(ord($char)-33+$self->{rotorpos}->[$wheel]) % 94]; return $outchar; } ###################################################################### ## _reflect(): performs character permutation on the reflector ###################################################################### sub _reflect { my ($self, $char) = @_; my $outchar = undef; my $conv = ord($char)-33; $outchar = $self->{reflector}[ord($char)-33]; } ###################################################################### ## _rwheel(): performs character permutation on a wheel in the reverse ## direction ###################################################################### sub _rwheel { my ($self, $char, $wheel) = @_; my $outchar = undef; my $charindex = 0; # loop over all characters in the rotor to do a reverse lookup foreach my $wheelchar (@{$self->{rotor}[$self->{rotormap}[$wheel]]}) { if ($char eq $wheelchar) { $outchar = $charindex + 33 - $self->{rotorpos}[$wheel]; while ($outchar < 33) { $outchar += 94; } last; # jump out when the character is found } $charindex++; } # $outchar = sprintf "%c", $outchar; $outchar = chr($outchar); } ###################################################################### ## _move_wheels(): advance the wheels one position ###################################################################### sub _move_wheels { my ($self) = @_; $self->{rotorpos}[0] = ($self->{rotorpos}[0]+1) % 94; $self->{rotorpos}[1] = ($self->{rotorpos}[1]+1) % 94; $self->{rotorpos}[2] = ($self->{rotorpos}[2]+1) % 94; } ###################################################################### ## _numberize(): converts the encoded password to a numerical form ###################################################################### sub _numberize { my ($self) = @_; # split password into characters and loop over them foreach my $char (split(/ */, $self->{encodedpass})) { $self->{numberpass} .= sprintf("%03d", ord($char)); } return $self->{numberpass}; } ###################################################################### ###################################################################### ## defines the main class to talk to the refdbd server package RefDB::Client; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use constant REFDB_PROTOCOL_VERSION => 6; use constant COMMAND_INBUF_LENGTH => 4096; use constant OUTBUF_LEN => 4096; use constant COMMAND_INBUF_LEN => 4096; use constant XMLPARSE_CHUNKSIZE => 4096; use constant TERM_YES => 1; use constant TERM_NO => 0; use constant TERM_LEN => 4; use constant STATUS_LEN => 3; use Socket; $VERSION = "1.18"; =head2 new Title : new Usage : new RefDB::Client; Function: creates a new Client element =cut ###################################################################### ## new(): creates a new Client element ###################################################################### sub new() { my $class = shift; my $self = {}; ## the socket used for communication $self->{socket} = undef; ## the IP address of the host $self->{server_ip} = undef; ## the port address of the host $self->{port_address} = undef; ## the username $self->{username} = undef; ## the raw password $self->{passwd} = undef; ## the numberized, scrambled password $self->{numberized_passwd} = undef; ## the scramble string used for the current connection $self->{scramble_string} = undef; ## the database name $self->{db} = undef; ## the pdfroot (directory or base URL) $self->{pdf_root} = undef; ## the URL of a CSS style sheet for the getref html output $self->{css_url} = undef; ## the time in seconds after which a stale connection times out $self->{timeout} = 180; ## the client/server message terminator $self->{CS_TERM} = "\x00\x00\x00\x00"; ## the server status $self->{server_status} = undef; ## the data returned by a client command are stored here $self->{server_data} = undef; ## the summary returned by a client command is stored here $self->{server_summary} = undef; ## the style specification returned by the getbib command is stored here $self->{stylespec} = undef; ## the status messages %{$self->{refstat}} = ( "000" => "ok", "001" => "error", "100" => "void", "101" => "incorrect scramble string", "102" => "client and server protocols do not match", "103" => "invalid client request", "104" => "incomplete client command", "105" => "missing client command", "106" => "missing client command option", "107" => "unknown client command option", "108" => "could not descramble password", "109" => "timeout while reading", "110" => "timeout while writing", "111" => "missing client command argument", "112" => "client aborted command", "200" => "void", "201" => "main database is missing", "202" => "could not open main database", "203" => "main database is too old or corrupt", "204" => "could not open reference database", "205" => "could not connect to database server", "206" => "main database version is not supported", "207" => "could not create result from database query", "208" => "could not retrieve reference database metadata", "209" => "could not create reference database", "210" => "could not create reference database metadata", "211" => "create t_meta failed", "212" => "create t_refdb failed", "213" => "create t_author failed", "214" => "create t_keyword failed", "215" => "create t_periodical failed", "216" => "create t_note failed", "217" => "create t_user failed", "218" => "create t_xauthor failed", "219" => "create t_xkeyword failed", "220" => "create t_xuser failed", "221" => "create t_xnote failed", "222" => "could not create user group", "223" => "could not grant user permissions", "224" => "access control not supported", "225" => "not a RefDB database", "226" => "database does not exist", "227" => "begin transaction failed", "228" => "cannot lock tables", "229" => "failed to remove keyword", "230" => "failed to remove author", "231" => "failed to remove periodical", "232" => "failed to update main reference data", "233" => "inserting reference data failed", "234" => "select failed", "235" => "database successfully created", "236" => "assume localhost as host", "237" => "grant user permissions successful", "238" => "revoke user permissions successful", "239" => "could not revoke user permissions", "240" => "switched to database", "241" => "failed to access style data", "242" => "create temporary table failed", "243" => "delete temporary table failed", "244" => "incomplete reference data", "245" => "failed to remove note xlink", "246" => "failed to delete main note data", "247" => "failed to remove user", "248" => "failed to delete main reference data", "249" => "failed to delete database", "250" => "could not delete user group", "251" => "database successfully deleted", "252" => "personal interest list is empty", "253" => "failed to detach dataset from user", "254" => "sucessfully detached dataset from user", "255" => "failed to attach dataset to user", "256" => "sucessfully attached dataset to user", "257" => "create t_link failed", "258" => "create t_xlink failed", "259" => "failed to remove ulink", "260" => "failed to update journal names", "261" => "failed to create citation key", "262" => "failed to create personal list", "263" => "successfully created personal list", "264" => "failed to delete personal list", "265" => "successfully deleted personal list", "266" => "personal list not owned by current user", "267" => "personal list does not exist", "268" => "create t_temp_xdup failed", "300" => "void", "301" => "missing argument", "302" => "unknown output format", "400" => "void", "401" => "no more data available", "402" => "finished transferring data", "403" => "chunk added successfully", "404" => "finished transferring dataset", "405" => "finished adding dataset", "406" => "citation key", "407" => "refused to overwrite dataset", "408" => "dataset added successfully", "409" => "numerical id ignored", "410" => "numerical id nonexistent", "411" => "citation key nonexistent", "412" => "ID and citation key missing", "413" => "dataset updated successfully", "414" => "failed to add dataset", "415" => "missing link target", "416" => "incorrect link type", "417" => "dataset not found", "418" => "link already exists", "419" => "dataset removed successfully", "420" => "failed to remove dataset", "421" => "link added successfully", "422" => "only owner can fiddle with dataset", "423" => "dataset is still in use", "424" => "dataset is already attached to user", "425" => "periodical name changed successfully", "426" => "reference type changed", "700" => "void", "701" => "failed to initialize character set conversion", "702" => "character set conversion failed", "703" => "remote administration disabled", "704" => "administration is not restricted", "705" => "administration not permitted", "706" => "administration permitted", "707" => "process ID", "708" => "application server stop submitted", "709" => "set server IP submitted", "710" => "set timeout submitted", "711" => "set logfile submitted", "712" => "set logdest submitted", "713" => "set loglevel submitted", "800" => "void", "801" => "out of memory", "802" => "failed to load cgi templates", "803" => "command partially processed, aborted after unrecoverable error", "804" => "suffix pool exhausted", "805" => "REFNUMBER formatting failed", "806" => "AUTHORLIST formatting failed", "807" => "EDITORLIST formatting failed", "808" => "SEDITORLIST formatting failed", "809" => "PUBDATE formatting failed", "810" => "PUBDATESEC formatting failed", "811" => "TITLE formatting failed", "812" => "BOOKTITLE formatting failed", "813" => "SERIESTITLE formatting failed", "814" => "JOURNALNAME formatting failed", "815" => "VOLUME formatting failed", "816" => "ISSUE formatting failed", "817" => "PAGES formatting failed", "818" => "PUBLISHER formatting failed", "819" => "PUBPLACE formatting failed", "820" => "SERIAL formatting failed", "821" => "ADDRESS formatting failed", "822" => "URL formatting failed", "823" => "USERDEF1 formatting failed", "824" => "USERDEF2 formatting failed", "825" => "USERDEF3 formatting failed", "826" => "USERDEF4 formatting failed", "827" => "USERDEF5 formatting failed", "828" => "MISC1 formatting failed", "829" => "MISC2 formatting failed", "830" => "MISC3 formatting failed", "831" => "LINK1 formatting failed", "832" => "LINK2 formatting failed", "833" => "LINK3 formatting failed", "834" => "LINK4 formatting failed", "835" => "ABSTRACT formatting failed", "836" => "NOTES formatting failed", "837" => "SEPARATOR formatting failed", "838" => "remote administration failed", "839" => "child->parent communication failure", "840" => "FIFO write error", "841" => "unknown command", "999" => "summary", ); bless $self, $class; return $self; } =head2 set_conninfo Title : set_conninfo Usage : $client->set_conninfo($server_ip, $port_address, $username, $password, $database, $pdf_root, $css_url, $timeout); Function: sets the initial connection parameters of a Client object Parameter: $server_ip: IP address or hostname of the server that runs refdbd Parameter: $port_address: Port address at which refdbd listens Parameter: $username: Username for database password authentication Parameter: $password: Password for database password authentication Parameter: $database: Name of the reference database Parameter: $pdf_root: Path of the root directory of all electronic offprints Parameter: $css_url: URL of a Cascading Stylesheets file for (X)HTML output Parameter: $timeout: time in seconds after which a stale connection is dropped =cut ###################################################################### ## set_conninfo(): sets the initial connection parameters of a Client object ###################################################################### sub set_conninfo { my ($self, $server_ip, $port_address, $username, $passwd, $db, $pdf_root, $css_url, $timeout) = @_; $self->{server_ip} = $server_ip; $self->{port_address} = $port_address; $self->{username} = $username; $self->{passwd} = $passwd; $self->{db} = $db; $self->{pdf_root} = $pdf_root; $self->{css_url} = $css_url; $self->{timeout} = $timeout; } sub id_from_aux { my ($self, $file) = @_; my $idstring = undef; my @idlist; # in order to avoid duplicate citations we add all citation keys # to a list, then we sort the list and eliminate consecutive # duplicates open IN, "< $file"; while () { my $line = $_; if ($line =~ s/^\\citation\{(.*)\}\s/$1/) { push(@idlist, $line); } } close IN; @idlist = sort @idlist; my $previtem = undef; foreach my $item (@idlist) { unless ($previtem eq $item) { $idstring .= $item . " "; $previtem = $item; } } # this is now a space-separated list of IDs/citation keys $idstring; } ###################################################################### ## _connect_to_server(): establishes server connection via socket ###################################################################### sub _connect_to_server { my ($self) = @_; if ($self->{port_address} =~ /\D/) { $self->{port_address} = getservbyname($self->{port_address}, 'tcp'); } die "No port" unless $self->{port_address}; my $iaddr = inet_aton($self->{server_ip}) || die "no host: $self->{server_ip}"; my $paddr = sockaddr_in($self->{port_address}, $iaddr); my $proto = getprotobyname('tcp'); $self->{socket} = eval { local *SOCK; socket(SOCK, PF_INET, SOCK_STREAM, $proto) or die "socket: $!"; connect(SOCK, $paddr) or die "connect: $!"; *SOCK{IO}}; die "could not set up socket connection" unless $self->{socket}; } ###################################################################### ## _init_dialog(): starts client/server dialog with password authentication ###################################################################### sub _init_dialog { my ($self) = @_; my $inbuffer; $self->_connect_to_server(); my $socket = $self->{socket}; # send protocol version my $proto = REFDB_PROTOCOL_VERSION; # syswrite($socket, "$proto"); $self->_iwrite("$proto", TERM_YES); # read server status $self->_read_status(); unless (defined($self->{server_status})) { die "could not read from server"; } # check for server error status if ($self->{server_status} ne "000") { my $msg = $self->get_status_msg(); die "server error: $msg\n"; } # read password scramble string unless (defined($self->{scramble_string} = $self->_tread(OUTBUF_LEN))) { die "could not read from server"; } if (length($self->{passwd}) > 0) { my $enigma = new RefDB::Enigma; $enigma->init($self->{passwd}, $self->{scramble_string}); $self->{numberized_passwd} = $enigma->eenc(); } else { $self->{numberized_passwd} = ""; } #print $self->{numberized_passwd}; } ###################################################################### ## _tread(): reads $len bytes from a socket or less if a NULL is found ###################################################################### sub _tread { my ($self, $len) = @_; # my $socket = $self->{socket}; my $result; eval { # use an alarm to timeout a stale connection local $SIG{ALRM} = sub { die "alarm\n" }; alarm $self->{timeout}; while (sysread($self->{socket}, my $line, $len)) { $result .= $line; if ($line =~ /$self->{CS_TERM}/) { last; } } alarm 0; }; if ($@) { # propagate errors not caused by the eval code die unless $@ eq "alarm\n"; # return an empty string return undef; } $result; } ###################################################################### ## _iread(): reads $len bytes from a socket ###################################################################### sub _iread { my ($self, $len) = @_; # my $socket = $self->{socket}; my $result; eval { # use an alarm to timeout a stale connection local $SIG{ALRM} = sub { die "alarm\n" }; alarm $self->{timeout}; while (sysread($self->{socket}, my $line, $len)) { $result .= $line; if (length($line) == $len ) { last; } } alarm 0; }; if ($@) { # propagate errors not caused by the eval code die unless $@ eq "alarm\n"; # return an empty string return undef; } $result; } ###################################################################### ## _iwrite(): sends $len bytes to a socket ###################################################################### sub _iwrite { my ($self, $buffer, $term) = @_; my $result; eval { # use an alarm to timeout a stale connection local $SIG{ALRM} = sub { die "alarm\n" }; alarm $self->{timeout}; if ($term) { syswrite($self->{socket}, $buffer . $self->{CS_TERM}); } else { syswrite($self->{socket}, $buffer); } alarm 0; }; if ($@) { # propagate errors not caused by the eval code die unless $@ eq "alarm\n"; # return an empty string return 1; } return 0; } ###################################################################### ## _send_status(): sends the status bytes preceding each message ###################################################################### sub _send_status { my ($self, $status, $term) = @_; # print "sent status code $status<<\n"; $self->_iwrite($status, $term); } ###################################################################### ## _read_status(): reads the status bytes preceding each message ###################################################################### sub _read_status { my ($self) = @_; $self->{server_status} = $self->_iread(STATUS_LEN); } =head2 get_status Title : get_status Usage : $client->get_status(); Function: returns the numerical server status =cut ###################################################################### ## get_status(): returns the server status ###################################################################### sub get_status { my ($self) = @_; $self->{server_status}; } =head2 get_status_msg Title : get_status_msg Usage : $client->get_status_msg(); Function: returns the server status message =cut ###################################################################### ## get_status_msg(): returns the server status ###################################################################### sub get_status_msg { my ($self) = @_; $self->{refstat}{$self->{server_status}}; } =head2 translate_status Title : translate_status Usage : $client->translate_status($status); Function: translates a given server status into a human readable message =cut ###################################################################### ## translate_status(): translates a status into a message ###################################################################### sub translate_status { my ($self, $status) = @_; $self->{refstat}{$status}; } =head2 get_data Title : get_data Usage : $client->get_data(); Function: returns the data of the most recent command =cut ###################################################################### ## get_data(): returns the server data ###################################################################### sub get_data { my ($self) = @_; $self->{server_data}; } =head2 get_summary Title : get_summary Usage : $client->get_summary(); Function: returns the summary of the most recent command =cut ###################################################################### ## get_summary(): returns the server summary ###################################################################### sub get_summary { my ($self) = @_; $self->{server_summary}; } ###################################################################### ## _listvalue(): retrieves a list from the server ###################################################################### sub _listvalue { my ($self, $cmd) = @_; $self->_init_dialog(); my $sl = new RefDB::Simplelist; $sl->{cmd} = $cmd; if (length($self->{username}) > 0) { $sl->{cmd} .= " -u $self->{username}"; } if (length($self->{numberized_passwd}) > 0) { $sl->{cmd} .= " -w $self->{numberized_passwd}"; } $self->{server_data} = $self->_getsimplelist($sl); # return result summary $self->{summary} = $sl->{summary}; } ###################################################################### ## _getsimplelist(): sends command to the server to retrieve a simple list ###################################################################### sub _getsimplelist { my ($self, $sl) = @_; $self->_send_status("000", TERM_NO); $self->_iwrite($sl->{cmd}, TERM_YES); #print $sl->{cmd}; my $inbuffer; $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $sl->{inbuffer} .= $inbuffer; if ($sl->{inbuffer} =~ s/$self->{CS_TERM}//) { last; } } # print "sl inbuffer went to:$sl->{inbuffer}<<\n"; $self->_send_status("000", TERM_NO); # retrieve command summary $self->_read_status(); if ($self->{server_status} ne "000" && $self->{server_status} ne "418") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $sl->{summary} .= $inbuffer; if ($sl->{summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # print "sl summary went to:$sl->{summary}<<\n"; if ($self->{close} eq "t") { close ($self->{socket}); } $self->{server_summary} = $sl->{summary}; # return data $sl->{inbuffer}; } ###################################################################### ## _addref(): adds or updates references ###################################################################### sub _addref { my ($self, $cmd, $refdata, $type) = @_; $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); my $result; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_read_status(); if ($self->{server_status} ne "000") { if ($self->{server_status} eq "701") { # charset conversion error, treated as non-fatal $self->{server_data} .= $self->get_status_msg(); } else { return $self->get_status_msg(); } } if ($type eq "ris") { # now loop over the datasets and send them one at a time foreach my $dataset (@{$refdata->{sets}}) { # Phase 1: transmit length of next dataset $self->_send_status("000", TERM_NO); my $datalength = length($dataset)+TERM_LEN; #print "datalength went to:$datalength<<\n"; $self->_iwrite("$datalength", TERM_YES); # Phase 2: read acknowledgement from server $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } # Phase 3: send dataset $self->_iwrite($dataset, TERM_YES); # Phase 4: read server reply $result = undef; $self->_read_status(); if ($self->{server_status} eq "400" || $self->{server_status} eq "407" || $self->{server_status} eq "408" || $self->{server_status} eq "413" || $self->{server_status} eq "414" || $self->{server_status} eq "702") { # retrieve server-generated status/error message while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } if ($self->{server_status} eq "400" || $self->{server_status} eq "702") { return $self->{server_data}; } } } } else { # assume risx $self->{server_data} .= $self->_send_xml($refdata); } # Phase 5: signal server that we're done $self->_send_status("402", TERM_NO); $self->_read_status(); if ($self->{server_status} ne "403") { if ($self->{server_status} eq "400") { # retrieve server-generated status/error message while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } } else { $self->{server_data}.= $self->get_status_msg(); } } # read data $result = undef; while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } #print $result . "\n"; # don't ask me why this is necessary # $self->{server_data} =~ s/$self->{CS_TERM}//; $self->_send_status("000", TERM_NO); # read summary $self->_read_status(); while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); $self->{server_summary}; } ###################################################################### ## _addnote(): adds or updates notes ###################################################################### sub _addnote { my ($self, $cmd, $xnotedata) = @_; $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_read_status(); if ($self->{server_status} ne "000") { if ($self->{server_status} eq "701") { # charset conversion error, treated as non-fatal $self->{server_data} .= $self->get_status_msg(); } else { return $self->get_status_msg(); } } $self->{server_data} .= $self->_send_xml($xnotedata); # Phase 5: signal server that we're done $self->_send_status("402", TERM_NO); $self->_read_status(); if ($self->{server_status} ne "403") { if ($self->{server_status} eq "400") { # retrieve server-generated status/error message while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } } else { $self->{server_data} .= $self->get_status_msg(); } } # read data while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # read summary $self->_read_status(); while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); $self->{server_summary}; } ###################################################################### ## _adduser(): adds new users to the database ###################################################################### sub _adduser { my ($self, $host, $database, $newuserpasswd, $is_add, $arg) = @_; $self->_init_dialog(); my $cmd = "adduser "; if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } # if no database is provided, use the database we're currently # connected to if (length($database) > 0) { $cmd .= "-d $database "; } elsif (length($self->{db}) > 0) { $cmd .= "-d $self->{db} "; } if (length($host) > 0) { $cmd .= "-H $host "; } if (length($newuserpasswd) > 0) { my $enigma = new RefDB::Enigma; $enigma->init($newuserpasswd, $self->{scramble_string}); my $numberized_passwd = $enigma->eenc(); $cmd .= "-W $numberized_passwd "; } unless ($is_add eq "t") { $cmd .= "-r "; } $self->_send_status("000", TERM_NO); $self->_iwrite("$cmd", TERM_YES); # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } my $index = 0; my $arglength = length($arg); $self->_send_status("000", TERM_NO); $self->_iwrite($arg, TERM_YES); # read data $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # read summary $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); close ($self->{socket}); $self->{server_summary}; } ###################################################################### ## _addlink(): links notes to database objects ###################################################################### sub _addlink { my ($self, $remove, $arg) = @_; my $cmd; $cmd = "addlink -d $self->{db} "; if ($remove eq "t") { $cmd .= "-r "; } $cmd .= "\"" . $arg . "\""; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue($cmd); } ###################################################################### ## _addword(): adds/removes a reserved word ###################################################################### sub _addword { my ($self, $is_remove, $arg) = @_; $self->_init_dialog(); my $cmd = "addword "; if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if ($is_remove eq "t") { $cmd .= "-r "; } # send command $self->_send_status("000", TERM_NO); $self->_iwrite("$cmd", TERM_YES); # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } # send argument (word list) $self->_send_status("000", TERM_NO); $self->_iwrite($arg, TERM_YES); # read data $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # read summary $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } # finish dialog $self->_send_status("000", TERM_NO); close ($self->{socket}); $self->{server_summary}; } ###################################################################### ## _pickref(): adds/removes references from personal reference list ###################################################################### sub _pickref { my ($self, $arg, $is_remove, $listname) = @_; my $cmd = "pickref -d $self->{db} "; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($listname) > 0) { $cmd .= "-b $listname "; } if ($is_remove eq "t") { $cmd .= "-r "; } my $arglength = length($arg) + length($self->{CS_TERM}); $cmd .= "$arglength"; $self->_send_status("000", TERM_NO); $self->_iwrite("$cmd", TERM_YES); # reset data $self->{server_data} = ""; $self->{server_summary} = ""; # read data $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } my $sl = new RefDB::Simplelist; $sl->{cmd} = $arg; # return the result as a list of lines $self->{server_data} = $self->_getsimplelist($sl); # return result summary $self->{summary} = $sl->{summary}; } ###################################################################### ## _send_xml(): helper to send XML data to the server ###################################################################### sub _send_xml { my ($self, $styledata) = @_; my $index = 0; my $stylelength = length($styledata); my $result_pool; # now loop over XMLPARSE_CHUNKSIZE chunks and send them one at a time while ($stylelength > 0) { # Phase 1: transmit length of next dataset my $datalength = ($stylelength > XMLPARSE_CHUNKSIZE) ? XMLPARSE_CHUNKSIZE : $stylelength; $self->_send_status("000", TERM_NO); $self->_iwrite("$datalength", TERM_YES); # Phase 2: read acknowledgement from server my $result = undef; $self->_read_status(); if ($self->{server_status} ne "000") { $result_pool .= $self->get_status_msg(); return; } # Phase 3: send dataset $self->_iwrite(substr($styledata, $index, XMLPARSE_CHUNKSIZE), TERM_NO); # Phase 4: read server reply $result = undef; $self->_read_status(); if ($self->{server_status} ne "403") { $result_pool .= $self->_tread(OUTBUF_LEN); return; } $stylelength -= $datalength; $index += $datalength; } return $result_pool; } ###################################################################### ## client commands =head2 refdb_addstyle Title : refdb_addstyle Usage : $client->refdb_addstyle($styledata); Function: adds a citation/bibliography style to the database Parameter: $styledata: XML data representing the bibliography style =cut ###################################################################### ## refdb_addstyle(): adds a citation/bibliography style to the database ###################################################################### sub refdb_addstyle { my ($self, $styledata) = @_; my $cmd = "addstyle "; $self->_init_dialog(); if (defined($self->{username})) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } $self->_send_status("000", TERM_NO); $self->_iwrite("$cmd", TERM_YES); my $result; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } # Phases 1 through 4 of client/server dialog $self->{server_data} .= $self->_send_xml($styledata); if ($self->{server_status} ne "403") { return "999:0"; } # Phase 5: signal server that we're done $self->_send_status("402", TERM_NO); # read data $self->_read_status(); if ($self->{server_status} eq "400") { while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } return "999:0"; } while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # read summary $self->_read_status(); while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); close ($self->{socket}); $self->{server_summary}; } =head2 refdb_adduser Title : refdb_adduser Usage : $client->refdb_adduser($host, $database, $newuserpassword, $username); Function: adds new users to the database Parameter: $host: host specification from which the user is allowed to connect Parameter: $database: name of the reference database Parameter: $newuserpassword: password (required only for new users) Parameter: $username: name of the user, as used to authenticate at the database engine =cut ###################################################################### ## refdb_adduser(): adds new users to the database ###################################################################### sub refdb_adduser { my ($self, $host, $database, $newuserpasswd, $username) = @_; $self->_adduser($host, $database, $newuserpasswd, "t" , $username); } =head2 refdb_deleteuser Title : refdb_deleteuser Usage : $client->refdb_deleteuser($host, $database, $username); Function: deletes users from the database Parameter: $host: host specification from which the user is allowed to connect Parameter: $database: name of the reference database Parameter: $username: name of the user, as used to authenticate at the database engine =cut ###################################################################### ## refdb_deleteuser(): deletes users from the database ###################################################################### sub refdb_deleteuser { my ($self, $host, $database, $username) = @_; $self->_adduser($host, $database, undef, "f" , $username); } =head2 refdb_addword Title : refdb_addword Usage : $client->refdb_addword($words); Function: adds reserved words to the main database Parameter: $words: space-separated list of words =cut ###################################################################### ## refdb_addword(): adds/removes a reserved word ###################################################################### sub refdb_addword { my ($self, $words) = @_; $self->_addword("f", $words); } =head2 refdb_deleteword Title : refdb_deleteword Usage : $summary = $client->refdb_deleteword($words); Function: removes reserved words from the main database Parameter: $words: space-separated list of words =cut ###################################################################### ## refdb_deleteword(): removes reserved words ###################################################################### sub refdb_deleteword { my ($self, $words) = @_; $self->_addword("t", $words); } =head2 refdb_confserv Title : refdb_confserv Usage : $client->refdb_confserv($command); Function: sends a configuration command to the server Parameter: $command: the command proper, optionally followed by an argument =cut ###################################################################### ## refdb_confserv(): sends a configuration command to the server ###################################################################### sub refdb_confserv { my ($self, $command) = @_; $self->{server_summary} = $self->_listvalue("confserv $command"); close ($self->{socket}); if ($command eq "stop" && $self->{server_summary} eq "708") { $self->_init_dialog(); close ($self->{socket}); } $self->{server_summary}; } =head2 refdb_createdb Title : refdb_createdb Usage : $client->refdb_createdb($dbname, $encoding); Function: creates a new database Parameter: $dbname: name of the reference database Parameter: $encoding: character encoding =cut ###################################################################### ## refdb_createdb(): creates a new database ###################################################################### sub refdb_createdb { my ($self, $dbname, $encoding) = @_; my $arg .= $dbname; if (length($encoding) > 0) { $arg .= "-E $encoding"; } # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("createdb $arg"); } =head2 refdb_deletedb Title : refdb_deletedb Usage : $client->refdb_deletedb($databasename); Function: deletes a reference database Parameter: $dbname: name of the database =cut ###################################################################### ## refdb_deletedb(): deletes reference databases ###################################################################### sub refdb_deletedb { my ($self, $dbname) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("deletedb $dbname"); } =head2 refdb_deletestyle Title : refdb_deletestyle Usage : $client->refdb_deletestyle($stylename_regexp); Function: deletes citation/bibliography styles Parameter: $stylename_regexp: regular expression describing the names of the styles to be deleted =cut ###################################################################### ## refdb_deletestyle(): removes citation/bibliography styles ###################################################################### sub refdb_deletestyle { my ($self, $arg) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("deletestyle $arg"); } =head2 refdb_getstyle Title : refdb_getstyle Usage : $client->refdb_getstyle($stylename); Function: retrieves a citation/bibliography style as a citestylex doc Parameter: $stylename: name of the style =cut ###################################################################### ## refdb_getstyle(): retrieves a citation/bibliography style ###################################################################### sub refdb_getstyle { my ($self, $stylename) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("getstyle $stylename"); } =head2 refdb_listdb Title : refdb_listdb Usage : $client->refdb_listdb($dbname_regexp); Function: lists matching databases Parameter: $dbname_regexp: regular expression describing the database names =cut ###################################################################### ## refdb_listdb(): lists matching databases ###################################################################### sub refdb_listdb { my ($self, $arg) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("listdb $arg"); } =head2 refdb_listuser Title : refdb_listuser Usage : $client->refdb_listuser($dbname, $username_regexp); Function: lists matching user names Parameter: $username_regexp: regular expression describing the user names =cut ###################################################################### ## refdb_listuser(): lists matching databases ###################################################################### sub refdb_listuser { my ($self, $dbname, $arg) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $arg = " -d $dbname " . $arg; $self->_listvalue("listuser $arg"); } =head2 refdb_listword Title : refdb_listword Usage : $client->refdb_listword($word_regexp); Function: lists matching journal name words Parameter: $wordname_regexp: regular expression describing the word names =cut ###################################################################### ## refdb_listword(): lists matching journal name words ###################################################################### sub refdb_listword { my ($self, $arg) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("listword $arg"); } =head2 refdb_liststyle Title : refdb_liststyle Usage : $client->refdb_liststyle($stylename_regexp); Function: lists matching citation/bibliography styles Parameter: $stylename_regexp: regular expression describing the style names =cut ###################################################################### ## refdb_liststyle(): lists citation/bibliography styles ###################################################################### sub refdb_liststyle { my ($self, $arg) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("liststyle $arg"); } =head2 refdb_viewstat Title : refdb_viewstat Usage : $client->refdb_viewstat(); Function: requests version/connection info from the server =cut ###################################################################### ## refdb_viewstat(): requests version/connection info from the server ###################################################################### sub refdb_viewstat { my ($self) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("viewstat"); } =head2 refdb_scankw Title : refdb_scankw Usage : $client->refdb_scankw($dbname); Function: runs a thorough keyword scan in the given database Parameter: $dbname: name of the reference database =cut ###################################################################### ## refdb_scankw(): runs a keyword scan ###################################################################### sub refdb_scankw { my ($self, $dbname) = @_; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("scankw -d $dbname"); } =head2 refdb_addref Title : refdb_addref Usage : $client->refdb_addref($owner, $refdata, $type, $encoding); Function: adds references to the database Parameter: $owner: name of the dataset owner, if different from current user Parameter: $refdata: string containing the reference data Parameter: $type: data type, must be one of 'ris' or 'risx' Parameter: $encoding: character encoding of the input data (only for RIS data) =cut ###################################################################### ## refdb_addref(): adds references to the database ###################################################################### sub refdb_addref { my ($self, $owner, $refdata, $type, $encoding) = @_; $self->_init_dialog(); my $cmd = "addref -d $self->{db} "; if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($owner) > 0) { $cmd .= "-U $owner "; } if (length($encoding) > 0) { $cmd .= "-E $encoding "; } $cmd .= "-A $type"; # return result $self->_addref($cmd, $refdata, $type); } =head2 refdb_updateref Title : refdb_updateref Usage : $client->refdb_updateref($owner, $is_personal, $risdata, $type, $encoding); Function: updates references in the database Parameter: $owner: name of the dataset owner, if different from current user Parameter: $is_personal: set to 't' if only the personal information shall be updated Parameter: $refdata: string containing the reference data Parameter: $type: data type, must be one of 'ris' or 'risx' Parameter: $encoding: character encoding of the input data (only for RIS data) =cut ###################################################################### ## refdb_updateref(): updates references in the database ###################################################################### sub refdb_updateref { my ($self, $owner, $is_personal, $risdata, $type, $encoding) = @_; my $cmd = "updateref -d $self->{db} "; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($owner) > 0) { $cmd .= "-U $owner "; } if (length($encoding) > 0) { $cmd .= "-E $encoding "; } if ($is_personal eq "t") { $cmd .= "-p "; } $cmd .= "-s $type"; # return result $self->_addref($cmd, $risdata, $type); } =head2 refdb_checkref Title : refdb_checkref Usage : $client->refdb_checkref($risdata, $type, $encoding, $outtype); Function: checks references for duplicates in the database Parameter: $refdata: string containing the reference data Parameter: $type: data type, must be one of 'ris' or 'risx' Parameter: $encoding: character encoding of the input data (only for RIS data) Parameter: $outtype: output type (scrn|xhtml) =cut ###################################################################### ## refdb_checkref(): checks references for duplicates in the database ###################################################################### sub refdb_checkref { my ($self, $risdata, $type, $encoding, $outtype) = @_; my $cmd = "checkref -d $self->{db} "; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($encoding) > 0) { $cmd .= "-E $encoding "; } if (length($outtype) > 0) { $cmd .= "-t $outtype "; } if (length($self->{css_url}) > 0) { $cmd .= "-G $self->{css_url} "; } $cmd .= "-s $type"; # return result $self->_addref($cmd, $risdata, $type); } =head2 refdb_deleteref Title : refdb_deleteref Usage : $client->refdb_deleteref($idlist); Function: deletes references from the database Parameter: $idlist: string specifying the IDs of the references to be deleted =cut ###################################################################### ## refdb_deleteref(): deletes references from the database ###################################################################### sub refdb_deleteref { my ($self, $idlist) = @_; my $cmd = "deleteref -d $self->{db} "; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } my $arglength = length($idlist) + TERM_LEN; $cmd .= " $arglength"; $self->_send_status("000", TERM_NO); $self->_iwrite("$cmd", TERM_YES); $self->_read_status(); my $sl = new RefDB::Simplelist; $sl->{cmd} = $idlist; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->{server_data} = $self->_getsimplelist($sl); # return result summary $self->{server_summary} = $sl->{summary}; } =head2 refdb_addnote Title : refdb_addnote Usage : $client->refdb_addnote($owner, $xnotedata); Function: adds notes to the database Parameter: $owner: owner of the note, if different from the current user Parameter: $xnotedata: XML data specifying the note =cut ###################################################################### ## refdb_addnote(): adds extended notes to the database ###################################################################### sub refdb_addnote { my ($self, $owner, $xnotedata) = @_; $self->_init_dialog(); my $cmd = "addnote -d $self->{db} "; if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($owner) > 0) { $cmd .= "-U $owner "; } # return result as a list of lines $self->_addnote($cmd, $xnotedata); } =head2 refdb_updatenote Title : refdb_updatenote Usage : $client->refdb_updatenote($owner, $xnotedata); Function: updates references in the database Parameter: $owner: owner of the note, if different from the current user Parameter: $xnotedata: XML data specifying the note =cut ###################################################################### ## refdb_updatenote(): updates notes in the database ###################################################################### sub refdb_updatenote { my ($self, $owner, $xnotedata, $type) = @_; my $cmd = "updatenote -d $self->{db} "; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($owner) > 0) { $cmd .= "-U $owner "; } $cmd .= "-s $type"; # return result as a list of lines $self->_addnote($cmd, $xnotedata); } =head2 refdb_deletenote Title : refdb_deletenote Usage : $client->refdb_deletenote($idlist); Function: deletes notes from the database Parameter: $idlist: string specifying the ID values of the notes to be deleted =cut ###################################################################### ## refdb_deletenote(): deletes notes from the database ###################################################################### sub refdb_deletenote { my ($self, $idlist) = @_; my $cmd = "deletenote -d $self->{db} "; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } my $arglength = length($idlist) + TERM_LEN; $cmd .= " $arglength"; $self->_send_status("000", TERM_NO); $self->_iwrite("$cmd", TERM_YES); $self->_read_status(); # reset data $self->{server_data} = ""; $self->{server_summary} = ""; my $sl = new RefDB::Simplelist; $sl->{cmd} = $idlist; $self->{server_data} = $self->_getsimplelist($sl); # return result summary $self->{server_summary} = $sl->{summary}; } =head2 refdb_addlink Title : refdb_addlink Usage : $client->refdb_addlink($linkspec); Function: links notes to database objects Parameter: $linkspec: string specifying the link(s) to be created =cut ###################################################################### ## refdb_addlink(): links notes to database objects ###################################################################### sub refdb_addlink { my ($self, $arg) = @_; $self->_addlink("f", $arg); } =head2 refdb_deletelink Title : refdb_deletelink Usage : $client->refdb_deletelink($linkspec); Function: unlinks notes from database objects Parameter: $linkspec: string specifying the link(s) to be deleted =cut ###################################################################### ## refdb_deletelink(): unlinks notes from database objects ###################################################################### sub refdb_deletelink { my ($self, $arg) = @_; $self->_addlink("t", $arg); } =head2 refdb_getas Title : refdb_getas Usage : $client->refdb_getas($limit_string, $freq, $name_regexp); Function: retrieves matching series authors Parameter: $limit_string: specifies limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_getas(): retrieves matching series authors ###################################################################### sub refdb_getas { my ($self, $limit_string, $freq, $arg) = @_; my $cmd = "getas -d $self->{db} $arg"; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $self->_listvalue($cmd); } =head2 refdb_getau Title : refdb_getau Usage : $client->refdb_getau($limit_string, $freq, $name_regexp); Function: retrieves matching part authors Parameter: $limit_string: specifies limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_getau(): retrieves matching part authors ###################################################################### sub refdb_getau { my ($self, $limit_string, $freq, $arg) = @_; my $cmd = "getau -d $self->{db} $arg"; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $self->_listvalue($cmd); } =head2 refdb_getax Title : refdb_getax Usage : $client->refdb_getax($limit_string, $freq, $name_regexp); Function: retrieves matching authors/editors (all levels) Parameter: $limit_string: specifies limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_getax(): retrieves matching authors/editors (all levels) ###################################################################### sub refdb_getax { my ($self, $limit_string, $freq, $arg) = @_; my $cmd = "getax -d $self->{db} $arg"; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $self->_listvalue($cmd); } =head2 refdb_geted Title : refdb_geted Usage : $client->refdb_geted($limit_string, $freq, $name_regexp); Function: retrieves matching publication authors/editors Parameter: $limit_string: specifies limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_geted(): retrieves matching publication authors/editors ###################################################################### sub refdb_geted { my ($self, $limit_string, $freq, $arg) = @_; my $cmd = "geted -d $self->{db} $arg"; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $self->_listvalue($cmd); } =head2 refdb_getkw Title : refdb_getkw Usage : $client->refdb_getkw($limit_string, $freq, $keyword_regexp); Function: retrieves matching keywords Parameter: $limit_string: specifies limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $keyword_regexp: regular expression describing the keywords to be retrieved =cut ###################################################################### ## refdb_getkw(): retrieves matching keywords ###################################################################### sub refdb_getkw { my ($self, $limit_string, $freq, $arg) = @_; my $cmd = "getkw -d $self->{db} $arg"; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $self->_listvalue($cmd); } =head2 refdb_getjf Title : refdb_getjf Usage : $client->refdb_getjf($is_all, $limit_string, $freq, $journal_regexp); Function: retrieves matching periodicals (full names) Parameter: $is_all: set to 't' if all synonymous journal names shall be returned Parameter: $limit_string: specifies limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_getjf(): retrieves matching periodicals (full names) ###################################################################### sub refdb_getjf { my ($self, $is_all, $limit_string, $freq, $arg) = @_; my $cmd = "getjf -d $self->{db} "; if ($is_all eq "t") { $cmd .= "-a "; } if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $cmd .= $arg; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue($cmd); } =head2 refdb_getjo Title : refdb_getjo Usage : $client->refdb_getjo($is_all, $limit_string, $freq, $journal_regexp); Function: retrieves matching periodical names (abbrev) Parameter: $is_all: set to 't' if all synonymous journal names shall be returned Parameter: $limit_string: select limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_getjo(): retrieves matching periodical names (abbrev) ###################################################################### sub refdb_getjo { my ($self, $all, $limit_string, $freq, $arg) = @_; my $cmd = "getjo -d $self->{db} "; if (defined($all) && $all eq "t") { $cmd .= "-a "; } if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $cmd .= $arg; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue($cmd); } =head2 refdb_getj1 Title : refdb_getj1 Usage : $client->refdb_getj1($is_all, $limit_string, $freq, $journal_regexp); Function: retrieves matching periodical names (custom abbrev 1) Parameter: $is_all: set to 't' if all synonymous journal names shall be returned Parameter: $limit_string: select limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_getj1(): retrieves matching periodical names (custom abbrev1) ###################################################################### sub refdb_getj1 { my ($self, $is_all, $limit_string, $freq, $arg) = @_; my $cmd = "getj1 -d $self->{db} "; if ($is_all eq "t") { $cmd .= "-a "; } if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $cmd .= $arg; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue($cmd); } =head2 refdb_getj2 Title : refdb_getj2 Usage : $client->refdb_getj2($is_all, $limit_string, $freq, $journal_regexp); Function: retrieves matching periodical names (custom abbrev 2) Parameter: $is_all: set to 't' if all synonymous journal names shall be returned Parameter: $limit_string: select limit and offset Parameter: $freq: requests frequency information ("freq" | "relfreq") Parameter: $name_regexp: regular expression describing the names to be retrieved =cut ###################################################################### ## refdb_getj2(): retrieves matching periodical names (custom abbrev 2) ###################################################################### sub refdb_getj2 { my ($self, $is_all, $limit_string, $freq, $arg) = @_; my $cmd = "getj2 -d $self->{db} "; if ($is_all eq "t") { $cmd .= "-a "; } if (length($limit_string) > 0) { $cmd .= " -N $limit_string "; } if (length($freq) > 0) { $cmd .= " -s $freq "; } $cmd .= $arg; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue($cmd); } =head2 refdb_getref Title : refdb_getref Usage : $client->refdb_getref($type, $format_string, $sort_string, $listname, $encoding, $limit_string, $frequency, $query_string); Function: retrieves references Parameter: $type: select output format Parameter: $format_string: specify additional fields to be retrieved Parameter: $sort_string: specify sorting key Parameter: $listname: optional name of a personal reference list Parameter: $encoding: the character encoding for the output data Parameter: $limit_string: specifies limit and offset Parameter: $frequency: if "t", include frequency information in output Parameter: $query_string: the query that describes the datasets to be retrieved =cut ###################################################################### ## refdb_getref(): retrieves references ###################################################################### sub refdb_getref { my ($self, $type, $format_string, $sort_string, $listname, $encoding, $limit_string, $namespace, $frequency, $arg) = @_; my $cmd = "getref -d $self->{db} "; if (length($type) > 0) { $cmd .= "-t $type "; } if (length($format_string) > 0) { $cmd .= "-s \"$format_string\" "; } if (length($sort_string) > 0) { $cmd .= "-S $sort_string "; } if (length($self->{pdf_root}) > 0) { $cmd .= "-R $self->{pdf_root} "; } if (length($self->{css_url}) > 0) { $cmd .= "-G $self->{css_url} "; } if (length($encoding) > 0) { $cmd .= "-E $encoding "; } if (length($listname) > 0) { $cmd .= "-b $listname "; } if (length($limit_string) > 0) { $cmd .= "-N $limit_string "; } if (length($namespace) > 0) { $cmd .= "-n $namespace "; } if ($frequency eq "t") { $cmd .= "-Q " } $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= " -u $self->{username}"; } if (length($self->{numberized_passwd}) > 0) { $cmd .= " -w $self->{numberized_passwd}"; } my $arglength = length($arg) + TERM_LEN; $cmd .= " $arglength"; # send command to server $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } $self->_send_status("000", TERM_NO); $self->_iwrite($arg, TERM_YES); # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; my $inbuffer; my $done = 0; # loop until we have all datasets do { $self->_read_status(); if ($self->{server_status} ne "404" && $self->{server_status} ne "402") { return $self->get_status_msg(); } if ($self->{server_status} eq "402") { $done++; } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); } while (!$done); # retrieve command summary $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # print "sl summary went to:$sl->{summary}<<\n"; close ($self->{socket}); # return result summary $self->{server_summary}; } =head2 refdb_countref Title : refdb_countref Usage : $client->refdb_countref($listname, $limit_string, $query_string); Function: counts references Parameter: $listname: optional name of a personal reference list Parameter: $limit_string: specifies limit and offset Parameter: $query_string: the query that describes the datasets to be retrieved =cut ###################################################################### ## refdb_countref(): retrieves references ###################################################################### sub refdb_countref { my ($self, $listname, $limit_string, $arg) = @_; my $cmd = "countref -d $self->{db} "; if (length($listname) > 0) { $cmd .= "-b $listname "; } if (length($limit_string) > 0) { $cmd .= "-N $limit_string "; } $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= " -u $self->{username}"; } if (length($self->{numberized_passwd}) > 0) { $cmd .= " -w $self->{numberized_passwd}"; } my $arglength = length($arg) + TERM_LEN; $cmd .= " $arglength"; # send command to server $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } $self->_send_status("000", TERM_NO); $self->_iwrite($arg, TERM_YES); # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; my $inbuffer; my $done = 0; $self->_read_status(); if ($self->{server_status} ne "402") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # retrieve command summary $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # print "sl summary went to:$sl->{summary}<<\n"; close ($self->{socket}); # return result summary $self->{server_summary}; } =head2 refdb_pickref Title : refdb_pickref Usage : $client->refdb_pickref($idlist, $listname); Function: adds references to a personal reference list Parameters: $idlist: specifies the ID values of the references to be picked $listname: name of the personal reference list. If the string is empty, use the default personal reference list =cut ###################################################################### ## refdb_pickref(): adds references to personal reference list ###################################################################### sub refdb_pickref { my ($self, $idlist, $listname) = @_; $self->_pickref($idlist, "f", $listname); } =head2 refdb_dumpref Title : refdb_dumpref Usage : $client->refdb_dumpref($idlist, $listname); Function: removes references from a personal reference list Parameters: $idlist: specifies the ID values of the references to be dumped $listname: name of the personal reference list. If the string is empty, use the default personal reference list =cut ###################################################################### ## refdb_dumpref(): removes references from personal reference list ###################################################################### sub refdb_dumpref { my ($self, $idlist, $listname) = @_; $self->_pickref($idlist, "t", $listname); } =head2 refdb_getnote Title : refdb_getnote Usage : $client->refdb_getnote($type, $format_string, $sort_string, $encoding, $limit_string, $query_string); Function: retrieves references Parameter: $type: select output format Parameter: $format_string: specify additional fields to be retrieved Parameter: $sort_string: specify sorting key Parameter: $encoding: the character encoding for the output data Parameter: $limit_string: specifies limit and offset Parameter: $query_string: the query that describes the datasets to be retrieved =cut ###################################################################### ## refdb_getnote(): retrieves notes ###################################################################### sub refdb_getnote { my ($self, $type, $format_string, $sort_string, $encoding, $limit_string, $namespace, $arg) = @_; my $cmd = "getnote -d $self->{db} "; if (length($type) > 0) { $cmd .= "-t $type "; } if (length($format_string) > 0) { $cmd .= "-s \"$format_string\" "; } if (length($sort_string) > 0) { $cmd .= "-S $sort_string "; } if (length($self->{pdf_root}) > 0) { $cmd .= "-R $self->{pdf_root} "; } if (length($self->{css_url}) > 0) { $cmd .= "-G $self->{css_url} "; } if (length($encoding) > 0) { $cmd .= "-E $encoding "; } if (length($limit_string) > 0) { $cmd .= "-N $limit_string "; } if (length($namespace) > 0) { $cmd .= "-n $namespace "; } $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= " -u $self->{username}"; } if (length($self->{numberized_passwd}) > 0) { $cmd .= " -w $self->{numberized_passwd}"; } my $arglength = length($arg) + TERM_LEN; $cmd .= " $arglength"; # send command to server $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } $self->_send_status("000", TERM_NO); $self->_iwrite($arg, TERM_YES); # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; my $inbuffer; my $done = 0; # loop until we have all datasets do { $self->_read_status(); if ($self->{server_status} ne "404" && $self->{server_status} ne "402") { return $self->get_status_msg(); } if ($self->{server_status} eq "402") { $done++; } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); } while (!$done); # retrieve command summary $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # print "sl summary went to:$sl->{summary}<<\n"; close ($self->{socket}); # return result summary $self->{server_summary}; } =head2 refdb_countnote Title : refdb_countnote Usage : $client->refdb_countnote($listname, $limit_string, $query_string); Function: counts extended notes Parameter: $listname: optional name of a personal reference list Parameter: $limit_string: specifies limit and offset Parameter: $query_string: the query that describes the datasets to be retrieved =cut ###################################################################### ## refdb_countnote(): retrieves references ###################################################################### sub refdb_countnote { my ($self, $listname, $limit_string, $arg) = @_; my $cmd = "countnote -d $self->{db} "; if (length($listname) > 0) { $cmd .= "-b $listname "; } if (length($limit_string) > 0) { $cmd .= "-N $limit_string "; } $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= " -u $self->{username}"; } if (length($self->{numberized_passwd}) > 0) { $cmd .= " -w $self->{numberized_passwd}"; } my $arglength = length($arg) + TERM_LEN; $cmd .= " $arglength"; # send command to server $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } $self->_send_status("000", TERM_NO); $self->_iwrite($arg, TERM_YES); # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; my $inbuffer; my $done = 0; $self->_read_status(); if ($self->{server_status} ne "402") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # retrieve command summary $self->_read_status(); if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # print "sl summary went to:$sl->{summary}<<\n"; close ($self->{socket}); # return result summary $self->{server_summary}; } =head2 refdb_selectdb Title : refdb_selectdb Usage : $client->refdb_selectdb($dbname); Function: selects an existing database as the current database Parameter: $dbname: name of the reference database =cut ###################################################################### ## refdb_selectdb(): selects an existing database as the current database ###################################################################### sub refdb_selectdb { my ($self, $dbname) = @_; # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("selectdb $dbname"); # print "summary went to $summary<<\ndata went to $data<<\n"; if (substr($self->get_data(), 0, 3) eq "240") { $self->{db} = $dbname; } # print "self db went to $self->{db}\n"; $self->{server_summary}; } =head2 refdb_whichdb Title : refdb_whichdb Usage : $client->refdb_whichdb(); Function: displays information about the current database =cut ###################################################################### ## refdb_whichdb(): displays information about the current database ###################################################################### sub refdb_whichdb { my ($self) = @_; # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue("whichdb -d $self->{db}"); } =head2 refdb_updatejo Title : refdb_updatejo Usage : $client->refdb_updatejo($updaterequest); Function: updates journal name synonyms =cut ###################################################################### ## refdb_updatejo(): links notes to database objects ###################################################################### sub refdb_updatejo { my ($self, $arg) = @_; my $cmd; $cmd = "updatejo -d $self->{db} "; $cmd .= "\"" . $arg . "\""; # reset data $self->{server_data} = ""; $self->{server_summary} = ""; $self->_listvalue($cmd); } =head2 refdb_texbib Title : refdb_texbib Usage : $client->refdb_texbib($style, $cite_data); Function: retrieves a bibliography in bibtex format based on citationlistx data Parameter: $style: the name of the citation/bibliography style Parameter: $cite_data: XML data describing the references =cut ###################################################################### ## refdb_texbib(): retrieves a bibtex bibliography ###################################################################### sub refdb_texbib { my ($self, $style, $cite_data) = @_; my $cs_status; my $cmd = "gettexbib -d $self->{db} -s $style "; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } my $cite_data_len = length($cite_data) + TERM_LEN; $cmd .= " $cite_data_len"; $self->_send_status("000", TERM_NO); # #1 $self->_iwrite($cmd, TERM_YES); if (($cs_status = $self->_read_status()) != 0) { # #2 print $self->get_status_msg() . "\n"; return; } # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; # send id data to server $self->_send_status("000", TERM_NO); # #3 $self->_iwrite($cite_data, TERM_YES); my $inbuffer; my $done = 0; # loop until we have all datasets do { $self->_read_status(); # #4/#6 if ($self->{server_status} ne "404" && $self->{server_status} ne "402") { return $self->get_status_msg(); } if ($self->{server_status} eq "402") { $done++; } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # #7 } while (!$done); # retrieve command summary $self->_read_status(); # #8 if ($self->{server_status} ne "000") { return $self->get_status_msg(); } while (defined($inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); # #9 # print "sl summary went to:$sl->{summary}<<\n"; close ($self->{socket}); # return result summary $self->{server_summary}; } =head2 refdb_dbib Title : refdb_dbib Usage : $client->refdb_dbib($type, $style, $encoding, $cite_data); Function: retrieves a cooked XML/SGML bibliography based on citationlistx data Parameter: $type: type of the bibliography output Parameter: $style: name of the citation/bibliography style Parameter: $encoding: character encoding of the output data Parameter: $cite_data: XML data specifying the references =cut ###################################################################### ## refdb_dbib(): retrieves a cooked XML/SGML bibliography ###################################################################### sub refdb_dbib { my ($self, $type, $style, $encoding, $cite_data) = @_; my $cs_status; my $cmd = "getbib -d $self->{db} -t $type -s $style "; # reset result strings $self->{server_data} = ""; $self->{stylespec} = ""; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($encoding) > 0) { $cmd .= "-E $encoding "; } $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; $cs_status = $self->_read_status(); if ($cs_status != 0 && $cs_status != 402) { print $self->get_status_msg() . "\n"; return; } if ($cs_status == 402) { # server will send stylespec $self->{stylespec} = ""; # read stylesheet driver data while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{stylespec} .= $inbuffer; if ($self->{stylespec} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); $cs_status = $self->_read_status(); if ($cs_status != 0) { print $self->get_status_msg() . "\n"; return; } } # end if read stylespec # send XML data, phases 1 through 4 my $result .= $self->_send_xml($cite_data); if ($self->{server_status} ne "403") { return "999:0"; } # Phase 5: signal server that we're done $self->_send_status("402", TERM_NO); $self->_read_status(); if ($self->{server_status} eq "400") { while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } return "999:0"; } elsif ($self->{server_status} ne "403") { $self->{server_data} .= $self->get_status_msg(); return "999:0"; } # request data $self->_send_status("000", TERM_NO); my $done_refs = 0; do { # loop over all datasets $self->_read_status(); if ($self->{server_status} eq "402") { $done_refs++; } elsif ($self->{server_status} ne "404") { $self->{server_data} .= $self->get_status_msg(); return "999:0"; } # loop until dataset is complete while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); } while (!$done_refs); # read summary $cs_status = $self->_read_status(); if ($cs_status != 0) { print $self->get_status_msg() . "\n"; return; } while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); close ($self->{socket}); # return command summary $self->{server_summary}; } =head2 refdb_getrefx Title : refdb_getrefx Usage : $client->refdb_getrefx($type, $encoding, $cite_data); Function: retrieves a raw XML/SGML bibliography based on citationlistx data Parameter: $type: type of the bibliography output Parameter: $encoding: character encoding of the output data Parameter: $cite_data: XML data specifying the references =cut ###################################################################### ## refdb_getrefx(): retrieves a raw XML/SGML bibliography ###################################################################### sub refdb_getrefx { my ($self, $type, $encoding, $cite_data) = @_; my $cs_status; my $cmd = "getrefx -d $self->{db} -t $type "; # reset result strings $self->{server_data} = ""; $self->{stylespec} = ""; $self->_init_dialog(); if (length($self->{username}) > 0) { $cmd .= "-u $self->{username} "; } if (length($self->{numberized_passwd}) > 0) { $cmd .= "-w $self->{numberized_passwd} "; } if (length($encoding) > 0) { $cmd .= "-E $encoding "; } $self->_send_status("000", TERM_NO); $self->_iwrite($cmd, TERM_YES); # reset result string $self->{server_data} = ""; $self->{server_summary} = ""; $cs_status = $self->_read_status(); if ($cs_status != 0 && $cs_status != 402) { print $self->get_status_msg() . "\n"; return; } # send XML data, phases 1 through 4 my $result .= $self->_send_xml($cite_data); if ($self->{server_status} ne "403") { return "999:0"; } # Phase 5: signal server that we're done $self->_send_status("402", TERM_NO); $self->_read_status(); if ($self->{server_status} eq "400") { while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } return "999:0"; } elsif ($self->{server_status} ne "403") { $self->{server_data} .= $self->get_status_msg(); return "999:0"; } # request data $self->_send_status("000", TERM_NO); my $done_refs = 0; do { # loop over all datasets $self->_read_status(); if ($self->{server_status} eq "402") { $done_refs++; } elsif ($self->{server_status} ne "404") { $self->{server_data} .= $self->get_status_msg(); return "999:0"; } # loop until dataset is complete while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_data} .= $inbuffer; if ($self->{server_data} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); } while (!$done_refs); # read summary $cs_status = $self->_read_status(); if ($cs_status != 0) { print $self->get_status_msg() . "\n"; return; } while (defined(my $inbuffer = $self->_tread(OUTBUF_LEN))) { $self->{server_summary} .= $inbuffer; if ($self->{server_summary} =~ s/$self->{CS_TERM}//) { last; } } $self->_send_status("000", TERM_NO); close ($self->{socket}); # return command summary $self->{server_summary}; } 1; # make 'use' happy __END__ RefDB-Client-1.18/Changes000644 001750 001750 00000001520 10713341036 015736 0ustar00markusmarkus000000 000000 2007-11-04 12:14 mhoenicka * [r532] Client.pm, test.pl: added switch to refdb_getref() to optionally retrieve frequency information 2007-09-10 19:41 mhoenicka * [r473] Client.pm, test.pl: added refdb_getrefx() 2007-08-18 00:40 mhoenicka * [r464] Client.pm: added refdb_getax function 2007-03-23 22:59 mhoenicka * [r326] Client.pm, Makefile.PL, test.pl: fixed version number;finished renaming of module 2007-03-07 23:30 mhoenicka * [r297] Client.pm, test.pl: added support for frequency information in the getfoo commands 2007-03-03 01:04 mhoenicka * [r292] Client.pm, test.pl: bumped up REFDB_PROTOCOL_VERSION;set_conninfo() now takes timeout parameter;getref() and getnote() now take namespace parameter;added countref() and countnote();updated getnote communication protocol;updated tests accordingly RefDB-Client-1.18/MANIFEST000644 001750 001750 00000000314 10713341147 015577 0ustar00markusmarkus000000 000000 Changes INSTALL Client.pm Makefile.PL MANIFEST test.pl testdata/pubmed.ris testdata/refdbteststyle.xml testdata/alltypes.xml META.yml Module meta-data (added by MakeMaker) RefDB-Client-1.18/INSTALL000644 001750 001750 00000000743 10652214750 015506 0ustar00markusmarkus000000 000000 Installing the RefDBClient Perl module ====================================== 1. Create a system-specific Makefile: perl Makefile.PL 2. Build the module: make 3. Run a test. This step is optional and requires a running RefDB installation: make test 4. Install the module in the default location: make install See the test.pl script for an example of how to use this module. $Id: INSTALL,v 1.1 2004/02/17 22:41:45 mhoenicka Exp $ (c) Markus Hoenicka 2004 RefDB-Client-1.18/Makefile.PL000644 001750 001750 00000000547 10652214750 016431 0ustar00markusmarkus000000 000000 use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'RefDB::Client', 'VERSION_FROM' => 'Client.pm', # finds $VERSION 'AUTHOR' => 'Markus Hoenicka ', 'dist' => { COMPRESS => 'gzip -9f', SUFFIX => '.tar.gz',}, ); RefDB-Client-1.18/META.yml000644 001750 001750 00000000452 10713341147 015722 0ustar00markusmarkus000000 000000 # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: RefDB-Client version: 1.18 version_from: Client.pm installdirs: site requires: distribution_type: module generated_by: ExtUtils::MakeMaker version 6.30 RefDB-Client-1.18/testdata/pubmed.ris000644 001750 001750 00000135435 10652214750 020270 0ustar00markusmarkus000000 000000 TY - JOUR TI - Inhibition of superoxide anion generation by YC-1 in rat neutrophils through cyclic GMP-dependent and -independent mechanisms. N2 - 3-(5'-Hydroxymethyl-2'-furyl)-1-benzyl indazole (YC-1), a soluble guanylyl cyclase (sGC) activator, inhibited formyl-methionyl-leucyl-phenylalanine (fMLP)-induced superoxide anion (O(2)*(-)) generation and O(2) consumption in rat neutrophils (IC(50) values of 12.7+/-3.1 and 17.7+/-6.9 microM, respectively). Inhibition of O(2)*(-) generation by YC-1 was partially reversed by the cyclic GMP-lowering agent 6-anilinoquinoline-5,8-quinone (LY83583) and by the Rp isomer of 8-(4-chlorophenylthio)guanosine-3',5'-monophosphorothioate (Rp-8-pCPT-cGMPS), a cyclic GMP-dependent protein kinase inhibitor. In cell-free systems, YC-1 failed to alter O(2)*(-) generation during dihydroxyfumaric acid autoxidation, phorbol 12-myristate 13-acetate (PMA)-activated neutrophil particulate NADPH oxidase preparation, and arachidonic acid-induced NADPH oxidase activation. YC-1 increased cellular cyclic GMP levels through the activation of sGC and the inhibition of cyclic GMP-hydrolyzing phosphodiesterase activity. The plateau phase, but not the initial spike, of fMLP-induced [Ca(2+)](i) changes was inhibited by YC-1 (IC(50) about 15 microM). fMLP- but not PMA-induced phospholipase D activation was inhibited by YC-1 (IC(50) about 28 microM). Membrane-associated ADP-ribosylation factor and Rho A in cell activation was also reduced by YC-1 at a similar concentration range. Neither cytosolic protein kinase C (PKC) activity nor PKC membrane translocation was altered by YC-1. YC-1 did not affect either fMLP-induced phosphatidylinositol 3-kinase activation or p38 mitogen-activated protein kinase phosphorylation, but slightly attenuated the phosphorylation of extracellular signal-regulated kinase. Collectively, these results indicate that the inhibition of the fMLP-induced respiratory burst by YC-1 is mediated by cyclic GMP-dependent and -independent signaling mechanisms. AD - Department of Education and Research, Taichung Veterans General Hospital, 160 Chung Kang Road, Sec. 3, 407, ROC, Taichung, Taiwan. w1994@vghtc.gov.tw AU - Wang,J.P. AU - Chang,L.C. AU - Raung,S.L. AU - Hsu,M.F. AU - Huang,L.J. AU - Kuo,S.C. PY - 2002///Feb 15 JA - Biochem Pharmacol VL - 63 IS - 4 SP - 577 EP - 85 ER - TY - JOUR TI - Activation of soluble guanylate cyclase causes relaxation of corpus cavernosum tissue: synergism of nitric oxide and YC-1. N2 - Nitric oxide (NO) activates corpus cavernosum smooth muscle soluble guanylate cyclase (sGC) and increases the synthesis of cGMP that results in smooth muscle relaxation and ultimately, penile erection. To characterize sGC and define the potential synergy between NO and the allosteric activator YC-1 in corpus cavernosum, rat sGC was activated by either sodium nitroprusside (SNP) or YC-1, and YC-1 potentiated the effects of SNP with a 200-fold activation of sGC. Both SNP and YC-1 decreased the Km and increased the Vmax. ODQ significantly inhibited sGC activated by SNP with IC50 of 0.5 nM, but did not affect the sGC activated by YC-1 as well as basal sGC activity. SNP and YC-1 synergistically increased intracellular cGMP levels in rabbit corpus cavernosum smooth muscle cell cultures. YC-1 significantly relaxed rabbit cavernosum tissue strips in organ baths with an EC50 of 8.4 microM. In the presence of L-nitroarginine methyl ester to block endogenous NO production, co-administration of SNP shifted the dose response of YC-1 to the left, showing the synergism of SNP and YC-1 in tissue strips. In view of the clinical efficacy of phosphodiesterase-5 inhibitors, activation of sGC may provide an alternative means for enhancing the activity of neurally derived NO during sexual stimulation in the corpus cavernosum, representing a novel approach for the treatment of erectile dysfunction. AD - Neuroscience, Global Pharmaceutical Research, Abbott Laboratories, Abbott Park, Illinois 60064-6119, USA. masaki.nakane@abbott.com AU - Nakane,M. AU - Hsieh,G. AU - Miller,L.N. AU - Chang,R. AU - Terranova,M.A. AU - Moreland,R.B. AU - Kolasa,T. AU - Brioni,J.D. PY - 2002///Apr JA - Int J Impot Res VL - 14 IS - 2 SP - 121 EP - 7 ER - TY - JOUR TI - Inhibition of deactivation of NO sensitive guanylyl cyclase accounts for the sensitizing effect of YC-1. N2 - Many of the physiological effects of the signaling molecule nitric oxide are mediated by the stimulation of the NO-sensitive guanylyl cyclase. Activation of the enzyme is achieved by binding of NO to the prosthetic heme group of the enzyme and the initiation of conformational changes. So far, the rate of NO dissociation of the purified enzyme has only been determined spectrophotometrically, whereas the respective deactivation, i.e. the decline in enzymatic activity, has only been determined in cytosolic fractions and intact cells. Here, we report on the deactivation of purified NO-sensitive guanylyl cyclase determined after addition of the NO scavenger oxyhemoglobin or dilution. The deactivation rate corresponded to a half life of the NO/guanylyl cyclase complex of approximately 4 seconds which is in good accordance with the spectrophotometrically measured NO dissociation rate of the enzyme. The deactivation rate of the enzyme determined in platelets yielded a much shorter half life indicating either partial damage of the enzyme during the purification procedure or the existence of endogenous deactivation accelerating factors. YC-1, a component causing sensitization of guanylyl cyclase towards NO, inhibited deactivation of GC, resulting in a tremendously prolonged half life of the NO/guanylyl cyclase complex of more than 10 min. The deactivation of an ATP-utilizing guanylyl cyclase mutant was almost unaffected by YC-1, indicating the existence of a special structure within the catalytic domain being required for YC-1 binding or for the transduction of the YC-1 effect. In contrast to the wild type enzyme, YC-1 did not increase NO-sensitivity of this mutant, clearly establishing inhibition of deactivation as the underlying mechanism of the NO-sensitizer YC-1. AD - Pharmakologie und Toxikologie, Ruhr-Universitat Bochum, Bochum 44780. AU - Russwurm,M. AU - Mergia,E. AU - Mullershausen,F. AU - Koesling,D. PY - 2002///Apr 26 JA - J Biol Chem VL - 277 IS - 28 SP - 24883 EP - 8 ER - TY - JOUR TI - Pharmacology of the nitric oxide receptor, soluble guanylyl cyclase, in cerebellar cells. N2 - The nitric oxide (NO) receptor, soluble guanylyl cyclase (sGC), is commonly manipulated pharmacologically in two ways. Inhibition of activity is achieved using 1-H-[1,2,4]oxadiazolo[4,3-a]quinoxalin-l-one (ODQ) which oxidizes the haem prosthetic group to which NO binds, while the compound 3-(5-hydroxymethyl-2-furyl)-1-benzylindazole (YC-1) is considered an 'allosteric' activator. Knowledge of how these agents function and interact in a normal cellular environment is limited. These issues were addressed using rat cerebellar cells. Inhibition by ODQ was not simply competitive with NO. The rate of onset was ODQ concentration-dependent and developed in two kinetic phases. Recovery from inhibition occurred with a half-time of approximately 5 min. YC-1 slowed the rate at which sGC deactivated on removal of NO by 45 fold, consistent with YC-1 increasing the potency of NO for sGC. YC-1 also enhanced the maximal response to NO by 2 fold. Furthermore, when added to cells in which sGC was 90% desensitized, YC-1 abruptly enhanced sGC activity to a degree that indicated partial reversal of desensitization. After pre-exposure to YC-1, sGC became resistant to inhibition by ODQ. In addition, YC-1 rapidly reversed inhibition by ODQ in cells and for purified sGC, suggesting that YC-1 either increases the NO affinity of the oxidized sGC haem or reverses haem oxidation. It is concluded that the actions of ODQ and YC-1 on sGC are broadly similar in cells and purified preparations. Additionally, YC-1 transiently reverses sGC desensitization in cells. It is hypothesized that YC-1 has multiple actions on sGC, and thereby both modifies the NO binding site and enhances agonist efficacy. AD - Wolfson Institute for Biomedical Research, University College London, Gower St., London WC1E 6AU, U.K. Current address: Division of Neurophysiology, National Institute for Medical Research, The Ridgeway, Mill Hill, London NW7 1AA. AU - Bellamy,T.C. AU - Garthwaite,J. UR - http://www.brjpharmacol.org/cgi/content/full/136/1/95 PY - 2002///May JA - Br J Pharmacol VL - 136 IS - 1 SP - 95 EP - 103 ER - TY - JOUR TI - Nitric oxide independent activation of guanylate cyclase by YC-1 causes erectile responses in the rat. N2 - PURPOSE: Activation of soluble guanylate cyclase with a subsequent increase in intracellular levels of cyclic guanosine monophosphate is necessary for normal erection. In vascular tissue 3(5'-hydroxymethyl-2'-furyl-1-benzyl indazole (YC-1) (Abbott Laboratories, North Chicago, Illinois) has been shown to stimulate soluble guanylate cyclase independent of nitric oxide. We studied whether YC-1 modulates erectile responses in the rat. MATERIALS AND METHODS: The effects of YC-1 given intracavernously or intraperitoneally on intracavernous pressure were investigated in rats. Functional effects of YC-1 on neuronal and endothelial nitric oxide relaxations were studied in 3 x 10(-6) M. 1-noradrenaline contracted preparations of rat isolated corpus cavernosum. RESULTS: Intracavernous YC-1 (10 micromol. kg.-1) produced erectile responses with a mean intracavernous pressure plus or minus standard error of mean of 81 +/- 17 cm. water (p <0.001) and a mean duration of 7.1 +/- 3.3 minutes (p <0.001). YC-1 (10 micromol. kg.-1) given intraperitoneally also increased the amplitude and duration of erectile responses to cavernous nerve stimulation. Mean peak intracavernous pressure increased from 63 +/- 6 to 10(2) +/- 16 cm. water (p <0.05). Erections induced by a submaximal dose of 25 microg. kg.-1 apomorphine s.c. increased in number after 10 micromol. kg.-1 YC-1 intraperitoneally (p <0.05). In vitro nerve induced relaxant responses were enhanced by increasing concentrations of YC-1. Relaxations at 20 Hz. were increased from a mean of 9% +/- 5% to 52% +/- 5% at a YC-1 concentration of 10(-5) M. (p <0.001). At this concentration carbachol induced relaxations were enhanced from a mean of 19% +/- 3% to 40% +/- 9% (p <0.05). CONCLUSIONS: YC-1 can evoke erectile responses when given intracavernously and it enhances erections induced by cavernous nerve stimulation and apomorphine when given systemically. In vitro YC-1 enhances electrically evoked relaxations in rat corpus cavernosum. YC-1 represents an interesting pharmacological principle that may be useful for treating erectile dysfunction. AD - Department of Clinical Pharmacology, University of Lund, Sweden. AU - Mizusawa,H. AU - Hedlund,P. AU - Brioni,J.D. AU - Sullivan,J.P. AU - Andersson,K.E. KW - 0 (Enzyme Activators) KW - 0 (Indazoles) KW - 10102-43-9 (Nitric Oxide) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - 58-00-4 (Apomorphine) KW - EC 4.6.1.2 (Guanylate Cyclase) KW - Animal KW - Apomorphine [pharmacology] KW - Comparative Study KW - Dose-Response Relationship, Drug KW - Enzyme Activators [pharmacology] KW - Guanylate Cyclase [metabolism] KW - Hydrostatic Pressure KW - Indazoles [pharmacology] KW - Injections KW - Injections, Intraperitoneal KW - Male KW - Nitric Oxide [physiology] KW - Penile Erection [drug effects] KW - Penile Erection [physiology] KW - Penis [drug effects] KW - Rats PY - 2002///May JA - J Urol VL - 167 IS - 5 SP - 2276 EP - 81 ER - TY - JOUR TI - Isoforms of NO-sensitive guanylyl cyclase. N2 - By the formation of cGMP the NO-sensitive guanylyl cyclase plays a key role within the NO/cGMP signaling cascade involved in vascular regulation and neurotransmission. The prosthetic heme group of the enzyme acts as the NO sensor, and binding of NO induces conformational changes leading to an up to 200-fold activation of the enzyme. The unexpected fast dissociation half-life of NO of a few seconds is fast enough to account for the deactivation of the enzyme in biological systems. YC-1 and its analogues acting as NO sensitizers uncovered a new pharmacologically and conceivably physiologically relevant regulatory principle of the enzyme. Two existing isoforms of the heterodimeric guanylyl cyclase (alpha1beta1, alpha2beta1) are known that are functionally indistinguishable. Up to now, the NO-sensitive guanylyl cyclase has been considered as a soluble enzyme. However, recent evidence about the alpha2beta1 isoform interacting with a PDZ domain of the postsynaptic scaffold protein PSD-95 suggests that the alpha2 subunit directs a membrane association of this isoform. The interaction with PSD-95 locates the alpha2beta1 isoform in close proximity to the NO-generating NO synthase thereby enabling the NO sensor to respond to locally raised NO concentrations. AD - Pharmakologie und Toxikologie, Medizinische Fakultat MA N1, Ruhr-Universitat Bochum, Germany. koesling@iname.com AU - Russwurm,M. AU - Koesling,D. PY - 2002///Jan JA - Mol Cell Biochem VL - 230 IS - 1-2 SP - 159 EP - 64 ER - TY - JOUR TI - BAY 41-2272 activates two isoforms of nitric oxide-sensitive guanylyl cyclase. N2 - Soluble guanylyl cyclase is an important target for endogenous nitric oxide and the guanylyl cyclase modulator, YC-1. Recently BAY 41-2272 was identified as a similar but more potent and more specific substance. While YC-1 also acts as non-specific phosphodiesterase inhibitor, BAY 41-2272 is devoid of an effect on phosphodiesterases. BAY 41-2272 has so far only been tested on the alpha(1)/beta(1) heterodimeric isoform of soluble guanylyl cyclase and its binding site has been mapped to a region in the alpha(1) subunit amino-terminal sequence. Although this region is poorly conserved in the alpha(2) subunit, we show in the current study that the alpha(2)/beta(1) heterodimeric enzyme isoform is activated by BAY 41-2272. Deletion analysis of the alpha(2) subunit and co-expression with the beta(1) subunit in the baculovirus/Sf9 system is consistent with the amino-terminal amino acids 104 to 401 of the alpha(2) subunit as binding site for BAY 41-2272. AD - Institut fur Experimentelle und Klinische Pharmakologie, Universitat Hamburg, Martinistrasse 52, Hamburg, D-20246, Germany. AU - Koglin,M. AU - Stasch,J.P. AU - Behrends,S. KW - 0 (BAY 41-2272) KW - 0 (Enzyme Activators) KW - 0 (Hydrazines) KW - 0 (Indazoles) KW - 0 (Isoenzymes) KW - 0 (Nitric Oxide Donors) KW - 0 (Protein Subunits) KW - 0 (Pyrazoles) KW - 0 (Pyridines) KW - 0 (Receptors, Cytoplasmic and Nuclear) KW - 0 (nitric oxide receptor) KW - 10102-43-9 (Nitric Oxide) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - 86831-65-4 (1,1-diethyl-2-hydroxy-2-nitrosohydrazine) KW - Animal KW - Binding Sites [physiology] KW - Cell Line KW - Dose-Response Relationship, Drug KW - Enzyme Activation [drug effects] KW - Enzyme Activators [pharmacology] KW - Human KW - Hydrazines [pharmacology] KW - Indazoles [pharmacology] KW - Isoenzymes [drug effects] KW - Isoenzymes [genetics] KW - Isoenzymes [metabolism] KW - Mutagenesis, Site-Directed KW - Nitric Oxide [pharmacology] KW - Nitric Oxide Donors [pharmacology] KW - Protein Subunits KW - Pyrazoles [pharmacology] KW - Pyridines [pharmacology] KW - Rats KW - Receptors, Cytoplasmic and Nuclear [drug effects] KW - Receptors, Cytoplasmic and Nuclear [genetics] KW - Receptors, Cytoplasmic and Nuclear [metabolism] KW - Spodoptera PY - 2002///Apr 12 JA - Biochem Biophys Res Commun VL - 292 IS - 4 SP - 1057 EP - 62 ER - TY - JOUR TI - Insulin increases NADH/NAD+ redox state, which stimulates guanylate cyclase in vascular smooth muscle. N2 - BACKGROUND: Insulin inhibits contraction and migration of primary confluent, cultured canine vascular smooth muscle cells (VSMCs) with inducible nitric oxide synthase (iNOS) by stimulating cyclic GMP (cGMP) production. The present study was performed to determine how insulin stimulates guanylate cyclase activity in these cells. METHODS: Primary cultured VSMC were obtained from canine femoral arteries. Lactate and pyruvate levels were measured by enzymatic assays, cGMP production by radioimmunoassay, iNOS activity by conversion of arginine to citrulline, and cell contraction by photomicroscopy. RESULTS: Insulin (1 nmol/L) increased cGMP production fivefold in VSMC with iNOS while raising the lactate-to-pyruvate ratio (LPR) from 3.1 +/- 0.5 to 10.0 +/- 1.6 (P < .05), indicating a rise in the ratio of reduced/oxidized nicotinamide adenine dinucleotide (NADH/NAD+) redox state of the cell. Insulin's stimulation of cGMP production was blocked by 0.1 mmol/L NG-monomethyl-L-arginine (L-NMMA) indicating dependence on iNOS activity, but insulin did not affect iNOS activity. Blocking insulin's increase in LPR by pyruvate (0.5 mmol/L) or oxaloacetate (0.5 mmol/L) completely inhibited the insulin-stimulated component of cGMP production. Pyruvate also blocked insulin's inhibition of serotonin-induced contraction in nonproliferated cells. In the absence of insulin, 5 mmol/L lactate or isocitrate increased the LPR by 420% +/- 47% and 167% +/- 20%, respectively (both P < .05), and stimulated cGMP production by 1,045% +/- 272% and 278% +/- 33%, respectively (both P < .05) by an L-NMMA-inhibitable mechanism. Although cGMP production in cells with iNOS was increased by insulin, the stimulation of cGMP production in cells without iNOS by 3-(5'-hydroxymethyl-2'furyl)-1-benzyl indazole (YC-1) was not affected by insulin, suggesting that insulin does not stimulate guanylate cyclase activity directly. CONCLUSION: We conclude that insulin increases cGMP production in VSMC with iNOS by raising the cell NADH/NAD+ redox state, which may increase the availability of iNOS-derived NO. AD - Department of Medicine. The University of Texas Health Science Center, Houston 77225, USA. AU - Kahn,A.M. AU - Allen,J.C. AU - Zhang,S. PY - 2002///Mar JA - Am J Hypertens VL - 15 IS - 3 SP - 273 EP - 9 ER - TY - JOUR TI - Carbon monoxide relaxes the female pig urethra as effectively as nitric oxide in the presence of YC-1. N2 - PURPOSE: Nitric oxide (NO) and carbon monoxide (CO) have been suggested to relax smooth muscle by activating soluble guanylate cyclase (sGC), binding to the same site of the enzyme. 3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole (YC-1) (Cayman Co., Malmo, Sweden) increases the catalytic rate of sGC by binding to an allosteric site. We investigated whether YC-1 can modulate the relaxant responses of isolated urethral smooth muscle to exogenous CO, (NO) and electrical field stimulation. MATERIALS AND METHODS: In spontaneously active and noradrenaline (Sigma-Aldrich Chemie GmbH, Steinheim, Germany) pre-contracted preparations of circular urethral smooth muscle from female pigs relaxant responses were evoked by electrical field stimulation before and after incubation with 10(-5) M. YC-1. The concentration-response curves for CO and NO were investigated in noradrenaline pre-contracted strips before and after incubation with YC-1. The tissue contents of cyclic 3',5'-guanosine monophosphate (cGMP) and cyclic adenosine monophosphate after electrical field stimulation, and the administration of CO or NO was investigated in the absence and presence of YC-1. RESULTS: YC-1 significantly increased the amplitude of the relaxations evoked by electrical field stimulation, CO and NO, and simultaneously caused significant increases in the cGMP content in all preparations. The effect on CO induced relaxant responses was conspicuous. In the presence of YC-1 the potency and maximal relaxant effect of CO were similar to those of NO in the absence of YC-1. CONCLUSIONS: YC-1 enhances cGMP dependent relaxant responses of the female pig urethra in vitro. The finding that the response to CO was greatly increased after sensitizing sGC suggests a potential for CO as a relaxant mediator in urethral smooth muscle. AD - Department of Clinical Pharmacology, Lund University Hospital, Lund, Sweden. AU - Schroder,A. AU - Hedlund,P. AU - Andersson,K.E. PY - 2002///Apr JA - J Urol VL - 167 IS - 4 SP - 1892 EP - 6 ER - TY - JOUR TI - Activators of soluble guanylate cyclase for the treatment of male erectile dysfunction. N2 - Soluble guanylate cyclase (sGC) is an important enzyme in corpus cavernosum smooth muscle cells as it is one of the regulators of the synthesis of cGMP. The efficacy of sildenafil (Viagratrade mark) in the treatment of male erectile dysfunction indicates the importance of the cGMP system in the erectile response as the increased levels of cGMP induce relaxation of the corpus cavernosum. sGC is physiologically activated by nitric oxide (NO) during sexual stimulation, and its activity can be pharmacologically enhanced by several NO-donors. Agents like YC-1 can also activate sGC after binding to a novel allosteric site in the enzyme, a site different from the NO binding site. YC-1 can relax rabbit cavernosal tissue and it facilitates penile erection in vivo. This review summarizes the enzymology, biochemistry and pharmacology of this novel allosteric site and its relevance for the regulation of penile function. This type of sGC activators represent a new class of compounds with a different pharmacological profile in comparison to the classical NO-donors and they could be beneficial for the treatment of male erectile dysfunction. DOI: 10.1038/sj/ijir/3900801 AD - Neuroscience Research, Global Pharmaceutical Research and Development, Abbott Laboratories, Abbott Park, Illinois, USA. AU - Brioni,J.D. AU - Nakane,M. AU - Hsieh,G.C. AU - Moreland,R.B. AU - Kolasa,T. AU - Sullivan,J.P. PY - 2002///Feb JA - Int J Impot Res VL - 14 IS - 1 SP - 8 EP - 14 ER - TY - JOUR TI - Nitric oxide activation of soluble guanylyl cyclase reveals high and low affinity sites that mediate allosteric inhibition by calcium. N2 - Cyclic GMP (cGMP) and Ca(2+) regulate opposing mechanisms in (patho)physiological processes reflected in the reciprocal regulation of their intracellular concentrations. Although mechanisms by which cGMP regulates [Ca(2+)](i) have been described, those by which Ca(2+) regulates [cGMP](i) are less well understood. In the present study, Ca(2+) inhibited purified sGC activated by sodium nitroprusside (SNP), a precursor of nitric oxide (NO), employing Mg-GTP as substrate in a concentration-dependent fashion, but was without effect on basal enzyme activity. Ca(2+) inhibited sGC stimulated by protoporphyrin IX or YC-1 suggesting that inhibition was not NO-dependent. In contrast, Ca(2+) was without effect on sGC activated by SNP employing Mn-GTP as substrate, demonstrating that inhibition did not reflect displacement of heme from sGC. Ligand activation of sGC unmasked negative allosteric sites of high (K(i) similar 10(-7) M) and low (K(i) approximately 10(-5) M) affinity for Ca(2+) that mediated noncompetitive and uncompetitive inhibition, respectively. Free Mg(2+) in excess of substrate did not alter the concentration-response relationship of Ca(2+) inhibition at high affinity sites, but produced a rightward shift in that relationship at low affinity sites. Similarly, Ca(2+) inhibition at high affinity sites was noncompetitive, whereas inhibition at low affinity sites was competitive, with respect to free Mg(2+). Purified sGC specifically bound (45)Ca(2+) in the presence of a 1000-fold excess of Mg(2+) and in the absence of activating ligands. These data suggest that sGC is a constitutive Ca(2+) binding protein whose allosteric function is conditionally dependent upon ligand activation. AD - Division of Clinical Pharmacology, Department of Medicine and Biochemistry, Thomas Jefferson University, Philadelphia, PA 19107, USA. AU - Kazerounian,S. AU - Pitari,G.M. AU - Ruiz-Stewart,I. AU - Schulz,S. AU - Waldman,S.A. KW - 0 (Nitric Oxide Donors) KW - 10102-43-9 (Nitric Oxide) KW - 15078-28-1 (Nitroprusside) KW - 7440-70-2 (Calcium) KW - EC 4.6.1.2 (Guanylate Cyclase) KW - Allosteric Regulation KW - Animal KW - Binding Sites KW - Binding, Competitive KW - Calcium [physiology] KW - Cattle KW - Enzyme Activation KW - Guanylate Cyclase [metabolism] KW - Kinetics KW - Lung [enzymology] KW - Nitric Oxide [physiology] KW - Nitric Oxide Donors [pharmacology] KW - Nitroprusside [pharmacology] KW - Support, Non-U.S. Gov't KW - Support, U.S. Gov't, P.H.S. PY - 2002///Mar 12 JA - Biochemistry VL - 41 IS - 10 SP - 3396 EP - 404 ER - TY - JOUR TI - YC-1-mediated vascular protection through inhibition of smooth muscle cell proliferation and platelet function. N2 - YC-1, a synthetic benzyl indazole derivative, is capable of stimulating endogenous vessel wall cyclic guanosine monophosphate (cGMP) production and attenuating the remodeling response to experimental arterial angioplasty. In an effort to investigate the mechanisms of this YC-1-mediated vasoprotection, we examined the influence of soluble YC-1 or YC-1 incorporated in a polyethylene glycol (PEG) hydrogel on cultured rat vascular smooth muscle cell (SMC) cGMP synthesis, SMC proliferation, and platelet function. Results demonstrate that soluble YC-1 stimulated SMC cGMP production in a dose-dependent fashion, while both soluble and hydrogel-released YC-1 inhibited vascular SMC proliferation in a dose-dependent fashion without effects on cell viability. Platelet aggregation and adherence to collagen were both significantly inhibited in a dose-dependent fashion by soluble and hydrogel-released YC-1. Arterial neointima formation following experimental balloon injury was significantly attenuated by perivascular hydrogel-released YC-1. These results suggest that YC-1 is a potent, physiologically active agent with major anti-proliferative and anti-platelet properties that may provide protection against vascular injury through cGMP-dependent mechanisms. AD - Department of Medicine, Baylor College of Medicine, Houston, Texas 77030, USA. dtulis@bcm.tmc.edu AU - Tulis,D.A. AU - Bohl Masters,K.S. AU - Lipke,E.A. AU - Schiesser,R.L. AU - Evans,A.J. AU - Peyton,K.J. AU - Durante,W. AU - West,J.L. AU - Schafer,A.I. KW - 0 (Hydrogels) KW - 0 (Indazoles) KW - 0 (Platelet Aggregation Inhibitors) KW - 0 (Polyethylene Glycols) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - 7665-99-8 (Cyclic GMP) KW - Angioplasty, Balloon [adverse effects] KW - Animal KW - Arterial Occlusive Diseases [drug therapy] KW - Arterial Occlusive Diseases [etiology] KW - Arterial Occlusive Diseases [pathology] KW - Blood Platelets [drug effects] KW - Blood Platelets [physiology] KW - Carotid Stenosis [drug therapy] KW - Carotid Stenosis [etiology] KW - Carotid Stenosis [pathology] KW - Cell Adhesion [drug effects] KW - Cell Division [drug effects] KW - Cells, Cultured KW - Cyclic GMP [metabolism] KW - Dose-Response Relationship, Drug KW - Hydrogels [administration & dosage] KW - Indazoles [administration & dosage] KW - Indazoles [pharmacology] KW - Muscle, Smooth, Vascular [drug effects] KW - Muscle, Smooth, Vascular [metabolism] KW - Platelet Aggregation Inhibitors [administration & dosage] KW - Platelet Aggregation Inhibitors [pharmacology] KW - Polyethylene Glycols [administration & dosage] KW - Rats KW - Rats, Sprague-Dawley KW - Support, Non-U.S. Gov't KW - Support, U.S. Gov't, P.H.S. PY - 2002///Mar 8 JA - Biochem Biophys Res Commun VL - 291 IS - 4 SP - 1014 EP - 21 ER - TY - JOUR TI - Comparison of nitric oxide donors in lowering intraocular pressure in rabbits: role of cyclic GMP. N2 - L-arginine-nitric oxide (NO) pathway participates in the physiology and in many pathological processes in the eye, such as glaucoma. The aim of the present study was to compare the ocular hypotensive effect of different NO-donors, and to get more information on the role of cyclic guanosine 3',5'-monophosphate (cGMP) in this process. The test compounds were administered topically or intravitreally in the eye of a normotensive rabbit. Intraocular pressure (IOP) was measured with a pneumatonometer after topical anesthesia. The metabolites of NO (nitrite, nitrate, NOx) and cGMP were assayed from the aqueous humor and plasma. NO-synthase (NOS) protein expression was assayed in the ciliary body by Western blotting. The maximal lowering of IOP was achieved as follows: atriopeptin III (concentration 78 (M, decrease in IOP 50%), atriopeptin 11 (84 (M, 37%). 8-Br-cGMP (90 mM, 37%), zaprinast + 8-Br-cGMP (1 mM + 90 mM, 34%), L-arginine (1 mM, 29%), SNP (40 mM, 28%), nitrosocaptopril (100 mM, 28%), S-nitrosothiol (SNOG) (10 mM, 27%), YC-1 (10 (M, 25%), zaprinast + SNP (1 mM + 40 mM, 22%), spermine NONOate (100 mM, 20%). The decrease in IOP lasted for 2-5 hr, except with atriopeptin II and III, when IOP values were first normalized in 6 hr and 2 days, respectively. In conclusion, the results of the present study indicate that by increasing the activity of L-arginine/NO/cGMP-pathway it is possible to lower IOP in rabbits equally to the currently used antiglaucomatous drugs. AD - Institute of Biomedicine, Biomedicum Helsinki, Pharmacology, University of Helsinki, Finland. AU - Kotikoski,H. AU - Alajuuma,P. AU - Moilanen,E. AU - Salmenpera,P. AU - Oksala,O. AU - Laippala,P. AU - Vapaatalo,H. PY - 2002///Feb JA - J Ocul Pharmacol Ther VL - 18 IS - 1 SP - 11 EP - 23 ER - TY - JOUR TI - Nitric oxide modulates endotoxin-induced platelet-endothelial cell adhesion in intestinal venules. N2 - Although platelets have been implicated in the pathogenesis of vascular diseases, little is known about factors that regulate interactions between platelets and the vessel wall under physiological conditions. The objectives of this study were to 1) define the contribution of nitric oxide (NO) to endotoxin (lipopolysaccharide, LPS)-induced platelet-endothelial cell (P/E) adhesion in murine intestinal venules and 2) determine whether the antiadhesive action of NO is mediated by soluble guanylate cyclase (sGC). Adhesive interactions between platelets and endothelial cells were monitored by intravital microscopy. LPS administration into control wild-type mice (WT) resulted in a >15-fold increase in P/E adhesion. Similar responses were observed using endothelial NO synthase (eNOS)-deficient platelets. However, treatment with the NO donor diethylenetriamine-nitric oxide (DETA-NO) attenuated the P/E adhesion response to LPS, whereas the NO synthase inhibitor N(G)-nitro-L-arginine methyl ester or eNOS deficiency resulted in an exacerbation. P/E adhesion response did not differ between LPS-treated WT and inducible NOS-deficient mice. Inhibition of sGC abolished the attenuating effects of DETA-NO, whereas the sGC activator 3-(5'-hydroxymethyl-2'-furyl)-1-benzyl indazole (YC-1) reduced LPS-induced P/E adhesion. These findings indicate that 1) eNOS-derived NO attenuates endotoxin-induced P/E adhesion and 2) sGC is responsible for the antiadhesive action of NO. AD - Department of Molecular and Cellular Physiology, Louisiana State University Health Sciences Center, Shreveport, Louisiana 71130-3932, USA. AU - Cerwinka,W.H. AU - Cooper,D. AU - Krieglstein,C.F. AU - Feelisch,M. AU - Granger,D.N. KW - 0 (Endotoxins) KW - 0 (Lipopolysaccharides) KW - 10102-43-9 (Nitric Oxide) KW - EC 1.14.13.- (endothelial constitutive nitric oxide synthase) KW - EC 1.14.13.- (inducible nitric oxide synthase) KW - EC 1.14.13.- (neural constitutive nitric oxide synthase) KW - EC 1.14.13.39 (Nitric-Oxide Synthase) KW - Animal KW - Endothelium, Vascular [drug effects] KW - Endothelium, Vascular [physiology] KW - Endotoxins [pharmacology] KW - Escherichia coli KW - Lipopolysaccharides [pharmacology] KW - Male KW - Mice KW - Mice, Inbred C57BL KW - Mice, Knockout KW - Microscopy, Fluorescence KW - Nitric Oxide [physiology] KW - Nitric-Oxide Synthase [deficiency] KW - Nitric-Oxide Synthase [genetics] KW - Nitric-Oxide Synthase [metabolism] KW - Platelet Adhesiveness [drug effects] KW - Support, U.S. Gov't, P.H.S. KW - Venules [drug effects] KW - Venules [physiology] UR - http://ajpheart.physiology.org/cgi/content/full/282/3/H1111 PY - 2002///Mar JA - Am J Physiol Heart Circ Physiol VL - 282 IS - 3 SP - H1111 EP - 7 ER - TY - JOUR TI - NO-independent regulatory site of direct sGC stimulators like YC-1 and BAY 41-2272. N2 - BACKGROUND: The most important receptor for nitic oxide is the soluble guanylate cyclase (sGC), a heme containing heterodimer. Recently, a pyrazolopyridine derivative BAY 41-2272, structurally related to YC-1, was identified stimulating soluble guanylate cyclase in an NO-independent manner, which results in vasodilatation and antiplatelet activity. The study described here addresses the identification of the NO-independent site on soluble guanylate cyclase. RESULTS: We developed a photoaffinity label (3H-meta-PAL) for the direct and NO-independent soluble guanylate cyclase (sGC) stimulator BAY 41-2272 by introducing an azido-group into the tritium labeled compound. The synthesized photoaffinitylabel directly stimulates the purified sGC and shows in combination with NO a synergistic effect on sGC activity. Irradiation with UV light of 3H-meta-PAL together with the highly purified sGC leads to a covalent binding to the alpha1-subunit of the enzyme. This binding is blocked by unlabeled meta-PAL, YC-1 and BAY 41-2272. For further identification of the NO-independent regulatory site the 3H-meta-PAL labeled sGC was fragmented by CNBr digest. The 3H-meta-PAL binds to a CNBr fragment, consisting of the amino acids 236-290 of the alpha1-subunit. Determination of radioactivity of the single PTH-cycles from the sequencing of this CNBr fragment detected the cysteines 238 and 243 as binding residues of the 3H-meta-PAL. CONCLUSIONS: Our data demonstrate that the region surrounding the cysteines 238 and 243 in the alpha1-subunit of the sGC could play an important role in regulation of sGC activity and could be the target of this new type of sGC stimulators. AD - Pharma Research Center, Bayer AG, Wuppertal, Germany. johannes-peter.stasch.js@bayer-ag.de AU - Becker,E.M. AU - Alonso-Alija,C. AU - Apeler,H. AU - Gerzer,R. AU - Minuth,T. AU - Pleibeta,U. AU - Schmidt,P. AU - Schramm,M. AU - Schroder,H. AU - Schroeder,W. AU - Steinke,W. AU - Straub,A. AU - Stasch,J.P. PY - 2001 JA - BMC Pharmacol VL - 1 IS - 1 ER - TY - JOUR TI - Soluble guanylyl cyclase activator YC-1 protects white matter axons from nitric oxide toxicity and metabolic stress, probably through Na(+) channel inhibition. N2 - In the rat isolated optic nerve, nitric oxide (NO) activates soluble guanylyl cyclase (sGC), resulting in a selective accumulation of cGMP in the axons. The axons are also selectively vulnerable to NO toxicity. The experiments initially aimed to determine any causative link between these two effects. It was shown, using a NONOate donor, that NO-induced axonal damage occurred independently of cGMP. Unexpectedly, however, the compound YC-1, which is an allosteric activator of sGC, potently inhibited NO-induced axonopathy (IC(50) = 3 microM). This effect was not attributable to increased cGMP accumulation. YC-1 (30 microM) also protected the axons against damage by simulated ischemia, which (like NO toxicity) is sensitive to Na(+) channel inhibition. Although chemically unrelated to any known Na(+) channel inhibitor, YC-1 was effective in two biochemical assays for activity on Na(+) channels in synaptosomes. Electrophysiological recording from hippocampal neurons showed that YC-1 inhibited Na(+) currents in a voltage-dependent manner. At a concentration giving maximal protection of optic nerve axons from NO toxicity (30 microM), YC-1 did not affect normal axon conduction. It is concluded that the powerful axonoprotective action of YC-1 is unrelated to its activity on sGC but is explained by a novel action on voltage-dependent Na(+) channels. The unusual ability of YC-1 to protect axons so effectively without interfering with their normal function suggests that the molecule could serve as a prototype for the development of more selective Na(+) channel inhibitors with potential utility in neurological and neurodegenerative disorders. AD - The Wolfson Institute for Biomedical Research, University College London, London, United Kingdom. g.garthwaite@ucl.ac.uk AU - Garthwaite,G. AU - Goodwin,D.A. AU - Neale,S. AU - Riddall,D. AU - Garthwaite,J. KW - 0 (Enzyme Activators) KW - 0 (Indazoles) KW - 0 (Sodium Channel Blockers) KW - 0 (Sodium Channels) KW - 10102-43-9 (Nitric Oxide) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - 50-99-7 (Glucose) KW - 7665-99-8 (Cyclic GMP) KW - 7782-44-7 (Oxygen) KW - EC 4.6.1.2 (Guanylate Cyclase) KW - Animal KW - Axons [drug effects] KW - Axons [metabolism] KW - Cyclic GMP [metabolism] KW - Drug Interactions KW - Enzyme Activators [pharmacology] KW - Glucose [metabolism] KW - Guanylate Cyclase [metabolism] KW - Indazoles [pharmacology] KW - Male KW - Nitric Oxide [toxicity] KW - Oxygen [metabolism] KW - Rats KW - Rats, Wistar KW - Sodium Channel Blockers [pharmacology] KW - Sodium Channels [metabolism] KW - Support, Non-U.S. Gov't UR - http://www.molpharm.org/cgi/content/full/61/1/97 PY - 2002///Jan JA - Mol Pharmacol VL - 61 IS - 1 SP - 97 EP - 104 ER - TY - JOUR TI - Role of conformational changes in the heme-dependent regulation of human soluble guanylate cyclase. N2 - Soluble guanylate cyclase (sGC) is a receptor for endogenous and exogenous nitric oxide (NO) and is activated many fold upon its binding, making it a core enzyme in the nitric oxide signal transduction pathway. Much effort has been made to understand the link between binding of NO at the sGC heme and activation of the cyclase activity. We report here the first direct evidence for the role of conformational changes in transmitting the signal between the heme and cyclase domains. Using both circular dichroism (CD) and fluorescence spectroscopies, we have probed the effect that the sGC activators NO and 3-(5'-hydroxymethyl-2'-furyl)-1-benzyl-indazole (YC-1) and the inhibitor 1H-[1,2,4]-oxadiazolo-[4,3-a]-quinoxalin-1-one (ODQ) have on the structure of the protein. Surprisingly, binding of either ODQ or YC-1 to NO-bound sGC cause virtually identical changes in the far-UV CD spectra of sGC, reflecting a perturbation in the secondary structure of the enzyme. This change is absent upon binding of NO, YC-1 or ODQ alone. Using this and previous data, we propose a working model for the mechanism of activation of sGC by NO and YC-1 and inhibition by ODQ. AD - Department of Chemistry and Biochemistry, San Francisco State University, 1600 Holloway Avenue, San Francisco, CA 94132-4163, USA. AU - Kosarikov,D.N. AU - Lee,J.M. AU - Uversky,V.N. AU - Counts Gerber,N. KW - 0 (Indazoles) KW - 0 (Nitric Oxide Donors) KW - 10102-43-9 (Nitric Oxide) KW - 14875-96-8 (Heme) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - 73-22-3 (Tryptophan) KW - 79-06-1 (Acrylamide) KW - EC 4.6.1.2 (Guanylate Cyclase) KW - Acrylamide KW - Circular Dichroism KW - Enzyme Activation KW - Guanylate Cyclase [antagonists & inhibitors] KW - Guanylate Cyclase [chemistry] KW - Heme [chemistry] KW - Human KW - Indazoles [chemistry] KW - Models, Chemical KW - Models, Molecular KW - Nitric Oxide [chemistry] KW - Nitric Oxide Donors [chemistry] KW - Protein Conformation KW - Protein Structure, Secondary KW - Spectrometry, Fluorescence KW - Support, Non-U.S. Gov't KW - Support, U.S. Gov't, P.H.S. KW - Tryptophan PY - 2001///Dec 15 JA - J Inorg Biochem VL - 87 IS - 4 SP - 267 EP - 76 ER - TY - JOUR TI - YC-1 activation of human soluble guanylyl cyclase has both heme-dependent and heme-independent components. N2 - YC-1 [3-(5'-hydroxymethyl-2'furyl)-1-benzyl indazole] is an allosteric activator of soluble guanylyl cyclase (sGC). YC-1 increases the catalytic rate of the enzyme and sensitizes the enzyme toward its gaseous activators nitric oxide or carbon monoxide. In other studies the administration of YC-1 to experimental animals resulted in the inhibition of the platelet-rich thrombosis and a decrease of the mean arterial pressure, which correlated with increased cGMP levels. However, details of YC-1 interaction with sGC and enzyme activation are incomplete. Although evidence in the literature indicates that YC-1 activation of sGC is strictly heme-dependent, this report presents evidence for both heme-dependent and heme-independent activation of sGC by YC-1. The oxidation of the sGC heme by 1H-(1,2,4)oxadiazole(4,3-a)quinoxalin-1-one completely inhibited the response to NO, but only partially attenuated activation by YC-1. We also observed activation by YC-1 of a mutant sGC, which lacks heme. These findings indicate that YC-1 activation of sGC can occur independently of heme, but that activation is substantially increased when the heme moiety is present in the enzyme. AD - Department of Integrative Biology and Pharmacology, Institute of Molecular Medicine, University of Texas Health Science Center at Houston, Houston, TX 77030, USA. AU - Martin,E. AU - Lee,Y.C. AU - Murad,F. KW - 0 (1H-(1,2,4)oxadiazolo(4,3-a)quinoxalin-1-one) KW - 0 (DNA Primers) KW - 0 (Enzyme Activators) KW - 0 (Indazoles) KW - 0 (Oxadiazoles) KW - 0 (Quinoxalines) KW - 14875-96-8 (Heme) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - EC 4.6.1.2 (Guanylate Cyclase) KW - Base Sequence KW - DNA Primers KW - Enzyme Activation KW - Enzyme Activators [pharmacology] KW - Guanylate Cyclase [metabolism] KW - Heme [metabolism] KW - Indazoles [pharmacology] KW - Oxadiazoles [pharmacology] KW - Oxidation-Reduction KW - Quinoxalines [pharmacology] KW - Solubility KW - Support, Non-U.S. Gov't KW - Support, U.S. Gov't, Non-P.H.S. UR - http://www.pnas.org/cgi/content/full/98/23/12938 PY - 2001///Nov 6 JA - Proc Natl Acad Sci U S A VL - 98 IS - 23 SP - 12938 EP - 42 ER - TY - JOUR TI - Prolonged exposure to YC-1 induces apoptosis in adrenomedullary endothelial and chromaffin cells through a cGMP-independent mechanism. N2 - YC-1, a benzyl indazole derivative, is an NO-independent direct activator of soluble guanylyl cyclase (sGC), which presents a synergistic action with NO in stimulating cGMP synthesis. These properties have served to suggest YC-1 as an attractive therapeutic agent by permitting the reduction of nitrovasodilator dosage and regulating endogenous cGMP metabolism. Here we studied the effect of prolonged exposure of adrenomedullary endothelial and chromaffin cells to YC-1. We found that YC-1 increased cGMP in the two types of cells and this action was blocked by the sGC inhibitor 1H-[1,2,4]oxadiazolo[4,3-a]quinoxalin-1-one (ODQ). Cells underwent apoptotic death in association with increased caspase-3-like activity, DNA fragmentation, cytoskeletal disorganization and changes in membrane permeability after prolonged incubation with YC-1. Caspase-3-like protease activity and DNA fragments in the cytoplasm were increased in a dose-dependent manner by 16 h YC-1 treatment. The specific and cell permeable caspase-3-like protease inhibitor DEVD-CHO effectively inhibited YC-1-mediated caspase-3-like activation and DNA fragmentation. Moreover, YC-1 also induced cell shape changes accompanied by actin filament disorganization and alterations in membrane permeability. Cells incubated for 24h with YC-1 showed damaged membranes by binding to nucleic acid of a dye excluded by the intact plasma membrane of live cells. YC-1 also induced a decrease in the intracellular non-specific esterase activity, another indication of cell toxicity. Apoptotic phenomena were not prevented by the presence of ODQ although it effectively inhibited the YC-1-elicited cGMP increases. These findings indicate that YC-1 induces apoptosis by activating caspase-3-like protease through a mechanism independent of sGC activation. AD - Departamento de Bioquimica, Facultad de Veterinaria, Universidad Complutense de Madrid, 28040, Madrid, Spain. AU - Ferrero,R. AU - Torres,M. KW - 0 (Enzyme Activators) KW - 0 (Indazoles) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - 7665-99-8 (Cyclic GMP) KW - Adrenal Medulla [cytology] KW - Adrenal Medulla [drug effects] KW - Adrenal Medulla [metabolism] KW - Animal KW - Apoptosis [drug effects] KW - Apoptosis [physiology] KW - Cattle KW - Cell Adhesion [drug effects] KW - Cell Size [drug effects] KW - Cells, Cultured KW - Chromaffin Cells [cytology] KW - Chromaffin Cells [drug effects] KW - Chromaffin Cells [metabolism] KW - Cyclic GMP [physiology] KW - Dose-Response Relationship, Drug KW - Endothelium [cytology] KW - Endothelium [drug effects] KW - Endothelium [metabolism] KW - Enzyme Activators [pharmacology] KW - Indazoles [pharmacology] KW - Intracellular Fluid [drug effects] KW - Intracellular Fluid [metabolism] KW - Support, Non-U.S. Gov't KW - Time Factors PY - 2001///Dec JA - Neuropharmacology VL - 41 IS - 7 SP - 895 EP - 906 ER - TY - JOUR TI - Organic phosphates as a new class of soluble guanylate cyclase inhibitors. N2 - This study aimed to examine effects of varied organic phosphates on activities of soluble guanylate cyclase (sGC). The enzyme was purified from bovine lung. Physiologically relevant concentrations of ATP, 2,3-bisphosphoglyceric acid and inositol hexakisphosphate inhibited its enzyme activities under steady-state conditions as well as those determined under stimulation with S-nitroso-N-acetylpenicillamine, a nitric oxide donor, carbon monoxide or YC-1. Lineweaver-Burk plot analyses revealed that these three organic phosphates act as competitive inhibitors. Other organic phosphates such as cardiolipin and sphingomyelin but not inorganic phosphates exhibited such inhibitory actions. These results suggest that organic phosphates serve as inhibitors for sGC-dependent signaling events. AD - Research Laboratory, Minophagen Pharmaceutical Co., Zama, Kanagawa, Japan. t-suzuki@sc.itc.keio.ac.jp AU - Suzuki,T. AU - Suematsu,M. AU - Makino,R. KW - 0 (Enzyme Activators) KW - 0 (Enzyme Inhibitors) KW - 0 (Indazoles) KW - 0 (Nitric Oxide Donors) KW - 0 (Organophosphorus Compounds) KW - 0 (S-nitro-N-acetylpenicillamine) KW - 10102-43-9 (Nitric Oxide) KW - 138-81-8 (2,3-Diphosphoglycerate) KW - 154453-18-6 (3-(5'-hydroxymethyl-2'-furyl)-1-benzylindazole) KW - 52-67-5 (Penicillamine) KW - 56-65-5 (Adenosine Triphosphate) KW - 630-08-0 (Carbon Monoxide) KW - 83-86-3 (Phytic Acid) KW - EC 4.6.1.2 (Guanylate Cyclase) KW - 2,3-Diphosphoglycerate [pharmacology] KW - Adenosine Triphosphate [pharmacology] KW - Animal KW - Binding, Competitive KW - Carbon Monoxide [pharmacology] KW - Cattle KW - Enzyme Activators [pharmacology] KW - Enzyme Inhibitors [pharmacology] KW - Guanylate Cyclase [antagonists & inhibitors] KW - In Vitro KW - Indazoles [pharmacology] KW - Kinetics KW - Nitric Oxide [metabolism] KW - Nitric Oxide Donors [pharmacology] KW - Organophosphorus Compounds [pharmacology] KW - Penicillamine [analogs & derivatives] KW - Penicillamine [pharmacology] KW - Phytic Acid [pharmacology] KW - Signal Transduction [drug effects] KW - Solubility KW - Support, Non-U.S. Gov't PY - 2001///Oct 19 JA - FEBS Lett VL - 507 IS - 1 SP - 49 EP - 53 ER - RefDB-Client-1.18/testdata/refdbteststyle.xml000755 001750 001750 00000055631 10652214750 022064 0ustar00markusmarkus000000 000000 ]> refdbteststyle . and , , and <FOLLOWING>. </FOLLOWING> . and , , and <FOLLOWING>. </FOLLOWING> ( ) , . . , . <FOLLOWING>, </FOLLOWING> . and , , and . , et al Anonymous and , and , , , <FOLLOWING>, </FOLLOWING> , . , et al Anonymous and , and , , , <FOLLOWING>, in: </FOLLOWING> <FOLLOWING>, </FOLLOWING> Vol. , and , and ed. eds. ( , ) p. . , et al Anonymous and , and , , , ( , ) p. . , et al Anonymous and , and , , , <PRECEEDING>. </PRECEEDING> ( , ) p. . , et al Anonymous and , and , , , ( , ) p. . , et al Anonymous and , and , , , ( , ) p. . , et al Anonymous and , and , , , <FOLLOWING>, </FOLLOWING> (in press) , et al Anonymous and , , and , , , <FOLLOWING>, </FOLLOWING> , . , et al Anonymous and , , and , , , <FOLLOWING>, </FOLLOWING> , . , et al Anonymous and , , and , , , <FOLLOWING>, </FOLLOWING> ( ) ; et al. et al. Anonymous and , , and , et al. et al. Anonymous and , , and Reference List RefDB-Client-1.18/testdata/alltypes.xml000644 001750 001750 00000043732 10652214750 020652 0ustar00markusmarkus000000 000000 My first book about dinosaurs Miller A Myers B B Jr. 1999 Sebastopol O'Reilly 1-56592-580-7
millera@dinosaurs.upenn.edu
http://www.dinosaurs.upenn.edu/
My first book series Smith K Not bad, after all 2002 2 24 palaeontology/dinosaurs/millera2002.pdf Dinosaurs were big animals that ate a lot dinosaurs evolution animals
XML: Principles, Tools, and Techniques Walsh N Guide to XML Connolly D 1999 Sebastopol O'Reilly Not bad An introduction how to deal with XML XML computer markup languages Application of global positioning systems to electrical systems synchronized phasor measurements techniques and uses Phadke Arun G Colloquium on Developments in the Use of Global Positioning Systems (GPS) in Power Systems,Feb 8 1994 1994 02 08 032 4/1 4/2 London,USA IEE,Stevenage,Engl 0963-3308
Virginia Tech, Blacksburg, VA, USA
IEE Colloquium (Digest) GPS navigational satellites provide an ideal method for distributing a common timing pulse at any point in the power network. Receivers of GPS transmission can reproduce the 1 pulse-per-second at any location on earth with better than 1 &mu;sec accuracy. Thus, if GPS receivers are built into each measuring system, phasors measured by these systems could be used as simultaneous measurements from all points of the power system, offering far more accuracy than needed for performing engineering analysis functions. Global positioning system Electric power systems Digital computers Electric current measurement Voltage measurement Communication satellites Satellite relay systems Iterative methods Algorithms Units of measurement
The Anti-Riot Act 1968 Code Number: 18 U.S.C. Public Law Number: P.L. 90-284 Sections 2101, 2102 Inhibition of superoxide anion generation by YC-1 in rat neutrophils through cyclic GMP-dependent and -independent mechanisms Wang J P Chang L C Raung S L Hsu M F Huang L J Kuo S C Biochem.Pharmacol. 2002 Feb 15 63 4 577 85
Department of Education and Research, Taichung Veterans General Hospital, 160 Chung Kang Road, Sec. 3, 407, ROC, Taichung, Taiwan. w1994@vghtc.gov.tw
3-(5'-Hydroxymethyl-2'-furyl)-1-benzyl indazole (YC-1), a soluble guanylyl cyclase (sGC) activator, inhibited formyl-methionyl-leucyl-phenylalanine (fMLP)-induced superoxide anion (O(2)*(-)) generation and O(2) consumption in rat neutrophils (IC(50) values of 12.7+/-3.1 and 17.7+/-6.9 microM, respectively). Inhibition of O(2)*(-) generation by YC-1 was partially reversed by the cyclic GMP-lowering agent 6-anilinoquinoline-5,8-quinone (LY83583) and by the Rp isomer of 8-(4-chlorophenylthio)guanosine-3',5'-monophosphorothioate (Rp-8-pCPT-cGMPS), a cyclic GMP-dependent protein kinase inhibitor. In cell-free systems, YC-1 failed to alter O(2)*(-) generation during dihydroxyfumaric acid autoxidation, phorbol 12-myristate 13-acetate (PMA)-activated neutrophil particulate NADPH oxidase preparation, and arachidonic acid-induced NADPH oxidase activation. YC-1 increased cellular cyclic GMP levels through the activation of sGC and the inhibition of cyclic GMP-hydrolyzing phosphodiesterase activity. The plateau phase, but not the initial spike, of fMLP-induced [Ca(2+)](i) changes was inhibited by YC-1 (IC(50) about 15 microM). fMLP- but not PMA-induced phospholipase D activation was inhibited by YC-1 (IC(50) about 28 microM). Membrane-associated ADP-ribosylation factor and Rho A in cell activation was also reduced by YC-1 at a similar concentration range. Neither cytosolic protein kinase C (PKC) activity nor PKC membrane translocation was altered by YC-1. YC-1 did not affect either fMLP-induced phosphatidylinositol 3-kinase activation or p38 mitogen-activated protein kinase phosphorylation, but slightly attenuated the phosphorylation of extracellular signal-regulated kinase. Collectively, these results indicate that the inhibition of the fMLP-induced respiratory burst by YC-1 is mediated by cyclic GMP-dependent and -independent signaling mechanisms. translocation
Radiation induced translocations Jackquet De Saint Georges J M Couwberghs T Melis H Joris J Machiels W Bens M 10th Intern Congress of Radiation Research 2003 1995 August 27 - September 1 2 2275 81 New York Uitgeverij de standaard blablablalablalbl balalblaalb baalhalbllaalalbalalbalbal conf radiation translocation My first book about dinosaurs Miller A Myers B B Jr. 1999 Sebastopol O'Reilly 1-56592-580-7
millera@dinosaurs.upenn.edu
http://www.dinosaurs.upenn.edu/
My first book series Smith K Not bad, after all 2002 2 24 palaeontology/dinosaurs/millera2002.pdf Dinosaurs were big animals that ate a lot dinosaurs evolution animals
XML: Principles, Tools, and Techniques Walsh N Guide to XML Connolly D 1999 Sebastopol O'Reilly Not bad An introduction how to deal with XML XML computer markup languages Application of global positioning systems to electrical systems synchronized phasor measurements techniques and uses Phadke Arun G Colloquium on Developments in the Use of Global Positioning Systems (GPS) in Power Systems,Feb 8 1994 1994 02 08 032 4/1 4/2 London,USA IEE,Stevenage,Engl 0963-3308
Virginia Tech, Blacksburg, VA, USA
IEE Colloquium (Digest) GPS navigational satellites provide an ideal method for distributing a common timing pulse at any point in the power network. Receivers of GPS transmission can reproduce the 1 pulse-per-second at any location on earth with better than 1 &mu;sec accuracy. Thus, if GPS receivers are built into each measuring system, phasors measured by these systems could be used as simultaneous measurements from all points of the power system, offering far more accuracy than needed for performing engineering analysis functions. Global positioning system Electric power systems Digital computers Electric current measurement Voltage measurement Communication satellites Satellite relay systems Iterative methods Algorithms Units of measurement
The Anti-Riot Act 1968 Code Number: 18 U.S.C. Public Law Number: P.L. 90-284 Sections 2101, 2102 Inhibition of superoxide anion generation by YC-1 in rat neutrophils through cyclic GMP-dependent and -independent mechanisms Wang J P Chang L C Raung S L Hsu M F Huang L J Kuo S C Biochem.Pharmacol. 2002 Feb 15 63 4 577 85
Department of Education and Research, Taichung Veterans General Hospital, 160 Chung Kang Road, Sec. 3, 407, ROC, Taichung, Taiwan. w1994@vghtc.gov.tw
3-(5'-Hydroxymethyl-2'-furyl)-1-benzyl indazole (YC-1), a soluble guanylyl cyclase (sGC) activator, inhibited formyl-methionyl-leucyl-phenylalanine (fMLP)-induced superoxide anion (O(2)*(-)) generation and O(2) consumption in rat neutrophils (IC(50) values of 12.7+/-3.1 and 17.7+/-6.9 microM, respectively). Inhibition of O(2)*(-) generation by YC-1 was partially reversed by the cyclic GMP-lowering agent 6-anilinoquinoline-5,8-quinone (LY83583) and by the Rp isomer of 8-(4-chlorophenylthio)guanosine-3',5'-monophosphorothioate (Rp-8-pCPT-cGMPS), a cyclic GMP-dependent protein kinase inhibitor. In cell-free systems, YC-1 failed to alter O(2)*(-) generation during dihydroxyfumaric acid autoxidation, phorbol 12-myristate 13-acetate (PMA)-activated neutrophil particulate NADPH oxidase preparation, and arachidonic acid-induced NADPH oxidase activation. YC-1 increased cellular cyclic GMP levels through the activation of sGC and the inhibition of cyclic GMP-hydrolyzing phosphodiesterase activity. The plateau phase, but not the initial spike, of fMLP-induced [Ca(2+)](i) changes was inhibited by YC-1 (IC(50) about 15 microM). fMLP- but not PMA-induced phospholipase D activation was inhibited by YC-1 (IC(50) about 28 microM). Membrane-associated ADP-ribosylation factor and Rho A in cell activation was also reduced by YC-1 at a similar concentration range. Neither cytosolic protein kinase C (PKC) activity nor PKC membrane translocation was altered by YC-1. YC-1 did not affect either fMLP-induced phosphatidylinositol 3-kinase activation or p38 mitogen-activated protein kinase phosphorylation, but slightly attenuated the phosphorylation of extracellular signal-regulated kinase. Collectively, these results indicate that the inhibition of the fMLP-induced respiratory burst by YC-1 is mediated by cyclic GMP-dependent and -independent signaling mechanisms. translocation
Radiation induced translocations Jackquet De Saint Georges J M Couwberghs T Melis H Joris J Machiels W Bens M 10th Intern Congress of Radiation Research2003 1995 August 27 - September 1 2 2275 81 New York Uitgeverij de standaard blablablalablalbl balalblaalb baalhalbllaalalbalalbalbal conf radiation translocation Jailing Hayden? Commonweal cited in Dee (1990) @104: the government is about to crack down on the New Left by singling Tom Hayden out for arrest. The FBI has been scouring the country for evidence to indict Hayden under the infamous Rap Brown lawcrossing state lines to incite to riot. @393