Permalink
Browse files

started to implement the client layer system

svn path=/bioperl-corba-client/trunk/; revision=42
  • Loading branch information...
1 parent 57afdba commit 06aebd0f4d4c9822df4ed1a372cfd27b201689fe birney committed Jan 27, 2002
Showing with 31 additions and 17 deletions.
  1. +1 −0 Bio/CorbaClient/Base.pm
  2. +3 −3 Bio/CorbaClient/PrimarySeq.pm
  3. +15 −12 Bio/CorbaClient/Seq.pm
  4. +2 −2 Bio/CorbaClient/SeqDB.pm
  5. +10 −0 idl/biocorba.idl
View
1 Bio/CorbaClient/Base.pm
@@ -78,6 +78,7 @@ sub new {
my ($class,@args) = @_;
my $self = $class->SUPER::new(@args);
+ bless $self,$class;
my ($corbaref) = $self->_rearrange([qw(CORBAREF)],@args);
if( defined $corbaref ) {
$self->corbaref($corbaref);
View
6 Bio/CorbaClient/PrimarySeq.pm
@@ -154,7 +154,7 @@ sub display_id {
if( defined $val ) {
$self->warn("Attempting to set the value of a primary seq when it is a corba object. You will need to make an in-memory copy");
}
- return $self->corbaref->display_id();
+ return $self->corbaref->get_name();
}
=head2 accession_number
@@ -174,7 +174,7 @@ sub accession_number {
$self->warn("Attempting to set the value of a primary seq when it is a corba object. You will need to make an in-memory copy");
}
- return $self->corbaref->accession_number();
+ return $self->corbaref->get_id();
}
sub accession {
@@ -215,7 +215,7 @@ sub primary_id {
$self->warn("Attempting to set the value of a primary seq when it is a corba object. You will need to make an in-memory copy");
}
- return $self->corbaref->primary_id();
+ return $self->corbaref->get_id();
}
sub can_call_new {
View
27 Bio/CorbaClient/Seq.pm
@@ -81,11 +81,20 @@ use Bio::SeqI;
sub top_SeqFeatures {
my ($self ) = @_;
- my $vector = $self->corbaref->all_SeqFeatures(0);
- my $iter = $vector->iterator;
+
+ my $coll = $self->corbaref->get_seq_features();
+ my $iter;
+
+ my @ref = $coll->get_annotations(1000,$iter);
my @features;
- while( $iter->has_more ) {
- push @features, new Bio::CorbaClient::SeqFeature('-corbaref'=>$iter->next());
+
+ foreach my $ref ( @features ) {
+ push @features, new Bio::CorbaClient::SeqFeature('-corbaref' => $ref);
+ }
+
+ my $ref;
+ while( $iter->next($ref) ) {
+ push @features, new Bio::CorbaClient::SeqFeature('-corbaref'=>$ref);
}
return @features;
}
@@ -103,13 +112,7 @@ sub top_SeqFeatures {
sub all_SeqFeatures {
my ($self) = @_;
- my $vector = $self->corbaref->all_SeqFeatures(1);
- my $iter = $vector->iterator;
- my @features;
- while( $iter->has_more ) {
- push @features, new Bio::CorbaClient::SeqFeature('-corbaref'=>$iter->next());
- }
- return @features;
+ return $self->top_SeqFeatures();
}
=head2 primary_seq
@@ -125,7 +128,7 @@ sub all_SeqFeatures {
sub primary_seq {
my ($self) = @_;
return new Bio::CorbaClient::PrimarySeq('-corbaref' =>
- $self->corbaref->get_PrimarySeq());
+ $self);
}
=head2 feature_count
View
4 Bio/CorbaClient/SeqDB.pm
@@ -88,7 +88,7 @@ sub get_Seq_by_id {
my $self = shift;
my $acc = shift;
- my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->get_Seq($acc,0));
+ my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->resolve($acc,0));
return $seq;
}
@@ -110,7 +110,7 @@ sub get_Seq_by_acc {
my $self = shift;
my $acc = shift;
- my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->get_Seq($acc,0));
+ my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->resolve($acc,0));
return $seq;
}
View
10 idl/biocorba.idl
@@ -0,0 +1,10 @@
+#ifndef _DS_BIOCORBA_IDL_
+#define _DS_BIOCORBA_IDL_
+
+#pragma prefix "omg.org"
+#include <bsane.idl>
+#include <seqcore.idl>
+#include <comparison.idl>
+#include <collection.idl>
+
+#endif // _DS_BIOCORBA_IDL_

0 comments on commit 06aebd0

Please sign in to comment.