3 # BioPerl module for Bio::Tools::EUtilities::HistoryI
5 # Cared for by Chris Fields
7 # Copyright Chris Fields
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 # Part of the EUtilities BioPerl package
17 Bio::Tools::EUtilities::HistoryI - simple extension of EUtilDataI interface
18 class for classes which hold NCBI server history data
22 #should work for any class which is-a HistoryI
24 if ($obj->has_History) {
28 ($webenv, $querykey) = $obj->history;
30 $obj->history($webenv, $querykey);
32 $webenv = $obj->get_webenv;
34 $query_key = $obj->get_query_key;
38 This class extends methods for any EUtilDataI implementation allow instances to
39 dealwith NCBI history data (WebEnv and query_key). These can be used as
40 parameters for further queries against data sets stored on the NCBI server, much
41 like NCBI's Entrez search history. These are important when one wants to run
42 complex queries using esearch, retrieve related data using elink, and retrieve
43 large datasets using epost/efetch.
45 The simplest implementation is Bio::Tools::EUtilities::History, which holds the
46 history data for epost. See also Bio::Tools::EUtilities::Query (esearch) and
47 Bio::Tools::EUtilities::LinkSet (elink), which also implement HistoryI.
55 User feedback is an integral part of the evolution of this and other Bioperl
56 modules. Send your comments and suggestions preferably to one of the Bioperl
57 mailing lists. Your participation is much appreciated.
59 bioperl-l@lists.open-bio.org - General discussion
60 http://www.bioperl.org/wiki/Mailing_lists - About the mailing lists
64 Report bugs to the Bioperl bug tracking system to help us keep track the bugs
65 and their resolution. Bug reports can be submitted via the web.
67 http://bugzilla.open-bio.org/
71 Email cjfields at uiuc dot edu
75 The rest of the documentation details each of the object methods. Internal
76 methods are usually preceded with a _
80 # Let the code begin...
82 package Bio
::Tools
::EUtilities
::HistoryI
;
86 use base
qw(Bio::Tools::EUtilities::EUtilDataI);
91 Usage : my ($webenv, $qk) = $hist->history
92 Function : Get/Set two-element list of webenv() and query_key()
94 Args : two-element list of webenv, querykey
100 $self->parse_data if ($self->can('parse_data') && !$self->data_parsed);
102 my ($webenv, $querykey) = (shift, shift);
103 $self->throw("Missing part of cookie!") if (!$webenv || !$querykey);
104 ($self->{'_webenv'}, $self->{'_querykey'}) = ($webenv, $querykey);
106 return ($self->get_webenv, $self->get_query_key);
112 Usage : my $webenv = $hist->get_webenv
113 Function : returns web environment key needed to retrieve results from
115 Returns : string (encoded key)
122 $self->parse_data if ($self->can('parse_data') && !$self->data_parsed);
123 return $self->{'_webenv'};
128 Title : get_query_key
129 Usage : my $qk = $hist->get_query_key
130 Function : returns query key (integer) for the history number for this session
138 $self->parse_data if ($self->can('parse_data') && !$self->data_parsed);
139 return $self->{'_querykey'};