[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Thu May 8 19:32:59 UTC 2003


mwilkinson
Thu May  8 15:32:59 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv3380/Perl/MOBY

Modified Files:
	Central.pm 
Log Message:
fixed problem with HASA not getting articleName
moby-live/Perl/MOBY Central.pm,1.37,1.38
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/05/08 19:07:57	1.37
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/05/08 19:32:59	1.38
@@ -237,7 +237,7 @@
 	my $OntologyServer = &_getOntologyServer(ontology => 'object');
 	$debug && &_LOG("\n\npayload\n**********************\n$payload\n***********************\n\n");
 	my ($term, $desc, $ISA, $HASA, $email, $auth, $clobber) = &_registerObjectPayload($payload);
-	$debug && &_LOG("\n\nterm $term\ndesc $desc\nisa $ISA\n hasa %HASA\nemail $email\nauth $auth\nclobber $clobber\n\n");
+	$debug && &_LOG("\n\nterm $term\ndesc $desc\nisa $ISA\n hasa $HASA\nemail $email\nauth $auth\nclobber $clobber\n\n");
 	unless (defined $term && defined $desc && defined $auth && defined $email){
 		return &_error("Malformed XML; may be missing required parameters objectType, Description, authURI or contactEmail","");
 	}
@@ -3142,9 +3142,11 @@
     my @child = $x->item(0)->getChildNodes;
     foreach (@child){
         next unless $_->getNodeType == ELEMENT_NODE;
-		my $attnodes = $_->getAttributes;
 		foreach my $attr(@attrs){
-			$att_value{$attr}= $attnodes->getNamedItem($attr)?$attnodes->getNamedItem($attr)->getValue:undef;
+			$debug && &_LOG("_nodeArrayContext received DOM:  ", $DOM->toString,"\nsearching for attributre $attr\n");
+			my $article = $_->getAttributeNode($attr);  # may or may not have a name
+			if ($article){$article = $article->getValue()}
+			$att_value{$attr} = $article;
 		}
         my @child2 = $_->getChildNodes;
         foreach (@child2){
@@ -3153,6 +3155,7 @@
             push @result, [$_->toString,\%att_value];
         }
     }
+	$debug && &_LOG(@result);
     return @result;
 }
 




More information about the MOBY-guts mailing list