[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jul 22 17:12:13 UTC 2005


mwilkinson
Fri Jul 22 13:12:13 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv390/MOBY

Modified Files:
	Central.pm 
Log Message:
the logic for findig existing services was still wonky.  This simplifies it and should fix it.  Also fixed the documentation for the MOBY::Client::ServiceInstance object as per this mornings email

moby-live/Perl/MOBY Central.pm,1.165,1.166
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/07/21 17:08:43	1.165
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/07/22 17:12:13	1.166
@@ -1888,7 +1888,7 @@
 		$debug
 		  && _LOG(
 			"authoritative added; criterion count is now $criterion_count\n");
-		my $ids = _extract_ids($adaptor->query_service_instance({authoritative => $findme{authoritative}}));
+		my $ids = _extract_ids($adaptor->query_service_instance(authoritative => $findme{authoritative}));
 		
 		
 		
@@ -1943,16 +1943,7 @@
 		++$criterion_count;
 		$debug
 		  && _LOG("authURI added; criterion count is now $criterion_count\n");
-		 
-		my $result = $adaptor->query_authority({authority_uri => $findme{authURI}}, 'or', {authority_common_name => $findme{authURI}}); 
-		my $row = shift(@$result);
-		my $id = $row->{authority_id};
-  
-		unless ($id) {
-			return &_serviceListResponse( $dbh, undef );
-		}
-
-		my $ids = _extract_ids($adaptor->query_service_instance({authority_id => $id}));
+		my $ids = _extract_ids($adaptor->query_service_instance(authority_uri => $findme{'authURI'}));
 
 		unless ( scalar @{$ids} ) {
 			return &_serviceListResponse( $dbh, undef );
@@ -1971,7 +1962,7 @@
 		  && _LOG(
 			"servicename added; criterion count is now $criterion_count\n");
 
-		my $ids = _extract_ids($adaptor->query_service_instance({servicename => $findme{servicename}}));
+		my $ids = _extract_ids($adaptor->query_service_instance(servicename => $findme{servicename}));
 
 		unless ( scalar @{$ids} ) {
 			return &_serviceListResponse( $dbh, undef );
@@ -1990,7 +1981,7 @@
 		$debug
 		  && _LOG("category added; criterion count is now $criterion_count\n");
 
-		my $ids = _extract_ids($adaptor->query_service_instance({category => lc( $findme{category}) }));
+		my $ids = _extract_ids($adaptor->query_service_instance(category => lc( $findme{category}) ));
 	
 		unless ( scalar @{$ids} ) {
 			return &_serviceListResponse( $dbh, undef );
@@ -3387,7 +3378,7 @@
 	my $OSserv = MOBY::OntologyServer->new( ontology => 'service' );
 
 	foreach (@ids) {
-		my $result = $adaptor->query_service_instance({service_instance_id => $_});
+		my $result = $adaptor->query_service_instance(service_instance_id => $_);
 		my $row = shift(@$result);
 		my $category = $row->{category};
 		my $url = $row->{url};




More information about the MOBY-guts mailing list