[MOBY-guts] biomoby commit

senger@ebi.ac.uk senger at pub.open-bio.org
Mon Nov 24 18:45:25 UTC 2003


senger
Mon Nov 24 13:45:25 EST 2003
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory pub.open-bio.org:/tmp/cvs-serv16028/src/Clients

Modified Files:
	MobyCmdLineClient.java 
Log Message:
added relationships methods to Central.java

moby-live/Java/src/Clients MobyCmdLineClient.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java	2003/09/24 12:33:50	1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java	2003/11/24 18:45:25	1.2
@@ -172,6 +172,35 @@
 							       param.substring (pos+1)));
 	    }
 
+	    if ((param = cmd.getParam ("-ot")) != null ) {
+		decorationLn ("Service type '" + param + "' is-a:");
+		decorationLn ("------------");
+		System.out.println (StringUtils.join (worker.getServiceTypeRelationships (param),
+						      "\n"));
+	    }
+
+	    if ((param = cmd.getParam ("-od")) != null ) {
+		decorationLn ("Relationships of data type '" + param + "':");
+		decorationLn ("--------------------------");
+		Map types = worker.getDataTypeRelationships (param);
+
+		for (Iterator it = types.entrySet().iterator(); it.hasNext(); ) {
+		    Map.Entry entry = (Map.Entry)it.next();
+		    System.out.println (entry.getKey());
+		    System.out.println ("\t" +
+					StringUtils.join ((String[])entry.getValue(),
+							  "\n\t"));
+		}
+	    }
+
+	    String[] params = cmd.getParam ("-od2", 2);
+	    if ((params != null && params[0] != null && params[1] != null)) {
+		decorationLn ("Relationships of data type '" + params[0] + "' of type '" + params[1] + "':");
+		decorationLn ("--------------------------");
+		System.out.println (StringUtils.join (worker.getDataTypeRelationships (params[0], params[1]),
+						      "\n"));
+	    }
+
 	    //
 	    // registrations of various entities
 	    //
@@ -468,7 +497,7 @@
 	    //
 	    // call a raw method (for debugging)
 	    //
-	    String[] params = null;
+	    params = null;
 	    if ((params = cmd.getParam ("-call", 2)) != null ) {
 		if (params[0] != null) {
 		    if (params[1] == null) {




More information about the MOBY-guts mailing list