sync w/ main trunk
[bioperl-live.git] / Bio / Factory / LocationFactoryI.pm
bloba7b1b711c62541d4268b9b846f75fad7f524c9d7
1 # $Id$
3 # BioPerl module for Bio::Factory::LocationFactoryI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Hilmar Lapp <hlapp at gmx.net>
9 # Copyright Hilmar Lapp
11 # You may distribute this module under the same terms as perl itself
14 # (c) Hilmar Lapp, hlapp at gnf.org, 2002.
15 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
17 # You may distribute this module under the same terms as perl itself.
18 # Refer to the Perl Artistic License (see the license accompanying this
19 # software package, or see http://www.perl.com/language/misc/Artistic.html)
20 # for the terms under which you may use, modify, and redistribute this module.
22 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
23 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
24 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27 # POD documentation - main docs before the code
29 =head1 NAME
31 Bio::Factory::LocationFactoryI - A factory interface for generating locations from a string
33 =head1 SYNOPSIS
35 # Do not use directly, see Bio::Factory::LocationFactory for example
36 use Bio::Factory::FTLocationFactory;
37 my $locfact = Bio::Factory::FTLocationFactory->new();
38 my $location = $locfact->from_string("1..200");
39 print $location->start(), " ", $location->end(), " ", $location->strand,"\n";
41 =head1 DESCRIPTION
43 An interface for Location Factories which generate Bio::LocationI
44 objects from a string.
46 =head1 FEEDBACK
48 =head2 Mailing Lists
50 User feedback is an integral part of the evolution of this and other
51 Bioperl modules. Send your comments and suggestions preferably to
52 the Bioperl mailing list. Your participation is much appreciated.
54 bioperl-l@bioperl.org - General discussion
55 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
57 =head2 Support
59 Please direct usage questions or support issues to the mailing list:
61 L<bioperl-l@bioperl.org>
63 rather than to the module maintainer directly. Many experienced and
64 reponsive experts will be able look at the problem and quickly
65 address it. Please include a thorough description of the problem
66 with code and data examples if at all possible.
68 =head2 Reporting Bugs
70 Report bugs to the Bioperl bug tracking system to help us keep track
71 of the bugs and their resolution. Bug reports can be submitted via the
72 web:
74 http://bugzilla.open-bio.org/
76 =head1 AUTHOR - Hilmar Lapp
78 Email hlapp at gmx.net
80 =head1 APPENDIX
82 The rest of the documentation details each of the object methods.
83 Internal methods are usually preceded with a _
85 =cut
88 # Let the code begin...
91 package Bio::Factory::LocationFactoryI;
92 use strict;
93 use Carp;
95 use base qw(Bio::Root::RootI);
97 =head2 from_string
99 Title : from_string
100 Usage : $loc = $locfactory->from_string("100..200");
101 Function: Parses the given string and returns a Bio::LocationI implementing
102 object representing the location encoded by the string.
104 Different implementations may support different encodings. An
105 example of a commonly used encoding is the Genbank feature table
106 encoding of locations.
107 Example :
108 Returns : A Bio::LocationI implementing object.
109 Args : A string.
112 =cut
114 sub from_string{
115 my ($self,@args) = @_;
117 $self->throw_not_implemented();