3 # BioPerl module for Bio::Ontology::RelationshipFactory
5 # Cared for by Hilmar Lapp <hlapp at gmx.net>
7 # Copyright Hilmar Lapp
9 # You may distribute this module under the same terms as perl itself
12 # (c) Hilmar Lapp, hlapp at gmx.net, 2002.
13 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
15 # You may distribute this module under the same terms as perl itself.
16 # Refer to the Perl Artistic License (see the license accompanying this
17 # software package, or see http://www.perl.com/language/misc/Artistic.html)
18 # for the terms under which you may use, modify, and redistribute this module.
20 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
21 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
22 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25 # POD documentation - main docs before the code
29 Bio::Ontology::RelationshipFactory - Instantiates a new
30 Bio::Ontology::RelationshipI (or derived class) through a factory
34 use Bio::Ontology::RelationshipFactory;
36 # the default type is Bio::Ontology::Relationship
37 my $factory = Bio::Ontology::RelationshipFactory->new(
38 -type => 'Bio::Ontology::GOterm');
39 my $clu = $factory->create_object(-name => 'peroxisome',
40 -ontology => 'Gene Ontology',
41 -identifier => 'GO:0005777');
46 This object will build L<Bio::Ontology::RelationshipI> objects generically.
52 User feedback is an integral part of the evolution of this and other
53 Bioperl modules. Send your comments and suggestions preferably to
54 the Bioperl mailing list. Your participation is much appreciated.
56 bioperl-l@bioperl.org - General discussion
57 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
61 Report bugs to the Bioperl bug tracking system to help us keep track
62 of the bugs and their resolution. Bug reports can be submitted via
65 http://bugzilla.open-bio.org/
67 =head1 AUTHOR - Hilmar Lapp
69 Email hlapp at gmx.net
74 The rest of the documentation details each of the object methods.
75 Internal methods are usually preceded with a _
80 # Let the code begin...
83 package Bio
::Ontology
::RelationshipFactory
;
88 use base
qw(Bio::Factory::ObjectFactory);
93 Usage : my $obj = Bio::Ontology::RelationshipFactory->new();
94 Function: Builds a new Bio::Ontology::RelationshipFactory object
95 Returns : Bio::Ontology::RelationshipFactory
96 Args : -type => string, name of a Bio::Ontology::RelationshipI
98 The default is Bio::Ontology::Relationship.
100 See L<Bio::Ontology::Relationship>, L<Bio::Ontology::RelationshipI>.
105 my($class,@args) = @_;
107 my $self = $class->SUPER::new
(@args);
109 # make sure this matches our requirements
110 $self->interface("Bio::Ontology::RelationshipI");
111 $self->type($self->type() || "Bio::Ontology::Relationship");