[MOBY-guts] biomoby commit

Martin Senger senger at dev.open-bio.org
Tue May 29 03:51:46 UTC 2007


senger
Mon May 28 23:51:46 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory dev.open-bio.org:/tmp/cvs-serv29045/src/Clients

Modified Files:
	CreateMobyInput.java MobyCmdLineClient.java 
Log Message:

moby-live/Java/src/Clients CreateMobyInput.java,1.8,1.9 MobyCmdLineClient.java,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java	2006/02/12 18:47:38	1.8
+++ /home/repository/moby/moby-live/Java/src/Clients/CreateMobyInput.java	2007/05/29 03:51:46	1.9
@@ -206,8 +206,9 @@
 	    if (service != null) {
 		MobyService mobyService = null;
 		if (cachedir == null) {
-		    MobyService[] services =
-			worker.findService (new MobyService (service));
+		    MobyService pattern = new MobyService (service);
+		    pattern.setCategory ("");
+		    MobyService[] services = worker.findService (pattern);
 		    if (services.length > 0)
 			mobyService = services[0];
 		} else {

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java	2005/10/27 04:15:23	1.13
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java	2007/05/29 03:51:46	1.14
@@ -519,13 +519,19 @@
 		decorationLn ("--------------------");
 		int pos = param.indexOf (",");
 		MobyService[] services;
-		if (pos == -1)
-		    services = worker.findService (new MobyService (param));
-		else if (pos == param.length() - 1)
-		    services = worker.findService (new MobyService (param.substring (0, pos)));
-		else {
-		    MobyService pattern = new MobyService (param.substring (0, pos));
+		MobyService pattern = null;
+		if (pos == -1) {
+		    pattern = new MobyService (param);
+		    pattern.setCategory ("");
+		    services = worker.findService (pattern);
+		} else if (pos == param.length() - 1) {
+		    pattern = new MobyService (param.substring (0, pos));
+		    pattern.setCategory ("");
+		    services = worker.findService (pattern);
+		} else {
+		    pattern = new MobyService (param.substring (0, pos));
 		    pattern.setAuthority (param.substring (pos+1));
+		    pattern.setCategory ("");
 		    services = worker.findService (pattern);
 		}
 		printServices (services, cmd.hasOption ("-on"));
@@ -541,15 +547,26 @@
 		decorationLn ("Looking for services of type '" + param + "':");
 		decorationLn ("----------------------------");
 		MobyService pattern = new MobyService ("dummy");
+		pattern.setCategory ("");
 		pattern.setType (param);
 		printServices (worker.findService (pattern, null, !cmd.hasOption ("-nc"), true),
 			       cmd.hasOption ("-on"));
 	    }
 
+	    if ((param = cmd.getParam ("-fc")) != null ) {
+		decorationLn ("Looking for services of category '" + param + "':");
+		decorationLn ("--------------------------------");
+		MobyService pattern = new MobyService ("dummy");
+		pattern.setCategory (param);
+		printServices (worker.findService (pattern, null, !cmd.hasOption ("-nc"), true),
+			       cmd.hasOption ("-on"));
+	    }
+
 	    if (cmd.hasParam ("-fs-type") || cmd.hasParam ("-fs-auth") ||
 		cmd.hasParam ("-fs-in")   || cmd.hasParam ("-fs-out")) {
 		decorationLn ("Looking for services with the following pattern:");
 		MobyService pattern = new MobyService ("dummy");
+		pattern.setCategory ("");
 		pattern.setType (cmd.getParam ("-fs-type"));
 		pattern.setAuthority (cmd.getParam ("-fs-auth"));
                 if ((param = cmd.getParam ("-fs-in")) != null ) {
@@ -613,16 +630,23 @@
 		    String serviceName = null;
 		    int pos = params[0].indexOf (",");
 		    MobyService[] services;
+		    MobyService pattern = null;
 		    if (pos == -1) {
 			serviceName = params[0];
-			services = worker.findService (new MobyService (params[0]));
+			pattern = new MobyService (serviceName);
+			pattern.setCategory ("");
+			services = worker.findService (pattern);
+
 		    } else if (pos == params[0].length() - 1) {
 			serviceName = params[0].substring (0, pos);
-			services = worker.findService (new MobyService (serviceName));
+			pattern = new MobyService (serviceName);
+			pattern.setCategory ("");
+			services = worker.findService (pattern);
 		    } else {
 			serviceName = params[0].substring (0, pos);
-			MobyService pattern = new MobyService (serviceName);
+			pattern = new MobyService (serviceName);
 			pattern.setAuthority (params[0].substring (pos+1));
+			pattern.setCategory ("");
 			services = worker.findService (pattern);
 		    }
 		    if (services != null && services.length > 0) {
@@ -693,7 +717,7 @@
 	if (services != null) {
 	    for (int i = 0; i < services.length; i++) {
 		if (onlyNames)
-		    System.out.println (services[i].getName());
+		    System.out.println (services[i].getUniqueName());
 		else
 		    System.out.println (services[i]);
 	    }




More information about the MOBY-guts mailing list