Bio::DB::GenericWebDBI - abstract interface for parameter-based remote database access
## grab data from HTTP::Response object using concrete class#
$data = $db->get_response->content;
## $data is the raw data output from the HTTP::Response object;# this data may be preparsed using the private method _parse_response
WARNING: Please do NOT spam the web servers with multiple requests. This class acts as a user agent interface for any generic web database, but is specifically geared towards CGI-based databases which accept parameters. File and filehandle support to be added Any feedback is welcome.
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://www.bioperl.org/wiki/Mailing_lists - About the mailing lists
Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web.
http://bugzilla.open-bio.org/
Email cjfields at uiuc dot edu The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
url_base_address
Title : url_base_addressUsage : my $address = $self->url_base_address or$self->url_base_address($address)Function: Get/Set the base URL for the Web DatabaseReturns : Base URL for the Web DatabaseArgs : $address - URL for the WebDatabase
proxy
Title : proxyUsage : $httpproxy = $db->proxy('http') or$db->proxy(['http','ftp'], 'http://myproxy' )Function: Get/Set a proxy for use of proxyReturns : a string indicating the proxyArgs : $protocol : an array ref of the protocol(s) to set/get$proxyurl : url of the proxy to use for the specified protocol$username : username (if proxy requires authentication)$password : password (if proxy requires authentication)
authentication
Title : authenticationUsage : $db->authentication($user,$pass)Function: Get/Set authentication credentialsReturns : Array of user/passArgs : Array or user/pass
db
Title : dbUsage : $db->dbFunction: Get/Set database parameterReturns : stringArgs : optional string
id
Title : idUsage : $agent->id($id)$agent->id(\@id)Function: Get/Set id(s)Returns : reference to id(s)Args : a single id or reference to array of id(s)
retmode
Title : retmodeUsage : $agent->retmode($mode)Function: Get/Set return mode for query (text, xml, html, asn.1, etc)Returns : string for return modeArgs : optional string
get_response
Title : get_responseUsage : $agent->get_response;Function: get the request based on set object parameters, retrieved usingthe private method _get_paramsReturns : HTTP::Response objectArgs : none
This is implemented by the derived class
delay
Title : delayUsage : $secs = $self->delay([$secs])Function: get/set number of seconds to delay between fetchesReturns : number of seconds to delayArgs : new value
NOTE: the default is to use the value specified by delay_policy(). This can be overridden by calling this method, or by passing the -delay argument to new().
delay_policy
Title : delay_policyUsage : $secs = $self->delay_policyFunction: return number of seconds to delay between calls to remote dbReturns : number of seconds to delayArgs : none
NOTE: The default delay policy is 0s. Override in subclasses to implement delays. The timer has only second resolution, so the delay will actually be +/- 1s.
_submit_request
Title : _submit_requestUsage : my $url = $self->get_requestFunction: builds request object based on set parametersReturns : HTTP::RequestArgs : optional : Bio::DB::EUtilities cookie
_get_params
Title : _get_paramsUsage : my $url = $self->_get_paramsFunction: builds parameter list for web requestReturns : hash of parameter-value parisArgs : optional : Bio::DB::EUtilities cookie
_sleep
Title : _sleepUsage : $self->_sleepFunction: sleep for a number of seconds indicated by the delay policyReturns : noneArgs : none
NOTE: This method keeps track of the last time it was called and only imposes a sleep if it was called more recently than the delay_policy() allows.