BioPerl
view release on metacpan or search on metacpan
Bio/Event/EventHandlerI.pm view on Meta::CPAN
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via the
web:
https://github.com/bioperl/bioperl-live/issues
=head1 AUTHOR - Jason Stajich
Email jason@bioperl.org
=head1 APPENDIX
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
=cut
# Let the code begin...
package Bio::Event::EventHandlerI;
use strict;
use Carp;
use base qw(Bio::Root::RootI);
=head2 will_handle
Title : will_handle
Usage : if( $handler->will_handle($event_type) ) { ... }
Function: Tests if this event builder knows how to process a specific event
Returns : boolean
Args : event type name
=cut
sub will_handle{
my ($self,$type) = @_;
$self->throw_not_implemented();
}
=head2 SAX methods
=cut
=head2 start_document
Title : start_document
Usage : $resultObj = $parser->start_document();
Function: Receive notification of the beginning of a document (the
input file of a parser). The parser will invoke this method
only once, before any other event callbacks.
Usually, a handler will reset any internal state structures
when this method is called.
Returns : none
Args : none
=cut
sub start_document{
my ($self,@args) = @_;
$self->throw_not_implemented;
}
=head2 end_document
Title : end_document
Usage : $parser->end_document();
Function: Receive notification of the end of a document (normally the
input file of a parser). The parser will invoke this method
only once, and it will be the last method invoked during
the parse of the document. The parser shall not invoke this
method until it has either abandoned parsing (because of an
unrecoverable error) or reached the end of input.
Unlike the XML SAX signature of this method, this method is
expected to return the object representing the result of
parsing the document.
Returns : The object representing the result of parsing the input
stream between the calls to start_document() and this method.
Args : none
=cut
sub end_document{
my ($self,@args) = @_;
$self->throw_not_implemented;
}
=head2 start_element
Title : start_element
Usage : $parser->start_element
Function: Receive notification of the beginning of an element. The
Parser will invoke this method at the beginning of every
element in the input stream; there will be a corresponding
end_element() event for every start_element() event (even when
the element is empty). All of the element's content will be
reported, in order, before the corresponding end_element()
event.
Returns : none
Args : A hashref with at least 2 keys: 'Data' and 'Name'. The value
for 'Name' is expected to be the type of element being
encountered; the understood values will depend on the IO
parser to which this interface is being applied. Likewise, the
( run in 1.844 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )