[MOBY-guts] biomoby commit

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


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

Modified Files:
	Central.pm 
Log Message:
fixed problem with HASA not getting articleName
moby-live/Perl/MOBY Central.pm,1.43,1.44
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/05/08 19:58:13	1.43
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/05/08 20:11:32	1.44
@@ -293,14 +293,14 @@
 		#  ['term2', [articleName, value2]])
 		my at HASAS= @{$HASA};
 		foreach my $hasa(@HASAS){
-			my ($keyvalue, $values) = @{$hasa};
-			while (my ($has_term,$articleName) = each %{$values}){
+			my ($has_term, $values) = @{$hasa};
+			while (my ($attribute,$articleNameValue) = each %{$values}){ # attribute is "articleName"
 				my ($success, $message) = $OntologyServer->addObjectHASA(
-					node => $keyvalue,
+					node => $term,
 					HASA => $has_term,
 					authority => $auth,
 					contact_email => $email,
-					articleName => $articleName);
+					articleName => $articleNameValue);
 				$success==0 && push @hasafailures, "\n$has_term - $message\n";
 			}
 		}
@@ -3136,7 +3136,7 @@
 	# ['second',{'articleName' => 'otherone'},...
 	
     my ($DOM, $node, at attrs) = @_;
-	$debug && &_LOG("_nodeArrayContext received DOM:  ", $DOM->toString,"\nsearching for node $node\n");
+	$debug && &_LOG("_nodeArrayExtraContext received DOM:  ", $DOM->toString,"\nsearching for node $node\n");
 	my @result;
 	my %att_value;
     my $x = $DOM->getElementsByTagName($node);
@@ -3144,7 +3144,7 @@
     foreach (@child){
         next unless $_->getNodeType == ELEMENT_NODE;
 		foreach my $attr(@attrs){
-			$debug && &_LOG("_nodeArrayContext received DOM:  ", $DOM->toString,"\nsearching for attributre $attr\n");
+			$debug && &_LOG("_nodeArrayExtraContext 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;




More information about the MOBY-guts mailing list