[MOBY-guts] biomoby commit

Martin Senger senger at pub.open-bio.org
Sun Aug 7 06:30:49 UTC 2005


senger
Sun Aug  7 02:30:49 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory pub.open-bio.org:/tmp/cvs-serv17290

Modified Files:
	MobyCmdLineClient.java 
Log Message:


moby-live/Java/src/Clients MobyCmdLineClient.java,1.9,1.10
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java	2005/07/19 12:39:58	1.9
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java	2005/08/07 06:30:49	1.10
@@ -90,6 +90,16 @@
 	    }
 
 	    //
+	    // no other arguments => say what endpoint and URI are in used
+	    //
+	    if (cmd.params.length == 0) {
+		decoration ("Registry endpoint:  ");
+		System.out.println (worker.getRegistryEndpoint());
+		decoration ("Registry namespace: ");
+		System.out.println (worker.getRegistryNamespace());
+	    }
+
+	    //
 	    // simple retrieval of various sets
 	    //
 	    if (cmd.hasOption ("-ls")) {
@@ -167,6 +177,16 @@
 		}
 	    }
 
+	    if (cmd.hasOption ("-lu")) {
+		decorationLn ("Resource URLs:");
+		decorationLn ("--------------");
+		MobyResourceRef[] resourceRefs = worker.getResourceRefs();
+		for (int i = 0; i < resourceRefs.length; i++) {
+		    System.out.println (resourceRefs[i].getResourceName());
+		    System.out.println ("\t" + resourceRefs[i].getResourceLocation());
+		}
+	    }
+
 	    //
 	    // retrieval of more complex entities
 	    //
@@ -218,6 +238,25 @@
 						      "\n"));
 	    }
 
+	    if ((param = cmd.getParam ("-rdf")) != null ) {
+		String resourceName = null;
+		if      (param.startsWith ("st")) resourceName = Central.SERVICE_TYPES_RESOURCE_NAME;
+		else if (param.startsWith ("dt")) resourceName = Central.DATA_TYPES_RESOURCE_NAME;
+		else if (param.startsWith ("se")) resourceName = Central.SERVICE_INSTANCES_RESOURCE_NAME;
+		else if (param.startsWith ("na")) resourceName = Central.NAMESPACES_RESOURCE_NAME;
+		else if (param.startsWith ("f"))  resourceName = Central.FULL_RESOURCE_NAME;
+		if (resourceName != null) {
+		    decorationLn ("RDF for '" + resourceName + "':");
+		    decorationLn ("-------");
+		    BufferedReader in =
+			new BufferedReader (new InputStreamReader (worker.getResource (resourceName)));
+		    String inputLine;
+		    while ((inputLine = in.readLine()) != null)
+			System.out.println (inputLine);
+		    in.close();
+		}
+	    }
+
 	    //
 	    // registrations of various entities
 	    //




More information about the MOBY-guts mailing list