[Bioperl-guts-l] bioperl-live/Bio/Tools/EUtilities/Link LinkSet.pm, 1.1, 1.2 UrlLink.pm, 1.1, 1.2

Christopher John Fields cjfields at dev.open-bio.org
Sun Jun 24 23:43:32 EDT 2007


Update of /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/Link
In directory dev.open-bio.org:/tmp/cvs-serv11600/EUtilities/Link

Modified Files:
	LinkSet.pm UrlLink.pm 
Log Message:
Cleaning up API, need to clean up POD and make callbacks more consistent

Index: LinkSet.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/Link/LinkSet.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LinkSet.pm	23 Jun 2007 04:43:05 -0000	1.1
--- LinkSet.pm	25 Jun 2007 03:43:30 -0000	1.2
***************
*** 61,68 ****
  
  package Bio::Tools::EUtilities::Link::LinkSet;
  use base qw(Bio::Root::Root Bio::Tools::EUtilities::HistoryI);
  use Bio::Tools::EUtilities::Link::UrlLink;
  use Bio::Tools::EUtilities::Info::LinkInfo;
- use Data::Dumper;
  
  sub new {
--- 61,70 ----
  
  package Bio::Tools::EUtilities::Link::LinkSet;
+ use strict;
+ use warnings;
+ 
  use base qw(Bio::Root::Root Bio::Tools::EUtilities::HistoryI);
  use Bio::Tools::EUtilities::Link::UrlLink;
  use Bio::Tools::EUtilities::Info::LinkInfo;
  
  sub new {
***************
*** 305,309 ****
  
   Title    : get_LinkInfo
!  Usage    : my @urls = $linkset->get_LinkInfo
   Function : returns all LinkInfo objects
   Returns  : list of Bio::Tools::EUtilities::Link::LinkInfo
--- 307,311 ----
  
   Title    : get_LinkInfo
!  Usage    : my @links = $linkset->get_LinkInfo
   Function : returns all LinkInfo objects
   Returns  : list of Bio::Tools::EUtilities::Link::LinkInfo
***************
*** 313,317 ****
  
  sub get_LinkInfo {
!     return ref $self->{'_linkinfo'} ? @{ $self->{'_linkinfo'} } : return;
  }
  
--- 315,350 ----
  
  sub get_LinkInfo {
!     my $self = shift;
!     return ref $self->{'_linkinfo'} ? @{ $self->{'_linkinfo'} } : return ();
! }
! 
! =head2 rewind
! 
!  Title    : rewind
!  Usage    : $info->rewind() # rewinds all (default)
!             $info->rewind('links') # rewinds only links
!  Function : 'rewinds' (resets) specified interators (all if no arg)
!  Returns  : none
!  Args     : [OPTIONAL] String: 
!             'all'       - all iterators (default)
!             'linkinfo' or 'linkinfos'  - LinkInfo objects only
!             'urllinks'   - UrlLink objects only
! 
! =cut
! 
! {
!     my %VALID_DATA = ('linkinfo' => 'linkinfo',
!                       'linkinfos' => 'linkinfo',
!                       'urllinks' => 'urllinks');
!     
!     sub rewind {
!         my ($self, $arg) = @_;
!         $arg ||= 'all';
!         if (exists $VALID_DATA{$arg}) {
!             delete $self->{'_'.$arg.'_it'};
!         } elsif ($arg eq 'all') {
!             delete $self->{'_'.$_.'_it'} for values %VALID_DATA;
!         }
!     }
  }
  
***************
*** 373,376 ****
--- 406,410 ----
      my ($self, $data) = @_;
      for my $urldata (@{$data->{ObjUrl}}) {
+         $urldata->{dbfrom} = $data->{DbFrom} if exists $data->{DbFrom};
          my $obj = Bio::Tools::EUtilities::Link::UrlLink->new(-eutil => 'elink',
                                                               -datatype => 'urldata',
***************
*** 385,388 ****
--- 419,423 ----
      my ($self, $data) = @_;
      for my $linkinfo (@{$data->{LinkInfo}}) {
+         $linkinfo->{dbfrom} = $data->{DbFrom} if exists $data->{DbFrom};
          my $obj = Bio::Tools::EUtilities::Info::LinkInfo->new(-eutil => 'elink',
                                                               -datatype => 'linkinfo',

Index: UrlLink.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/EUtilities/Link/UrlLink.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** UrlLink.pm	23 Jun 2007 04:43:05 -0000	1.1
--- UrlLink.pm	25 Jun 2007 03:43:30 -0000	1.2
***************
*** 65,68 ****
--- 65,80 ----
  use Data::Dumper;
  
+ =head2 get_dbfrom
+ 
+  Title    : get_dbfrom
+  Usage    : 
+  Function : 
+  Returns  : 
+  Args     : 
+ 
+ =cut
+ 
+ sub get_dbfrom { return shift->{'_dbfrom'}; }
+ 
  =head2 get_attribute
  



More information about the Bioperl-guts-l mailing list