[MOBY-guts] biomoby commit

senger at ebi.ac.uk senger at pub.open-bio.org
Fri Oct 17 10:13:34 EDT 2003


senger
Fri Oct 17 09:13:34 EDT 2003
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory pub.open-bio.org:/tmp/cvs-serv29602/src/Clients

Modified Files:
	TestingCentral.java 
Added Files:
	MobyGraphs.java PopulateLocalCentralForTesting.java 
Log Message:
first draft of graphs

moby-live/Java/src/Clients MobyGraphs.java,NONE,1.1 PopulateLocalCentralForTesting.java,NONE,1.1 TestingCentral.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestingCentral.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/TestingCentral.java	2003/09/24 12:33:50	1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/TestingCentral.java	2003/10/17 13:13:34	1.2
@@ -44,6 +44,7 @@
 	stype.setDescription ("description for " + serviceTypeName);
 	stype.setAuthority ("testing.org");
 	stype.setEmailContact (emailContact);
+	stype.addParentName ("Service");
 	return stype;
     }
 
@@ -116,6 +117,7 @@
  	    String endpoint = CentralImpl.DEFAULT_ENDPOINT;
 	    String uri      = CentralImpl.DEFAULT_NAMESPACE;
             boolean debug = false;
+	    boolean deregister = true;
 
 	    // command-line parameters
 	    int i = 0;
@@ -140,6 +142,18 @@
 		    i += 1;
 		    continue;
 		}
+
+		// this is intentionally undocumented option - because
+		// if you use it you are polluting Moby Central with
+		// fake objects - it's intented to be used for
+		// debugging, and only for your local Moby Central
+		// mirror
+		if (args[i].equals ("-do-not-deregister")) {
+		    deregister = false;
+		    i += 1;
+		    continue;
+		}
+
 		i++;
 	    }
 
@@ -217,12 +231,14 @@
 	    MobyDataType data3 = helper.createDataType (name3);
  	    try {
 		start ("registerDataType - 1");
+		data1.addParentName ("Object");
 		worker.registerDataType (data1);
 		ok();
 	    } catch (MobyException e)      { error (e);
 	    } catch (NoSuccessException e) { error (e); }
  	    try {
 		start ("registerDataType - 3");
+ 		data3.addParentName ("string");
 		worker.registerDataType (data3);
 		ok();
 	    } catch (MobyException e)      { error (e);
@@ -246,7 +262,7 @@
 	    } catch (NoSuccessException e) { error (e); }
 
 	    // register a service
-	    MobyPrimaryDataSimple simpleData = new MobyPrimaryDataSimple ("Simpla_A");
+	    MobyPrimaryDataSimple simpleData = new MobyPrimaryDataSimple ("Simple_A");
 	    simpleData.setDataType (data2);
 	    simpleData.addNamespace (namespace1);
 	    simpleData.addNamespace (namespace2);
@@ -287,6 +303,9 @@
 	    // TBD: find service
 	    // ..
 
+	    if (! deregister)
+		System.exit (0);
+
 	    // deregister everything
  	    try {
 		start ("deregisterService");
@@ -296,14 +315,14 @@
 	    } catch (NoSuccessException e) { error (e); }
 
  	    try {
-		start ("deregisterDataType - 3");
-		worker.unregisterDataType (data3);
+		start ("deregisterDataType - 2");
+		worker.unregisterDataType (data2);
 		ok();
 	    } catch (MobyException e)      { error (e);
 	    } catch (NoSuccessException e) { error (e); }
  	    try {
-		start ("deregisterDataType - 2");
-		worker.unregisterDataType (data2);
+		start ("deregisterDataType - 3");
+		worker.unregisterDataType (data3);
 		ok();
 	    } catch (MobyException e)      { error (e);
 	    } catch (NoSuccessException e) { error (e); }



More information about the MOBY-guts mailing list