[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jul 29 17:25:35 UTC 2005


mwilkinson
Fri Jul 29 13:25:35 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi
In directory pub.open-bio.org:/tmp/cvs-serv10708/MOBY/Adaptor/moby/queryapi

Modified Files:
	mysql.pm 
Log Message:
sql adaptor was only able to create relatinships for object ontology.  Now can retrieve relationships for both object and service

moby-live/Perl/MOBY/Adaptor/moby/queryapi mysql.pm,1.66,1.67
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/07/29 16:46:21	1.66
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi/mysql.pm	2005/07/29 17:25:35	1.67
@@ -1319,9 +1319,16 @@
 
 	my $type = $args{'term'};
 	return 0 unless $type;
-	my $result = $self->query_object(type => $type);
-	my $row = shift @$result;
-	my $lsid = $row->{object_lsid};
+	my $lsid;
+	if ($ontology eq "service"){
+	    my $result = $self->query_service(type => $type);
+	    my $row = shift @$result;
+	    $lsid = $row->{service_lsid};
+	} else {
+	    my $result = $self->query_object(type => $type);
+	    my $row = shift @$result;
+	    $lsid = $row->{object_lsid};
+	}
 	my $defs;
 	
 	if ( $direction eq 'root' ) {




More information about the MOBY-guts mailing list