[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Sep 30 23:08:36 UTC 2005


mwilkinson
Fri Sep 30 19:08:35 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv8079/MOBY

Modified Files:
	OntologyServer.pm 
Log Message:
OntologyServer was returning NCBI_Acc as the namespace if you passed it a null query. Yuck

moby-live/Perl/MOBY OntologyServer.pm,1.86,1.87
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2005/09/27 14:44:34	1.86
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2005/09/30 23:08:35	1.87
@@ -191,6 +191,7 @@
 	$term =~ s/^moby://;    # if the term is namespaced, then remove that
 	my $sth;
 	return ( 0, "WRONG ONTOLOGY!", '' ) unless ( $self->ontology eq 'object' );
+	return (0, undef, undef) unless defined $term;
 
 	my $result;
 	
@@ -653,6 +654,8 @@
 	{
 		return ( 1, "external ontology", $term );
 	}
+	return (0, undef, undef) unless defined $term;
+
 	my $result;
 	$result = $adaptor->query_service(type => $term);
 	my $row = shift(@$result);
@@ -783,6 +786,7 @@
 	return ( 0, "WRONG ONTOLOGY!", '' )
 	  unless ( $self->ontology eq 'namespace' );
 	my $term = $args{term};
+	return (0, undef, undef) unless defined $term;
 	$term =~ s/^moby://;    # if the term is namespaced, then remove that
 	if ( $term =~ /^urn:lsid/
 		 && !( $term =~ /^urn:lsid:biomoby.org:namespacetype/ ) )




More information about the MOBY-guts mailing list