3 # BioPerl module for Bio::Map::PositionHandlerI
5 # Cared for by Sendu Bala <bix@sendu.me.uk>
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::Map::PositionHandlerI - A Position Handler Interface
19 # do not use this module directly
20 # See Bio::Map::PositionHandler for an example of
25 This interface describes the basic methods required for Position Handlers. A
26 Position Handler copes with the coordination of different Bio::Map::EntityI
27 objects, adding and removing them from each other and knowning who belongs to
28 who. These relationships between objects are based around shared Positions,
29 hence PositionHandler.
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 Report bugs to the Bioperl bug tracking system to help us keep track
45 of the bugs and their resolution. Bug reports can be submitted via the
48 http://bugzilla.open-bio.org/
50 =head1 AUTHOR - Sendu Bala
56 The rest of the documentation details each of the object methods.
57 Internal methods are usually preceded with a _
61 # Let the code begin...
63 package Bio
::Map
::PositionHandlerI
;
66 use base
qw(Bio::Root::RootI);
68 =head2 General methods
75 Usage : $position_handler->register();
76 Function: Ask this Position Handler to look after your entity relationships.
84 $self->throw_not_implemented();
90 Usage : my $index = $position_handler->index();
91 Function: Get the unique registry index for yourself, generated during the
100 $self->throw_not_implemented();
106 Usage : my $entity = $position_handler->get_entity($index);
107 Function: Get the entity that corresponds to the supplied registry index.
108 Returns : Bio::Map::EntityI object
115 $self->throw_not_implemented();
118 =head2 Methods for Bio::Map::PositionI objects
125 Usage : my $map = $position_handler->map();
126 $position_handler->map($map);
127 Function: Get/Set the map you are on. You must be a Position.
128 Returns : L<Bio::Map::MapI>
129 Args : none to get, OR
130 new L<Bio::Map::MapI> to set
136 $self->throw_not_implemented();
142 Usage : my $element = $position_handler->element();
143 $position_handler->element($element);
144 Function: Get/Set the map element you are for. You must be a Position.
145 Returns : L<Bio::Map::MappableI>
146 Args : none to get, OR
147 new L<Bio::Map::MappableI> to set
153 $self->throw_not_implemented();
156 =head2 Methods for all other Bio::Map::EntityI objects
162 Title : add_positions
163 Usage : $position_handler->add_positions($pos1, $pos2, ...);
164 Function: Add some positions to yourself. You can't be a position.
166 Args : Array of Bio::Map::PositionI objects
172 $self->throw_not_implemented();
177 Title : get_positions
178 Usage : my @positions = $position_handler->get_positions();
179 Function: Get all your positions. You can't be a Position.
180 Returns : Array of Bio::Map::PositionI objects
181 Args : none for all, OR
182 Bio::Map::EntityI object to limit the Positions to those that
183 are shared by you and this other entity.
189 $self->throw_not_implemented();
192 =head2 purge_positions
194 Title : purge_positions
195 Usage : $position_handler->purge_positions();
196 Function: Remove all positions from yourself. You can't be a Position.
198 Args : none to remove all, OR
199 Bio::Map::PositionI object to remove only that entity, OR
200 Bio::Map::EntityI object to limit the removal to those Positions that
201 are shared by you and this other entity.
205 sub purge_positions
{
207 $self->throw_not_implemented();
210 =head2 get_other_entities
212 Title : get_other_entities
213 Usage : my @entities = $position_handler->get_other_entities();
214 Function: Get all the entities that share your Positions. You can't be a
216 Returns : Array of Bio::Map::EntityI objects
221 sub get_other_entities
{
223 $self->throw_not_implemented();