2 # BioPerl module for Bio::SearchIO::EventHandlerI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Jason Stajich <jason@bioperl.org>
8 # Copyright Jason Stajich
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::SearchIO::EventHandlerI - An abstract Event Handler for Search Result parsing
20 # do not use this object directly it is an interface
21 # See Bio::SearchIO::SearchResultEventBuilder for an implementation
23 use Bio::SearchIO::SearchResultEventBuilder;
24 my $handler = Bio::SearchIO::SearchResultEventBuilder->new();
28 This interface describes the basic methods needed to handle Events
29 thrown from parsing a Search Result such as FASTA, BLAST, or HMMer.
35 User feedback is an integral part of the evolution of this and other
36 Bioperl modules. Send your comments and suggestions preferably to
37 the Bioperl mailing list. Your participation is much appreciated.
39 bioperl-l@bioperl.org - General discussion
40 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
44 Please direct usage questions or support issues to the mailing list:
46 I<bioperl-l@bioperl.org>
48 rather than to the module maintainer directly. Many experienced and
49 reponsive experts will be able look at the problem and quickly
50 address it. Please include a thorough description of the problem
51 with code and data examples if at all possible.
55 Report bugs to the Bioperl bug tracking system to help us keep track
56 of the bugs and their resolution. Bug reports can be submitted via the
59 https://github.com/bioperl/bioperl-live/issues
61 =head1 AUTHOR - Jason Stajich
63 Email jason-at-bioperl.org
67 The rest of the documentation details each of the object methods.
68 Internal methods are usually preceded with a _
73 # Let the code begin...
76 package Bio
::SearchIO
::EventHandlerI
;
82 use base
qw(Bio::Event::EventHandlerI);
87 Usage : $handler->start_result($data)
88 Function: Begins a result event cycle
96 $self->throw_not_implemented();
102 Usage : $handler->end_result($data)
103 Function: Ends a result event cycle
104 Returns : Bio::Search::Result::ResultI object
111 my ($self,@args) = @_;
112 $self->throw_not_implemented();
118 Usage : $handler->start_hsp($data)
119 Function: Start a HSP event cycle
121 Args : type of element
127 my ($self,@args) = @_;
128 $self->throw_not_implemented();
134 Usage : $handler->end_hsp()
135 Function: Ends a HSP event cycle
136 Returns : Bio::Search::HSP::HSPI object
137 Args : type of event and associated hashref
142 my ($self,@args) = @_;
143 $self->throw_not_implemented();
149 Usage : $handler->start_hit()
150 Function: Starts a Hit event cycle
152 Args : type of event and associated hashref
158 my ($self,@args) = @_;
159 $self->throw_not_implemented
165 Usage : $handler->end_hit()
166 Function: Ends a Hit event cycle
167 Returns : Bio::Search::Hit::HitI object
168 Args : type of event and associated hashref
174 my ($self,@args) = @_;
175 $self->throw_not_implemented();
178 =head2 start_iteration
180 Title : start_iteration
181 Usage : $handler->start_iteration()
182 Function: Starts an Iteration event cycle
184 Args : type of event and associated hashref
189 sub start_iteration
{
190 my ($self,@args) = @_;
191 $self->throw_not_implemented
196 Title : end_iteration
197 Usage : $handler->end_iteration()
198 Function: Ends an Iterationevent cycle
199 Returns : Bio::Search::Iteration::IterationI object
200 Args : type of event and associated hashref
206 my ($self,@args) = @_;
207 $self->throw_not_implemented();
210 =head2 register_factory
212 Title : register_factory
213 Usage : $handler->register_factory('TYPE',$factory);
214 Function: Register a specific factory for a object type class
216 Args : string representing the class and
217 Bio::Factory::ObjectFactoryI
219 See L<Bio::Factory::ObjectFactoryI> for more information
223 sub register_factory
{
224 my ($self,@args) = @_;
225 $self->throw_not_implemented();
232 Usage : my $f = $handler->factory('TYPE');
233 Function: Retrieves the associated factory for requested 'TYPE'
234 Returns : a Bio::Factory::ObjectFactoryI
235 Throws : Bio::Root::BadParameter if none registered for the supplied type
236 Args : name of factory class to retrieve
238 See L<Bio::Factory::ObjectFactoryI> for more information
243 my ($self,@args) = @_;
244 $self->throw_not_implemented();
248 =head2 Bio::Event::EventHandlerI methods
255 Usage : if( $handler->will_handle($event_type) ) { ... }
256 Function: Tests if this event builder knows how to process a specific event
258 Args : event type name
265 See L<Bio::Event::EventHandlerI> for the additional SAX methods.