3 # BioPerl module for Bio::Tools::EUtilities::History
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::History - simple HistoryI implementation for holding
22 #### should not create instance directly; Bio::Tools::EUtilities does this ####
24 my $hist = Bio::Tools::EUtilities->new(-eutil => 'epost',
25 -file => 'epost.xml');
27 if ($hist->has_History) {
31 ($webenv, $querykey) = $hist->get_history;
33 $webenv = $hist->get_webenv;
35 $query_key = $hist->get_query_key;
39 This class is the simplest Bio::Tools::EUtilities::HistoryI implementation and
40 is primarily used for epost. This class adds methods to objects for dealing with
41 NCBI history data (WebEnv and query_key). These can be used as parameters for
42 futher queries against data sets stored on the NCBI server, much like NCBI's
43 Entrez search history.
45 NOTE: I plan on testing how long this data is stored remotely. I believe NCBI
46 deletes remote data after 24 hours.
52 User feedback is an integral part of the evolution of this and other Bioperl
53 modules. Send your comments and suggestions preferably to one of the Bioperl
54 mailing lists. Your participation is much appreciated.
56 bioperl-l@lists.open-bio.org - General discussion
57 http://www.bioperl.org/wiki/Mailing_lists - About the mailing lists
61 Report bugs to the Bioperl bug tracking system to help us keep track the bugs
62 and their resolution. Bug reports can be submitted via the web.
64 http://bugzilla.open-bio.org/
68 Email cjfields at uiuc dot edu
72 The rest of the documentation details each of the object methods. Internal
73 methods are usually preceded with a _
77 # Let the code begin...
79 package Bio
::Tools
::EUtilities
::History
;
82 #use URI::Escape qw(uri_unescape);
84 use base
qw(Bio::Tools::EUtilities);
86 =head1 Bio::Tools::EUtilities::History relevant methods
88 These are inherited through the Bio::Tools::EUtilities interface
89 Bio::Tools::EUtilities::HistoryI
94 Usage : my ($webenv, $qk) = $hist->history
95 Function : Get/Set two-element list of webenv() and query_key()
97 Args : two-element list of webenv, querykey
104 Usage : my $webenv = $hist->get_webenv
105 Function : returns web environment key needed to retrieve results from
107 Returns : string (encoded key)
114 Title : get_query_key
115 Usage : my $qk = $hist->get_query_key
116 Function : returns query key (integer) for the history number for this session
125 Usage : if ($hist->has_History) {...}
126 Function : returns TRUE if full history (webenv, query_key) is present
127 Returns : BOOLEAN, value eval'ing to TRUE or FALUE
135 my ($self, $simple) = @_;
136 map { $self->{'_'.lc $_} = $simple->{$_} } keys %$simple;