[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Mon Jul 14 22:56:57 UTC 2003


mwilkinson
Mon Jul 14 18:56:57 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv2363/Perl/MOBY

Modified Files:
	Central.pm 
Log Message:
error in catching erroneous service registrations when collection object was in invalid namespace

moby-live/Perl/MOBY Central.pm,1.98,1.99
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/07/11 22:22:35	1.98
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/07/14 22:56:56	1.99
@@ -1090,7 +1090,7 @@
 
     # this is a Simple or a Complex object
     my $simp_coll = $node->getTagName;
-	$debug && &_LOG("TAGNAME in _registerArticle is $simp_coll");
+	$debug && &_LOG("TAGNAME in $inout _registerArticle is $simp_coll");
 	
     my $article = $node->getAttributeNode("articleName");  # may or may not have a name
 	if ($article){$article = $article->getValue()}
@@ -1105,7 +1105,8 @@
 		my $Simples = $node->getElementsByTagName('Simple');
 		my $length = $Simples->getLength;
 		for (my $x=0; $x<$length; ++$x){
-			&_registerArticles($SVC, $inout, $Simples->item($x),$collection_id);
+			my ($success, $message) = &_registerArticles($SVC, $inout, $Simples->item($x),$collection_id);
+			unless ($success == 1){return (-1, $message);}
 		}
     } elsif ($simp_coll eq "Simple")  {
 		my $article = $node->getAttributeNode("articleName");
@@ -2254,9 +2255,9 @@
 =head2 DUMP
 
  Title     :	DUMP
- Usage     :	%valid = $MOBY->DUMP()
- Function  :	return a mysql dump of the current MOBY Central database
- Returns   :	text
+ Usage     :	($central,$object,$service,$namespace,$relat) = $MOBY->DUMP()
+ Function  :	return a mysql dump of each of the current MOBY Central databases
+ Returns   :	an array of SQL strings that can be used to recreate the database locally
  Args      :	none
 
 =cut
@@ -2269,10 +2270,35 @@
 	while (<IN>){
 		push @response, $_;
 	}
-	$debug && &_LOG("dump @response\n\n");
-	
-	return (join "", @response);
-	
+	my $mobycentral = (join "", @response);
+
+	open (IN, "/usr/local/bin/mysqldump -u mobyobject mobycentral |");
+	@response = ();
+	while (<IN>){
+		push @response, $_;
+	}
+	my $mobyobject = (join "", @response);
+
+	open (IN, "/usr/local/bin/mysqldump -u mobynamespace mobycentral |");
+	@response = ();
+	while (<IN>){
+		push @response, $_;
+	}
+	my $mobynamespace = (join "", @response);
+	open (IN, "/usr/local/bin/mysqldump -u mobyservice mobycentral |");
+	@response = ();
+	while (<IN>){
+		push @response, $_;
+	}
+	my $mobyservice = (join "", @response);
+	open (IN, "/usr/local/bin/mysqldump -u mobyrelationship mobycentral |");
+	@response = ();
+	while (<IN>){
+		push @response, $_;
+	}
+	my $mobyrelationship = (join "", @response);
+
+	return ($mobycentral, $mobyobject, $mobyservice, $mobynamespace, $mobyrelationship);
 }
 
 




More information about the MOBY-guts mailing list