[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jun 20 20:25:07 UTC 2003


mwilkinson
Fri Jun 20 16:25:06 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv18609/Perl/MOBY

Modified Files:
	Central.pm 
Log Message:
return empty registerObjectClass tag if invalid or missing term is sent to retrieveObjectDefinition call

moby-live/Perl/MOBY Central.pm,1.79,1.80
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/06/19 00:47:35	1.79
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/06/20 20:25:06	1.80
@@ -2164,8 +2164,10 @@
 	my $Parser = new XML::DOM::Parser;
 	my $doc = $Parser->parse($payload);
 	my $term =  &_nodeTextContent($doc, "objectType");
-	return undef unless $term;
+	return "<registerObjectClass/>" unless $term;
 	my $OS = MOBY::OntologyServer->new(ontology => 'object');
+	my $def = $OS->retrieveObject(node => $term);  # will return undef if this term does not exist, and does not look like an LSID
+	return "<registerObjectClass/>" unless $def;
 	my %def = %{$OS->retrieveObject(node => $term)};
 	my $response;
 	$response = "<registerObjectClass>




More information about the MOBY-guts mailing list