[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Thu May 8 21:44:42 UTC 2003


mwilkinson
Thu May  8 17:44:42 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv4588/Perl/MOBY

Modified Files:
	Central.pm 
Log Message:
should be able to discover by servicename
moby-live/Perl/MOBY Central.pm,1.45,1.46
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/05/08 21:21:36	1.45
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/05/08 21:44:42	1.46
@@ -1593,6 +1593,7 @@
  <authoritative>1</authoritative>
  <Category>moby</Category>
  <serviceType>ServiceTypeTerm</serviceType>
+ <serviceName>ServiceName</serviceName>
  <authURI>http://desired.service.provider</authURI>;
  <expandObjects>1|0</expandObjects> 
  <expandServices>1|0</expandServices>
@@ -1609,6 +1610,7 @@
 	$debug && &_LOG("\nLOOKING FOR SERVICES\n");
 	#return ('serviceType' => $serviceType,
 	#		'authURI' => $AuthURI,
+	#		'servicename' => $AuthURI,
 	#		'expandObjects' => $expandObjects,
 	#		'expandServices' => $expandServices,
 	#		'authoritative' => $authoritative,
@@ -1659,6 +1661,16 @@
 			++$valid_service_ids{$_->[0]}; # increment that particular id's count by one
 		}
 	}
+	if ($findme{servicename}){
+		++$criterion_count;
+		my $ids = $dbh->selectall_arrayref(q{select service_instance_id from service_instance where servicename=?}, undef, lc($findme{servicename}));
+		unless (scalar @{$ids}){
+			return &_serviceListResponse($dbh,undef);
+		}		
+		foreach (@{$ids}){
+			++$valid_service_ids{$_->[0]}; # increment that particular id's count by one
+		}
+	}
 	$findme{category} = 'moby' unless $findme{category};
 	if ($findme{category}){
 		++$criterion_count;
@@ -1832,6 +1844,7 @@
 	return undef unless ($obj eq 'findService');
 	
 	my $serviceType = &_nodeTextContent($Object, "serviceType");
+	my $servicename = &_nodeTextContent($Object, "serviceName");
 	my $authoritative = &_nodeTextContent($Object, "authoritative");
 	my $Category = &_nodeTextContent($Object, "Category");
 	my $AuthURI = &_nodeTextContent($Object, "authURI");
@@ -1843,6 +1856,7 @@
 
 	return ('serviceType' => $serviceType,
 			'authURI' => $AuthURI,
+			'servicename' => $servicename,
 			'expandObjects' => $expandObjects,
 			'expandServices' => $expandServices,
 			'authoritative' => $authoritative,




More information about the MOBY-guts mailing list