[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at dev.open-bio.org
Mon Oct 22 20:52:56 UTC 2007


mwilkinson
Mon Oct 22 16:52:56 EDT 2007
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv17920/MOBY

Modified Files:
	Central.pm 
Log Message:
fixing Relationships code
moby-live/Perl/MOBY Central.pm,1.291,1.292
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.291
retrieving revision 1.292
diff -u -r1.291 -r1.292
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2007/09/24 18:53:32	1.291
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2007/10/22 20:52:56	1.292
@@ -3102,10 +3102,17 @@
 		foreach my $lsid_article ( @lsids_articles ) {
 			my $lsid = $lsid_article->{lsid};
 			my $term = $lsid_article->{term};
-			my $articleName = $lsid_article->{articleName};
-			$response .= "<${ontology}Type lsid='$lsid' ";
-			$response .= "articleName='$articleName'" if $articleName;  # wont be there for Service type ontology
-			$response .= ">$term</${ontology}Type>\n";
+			if ($this_rel =~ /isa/i){
+				$response .= "<${ontology}Type lsid='$lsid' ";
+				$response .= ">$term</${ontology}Type>\n";
+			} else {
+				my @articleNames = keys %{$lsid_article->{'articleName'}};
+				foreach my $articleName(@articleNames){
+					$response .= "<${ontology}Type lsid='$lsid' ";
+					$response .= "articleName='$articleName'" if $articleName;  # wont be there for Service type ontology
+					$response .= ">$term</${ontology}Type>\n";
+				}
+			}
 		}
 		$response .= "</Relationship>\n";
 	}




More information about the MOBY-guts mailing list