[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at dev.open-bio.org
Tue Jan 30 00:16:25 UTC 2007


mwilkinson
Mon Jan 29 19:16:25 EST 2007
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv32513/MOBY

Modified Files:
	Central.pm 
Log Message:
adding behaviour to return all services if no criterion are passed to findService
moby-live/Perl/MOBY Central.pm,1.271,1.272
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.271
retrieving revision 1.272
diff -u -r1.271 -r1.272
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2007/01/26 23:46:26	1.271
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2007/01/30 00:16:25	1.272
@@ -2193,6 +2193,17 @@
 			++$valid_service_ids{$_};
 		}
 	}
+	
+	unless ($criterion_count){  # in case all criterion are null, find everything
+		my $ids = _extract_ids($adaptor->query_service_instance(category => "%" ));
+		unless ( scalar @{$ids} ) {
+			return &_serviceListResponse( undef );
+		}
+		foreach ( @{$ids} ) {
+			$debug && &_LOG("found service_instance_id $_\n");
+			++$valid_service_ids{$_};    # increment that particular id's count by one
+		}		
+	}
 	my @final;
 	while ( my ( $id, $freq ) = each %valid_service_ids ) {
 		$debug




More information about the MOBY-guts mailing list