This is a class interface which focuses on common parameter-related tasks such
as building simple database queries, URI-related requests, program arguments,
etc.
Implementing classes use the following ways to set parameters:
1) Create a new instance of a ParameterBaseI-implementing object.
$pobj->Bio::DB::MyParamClass->new(-db => 'local', -id => \@ids);
2) Pass the parameters as a hash or array to set_parameters(), which sets the
parameters listed in the hash but leaves all others as is.
$pobj->set_parameters(-retmax => 100, -retstart => 20);
3) Pass the parameters as a hash or array to reset_parameters(), which sets the
parameters listed in the hash and resets everything else.
$pobj->reset_parameters(-term => 'pyrimidine'); # sets db and id to undef
4) Pass values using specific getter/setters.
$pobj->id(\@ids); # sets IDs
There is no restriction on what one uses to set up individual parameter
getter/setters, though there are some other options implemented in BioPerl (for
instance, Bio::Root::RootI::_set_from_args()).
A key requirement is there be a way to detect changes in the state of the
ParameterBaseI object so that any object with a
Bio::ParameterBaseI can decide
whether to submit a new request or return cached data. State changes are
revealed by the returned values of the parameters_changed() method, which is a
simple boolean set to TRUE when the object is first instantiated or parameters
have changed.
When retrieving anything using the implementation-specific to_* methods (such as
to_query, to_string, to_uri, to_request, etc), the ParameterBaseI object state
is set to FALSE to indicate the data has been accessed and indicate reaccessing
will retrieve the same value. The observing object can then independently decide
whether to rerun the cached query or return a previously cached result.
One can also use indiviual getter/setters to retrieve single parameter values as
well as use parameter_hash() to retrieve all of the parameters in one go as a
hash. To check which parameters are available use available_parameters(). Args
passed to