Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

started to implement the client layer system

svn path=/bioperl-corba-client/trunk/; revision=42
  • Loading branch information...
commit 06aebd0f4d4c9822df4ed1a372cfd27b201689fe 1 parent 57afdba
authored
1  Bio/CorbaClient/Base.pm
@@ -78,6 +78,7 @@ sub new {
78 78
     my ($class,@args) = @_;
79 79
 
80 80
     my $self = $class->SUPER::new(@args);
  81
+    bless $self,$class;
81 82
     my ($corbaref) = $self->_rearrange([qw(CORBAREF)],@args);
82 83
     if( defined $corbaref ) {
83 84
 	$self->corbaref($corbaref);
6  Bio/CorbaClient/PrimarySeq.pm
@@ -154,7 +154,7 @@ sub display_id {
154 154
     if( defined $val ) {
155 155
 	$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");
156 156
     }
157  
-    return $self->corbaref->display_id();
  157
+    return $self->corbaref->get_name();
158 158
 }
159 159
 
160 160
 =head2 accession_number
@@ -174,7 +174,7 @@ sub accession_number {
174 174
 	$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");
175 175
     }
176 176
 
177  
-    return $self->corbaref->accession_number();
  177
+    return $self->corbaref->get_id();
178 178
 }
179 179
 
180 180
 sub accession {
@@ -215,7 +215,7 @@ sub primary_id {
215 215
 	$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");
216 216
     }
217 217
 
218  
-    return $self->corbaref->primary_id();
  218
+    return $self->corbaref->get_id();
219 219
 }
220 220
 
221 221
 sub can_call_new {
27  Bio/CorbaClient/Seq.pm
@@ -81,11 +81,20 @@ use Bio::SeqI;
81 81
 
82 82
 sub top_SeqFeatures {
83 83
     my ($self ) = @_;
84  
-    my $vector = $self->corbaref->all_SeqFeatures(0);
85  
-    my $iter = $vector->iterator;
  84
+   
  85
+    my $coll   = $self->corbaref->get_seq_features();
  86
+    my $iter;
  87
+
  88
+    my @ref = $coll->get_annotations(1000,$iter);
86 89
     my @features;
87  
-    while( $iter->has_more ) {
88  
-	push @features, new Bio::CorbaClient::SeqFeature('-corbaref'=>$iter->next());
  90
+ 
  91
+    foreach my $ref ( @features ) {
  92
+        push @features, new Bio::CorbaClient::SeqFeature('-corbaref' => $ref);
  93
+    }
  94
+
  95
+    my $ref;
  96
+    while( $iter->next($ref) ) {
  97
+	push @features, new Bio::CorbaClient::SeqFeature('-corbaref'=>$ref);
89 98
     }
90 99
     return @features;
91 100
 }
@@ -103,13 +112,7 @@ sub top_SeqFeatures {
103 112
 
104 113
 sub all_SeqFeatures {
105 114
     my ($self) = @_;
106  
-    my $vector = $self->corbaref->all_SeqFeatures(1);
107  
-    my $iter = $vector->iterator;
108  
-    my @features;
109  
-    while( $iter->has_more ) {
110  
-	push @features, new Bio::CorbaClient::SeqFeature('-corbaref'=>$iter->next());
111  
-    }
112  
-    return @features;
  115
+    return $self->top_SeqFeatures();
113 116
 }
114 117
 
115 118
 =head2 primary_seq
@@ -125,7 +128,7 @@ sub all_SeqFeatures {
125 128
 sub primary_seq {
126 129
     my ($self) = @_;
127 130
     return new Bio::CorbaClient::PrimarySeq('-corbaref' => 
128  
-					    $self->corbaref->get_PrimarySeq());
  131
+					    $self);
129 132
 }
130 133
 
131 134
 =head2 feature_count
4  Bio/CorbaClient/SeqDB.pm
@@ -88,7 +88,7 @@ sub get_Seq_by_id {
88 88
     my $self = shift;
89 89
     my $acc  = shift;
90 90
 
91  
-    my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->get_Seq($acc,0));
  91
+    my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->resolve($acc,0));
92 92
     
93 93
     return $seq;
94 94
 }
@@ -110,7 +110,7 @@ sub get_Seq_by_acc {
110 110
     my $self = shift;
111 111
     my $acc  = shift;
112 112
 
113  
-    my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->get_Seq($acc,0));
  113
+    my $seq = Bio::CorbaClient::Seq->new(-corbaref => $self->corbaref->resolve($acc,0));
114 114
     
115 115
     return $seq;
116 116
 }
10  idl/biocorba.idl
... ...
@@ -0,0 +1,10 @@
  1
+#ifndef _DS_BIOCORBA_IDL_
  2
+#define _DS_BIOCORBA_IDL_
  3
+ 
  4
+#pragma prefix "omg.org"
  5
+#include <bsane.idl>
  6
+#include <seqcore.idl>
  7
+#include <comparison.idl>
  8
+#include <collection.idl>
  9
+
  10
+#endif // _DS_BIOCORBA_IDL_       

0 notes on commit 06aebd0

Please sign in to comment.
Something went wrong with that request. Please try again.