[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Sun Sep 4 13:45:37 UTC 2005
senger
Sun Sep 4 09:45:37 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/Clients
In directory pub.open-bio.org:/tmp/cvs-serv27838/src/Clients
Modified Files:
CacheRegistryClient.java MobyCmdLineClient.java
MobyDigestClient.java MobyGraphs.java MosesGenerators.java
TestArgs.java TestingMobyParser.java
UnregisterByAuthority.java
Log Message:
moby-live/Java/src/Clients CacheRegistryClient.java,1.1,1.2 MobyCmdLineClient.java,1.10,1.11 MobyDigestClient.java,1.1,1.2 MobyGraphs.java,1.8,1.9 MosesGenerators.java,1.1,1.2 TestArgs.java,1.1,1.2 TestingMobyParser.java,1.1,1.2 UnregisterByAuthority.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2004/11/14 16:12:50 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/CacheRegistryClient.java 2005/09/04 13:45:37 1.2
@@ -8,8 +8,9 @@
import org.biomoby.shared.*;
import org.biomoby.client.*;
-import embl.ebi.tools.*;
-import embl.ebi.utils.*;
+import org.tulsoft.tools.BaseCmdLine;
+import org.tulsoft.shared.FileUtils;
+import org.tulsoft.shared.GException;
import java.net.*;
import java.util.*;
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java 2005/08/07 06:30:49 1.10
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyCmdLineClient.java 2005/09/04 13:45:37 1.11
@@ -8,8 +8,10 @@
import org.biomoby.shared.*;
import org.biomoby.client.*;
-import embl.ebi.tools.*;
-import embl.ebi.utils.*;
+import org.tulsoft.tools.BaseCmdLine;
+import org.tulsoft.shared.FileUtils;
+import org.tulsoft.shared.StringUtils;
+import org.tulsoft.shared.GException;
import java.net.*;
import java.util.*;
@@ -268,12 +270,12 @@
data.setAuthority (cmd.getParam ("-rd-auth"));
data.setEmailContact (cmd.getParam ("-rd-email"));
if ((param = cmd.getParam ("-rd-isa")) != null ) {
- String[] isas = StringUtils.split (param, ",");
+ String[] isas = param.split (",");
for (int i = 0; i < isas.length; i++)
data.addParentName (isas [i]);
}
if ((param = cmd.getParam ("-rd-hasa")) != null ) {
- String[] hasas = StringUtils.split (param, ",");
+ String[] hasas = param.split (",");
for (int i = 0; i < hasas.length; i++) {
int pos = hasas[i].indexOf (":");
if (pos == -1) {
@@ -286,7 +288,7 @@
}
}
if ((param = cmd.getParam ("-rd-has")) != null ) {
- String[] hasas = StringUtils.split (param, ",");
+ String[] hasas = param.split (",");
for (int i = 0; i < hasas.length; i++) {
int pos = hasas[i].indexOf (":");
if (pos == -1) {
@@ -310,7 +312,7 @@
stype.setAuthority (cmd.getParam ("-rt-auth"));
stype.setEmailContact (cmd.getParam ("-rt-email"));
if ((param = cmd.getParam ("-rt-isa")) != null ) {
- String[] isas = StringUtils.split (param, ",");
+ String[] isas = param.split (",");
for (int i = 0; i < isas.length; i++)
stype.addParentName (isas [i]);
}
@@ -351,9 +353,9 @@
}
if ( (param = cmd.getParam ("-rs-in")) != null ) {
- String[] inputs = StringUtils.split (param, ",");
+ String[] inputs = param.split (",");
for (int i = 0; i < inputs.length; i++) {
- String[] parts = StringUtils.split (inputs[i], "=");
+ String[] parts = inputs[i].split ("=");
if (parts.length >= 2) {
MobyPrimaryDataSimple data = new MobyPrimaryDataSimple ("dummy");
data.setDataType (new MobyDataType (parts[0]));
@@ -367,7 +369,7 @@
}
}
if ((param = cmd.getParam ("-rs-ifile")) != null ) {
- String[] files = StringUtils.split (param, ",");
+ String[] files = param.split (",");
for (int i = 0; i < files.length; i++) {
Properties props = new Properties();
try {
@@ -421,9 +423,9 @@
}
}
if ((param = cmd.getParam ("-rs-out")) != null ) {
- String[] outs = StringUtils.split (param, ",");
+ String[] outs = param.split (",");
for (int i = 0; i < outs.length; i++) {
- String[] parts = StringUtils.split (outs[i], "=");
+ String[] parts = outs[i].split ("=");
if (parts.length >= 2) {
MobyPrimaryDataSimple data = new MobyPrimaryDataSimple ("dummy");
data.setDataType (new MobyDataType (parts[0]));
@@ -437,7 +439,7 @@
}
}
if ((param = cmd.getParam ("-rs-ofile")) != null ) {
- String[] files = StringUtils.split (param, ",");
+ String[] files = param.split (",");
for (int i = 0; i < files.length; i++) {
Properties props = new Properties();
try {
@@ -535,7 +537,7 @@
if ((param = cmd.getParam ("-f")) != null ) {
decorationLn ("Looking for services related to: '" + param + "':");
decorationLn ("--------------------------------");
- printServices (worker.findService (StringUtils.split (param, ",")),
+ printServices (worker.findService (param.split (",")),
cmd.hasOption ("-on"));
}
@@ -555,9 +557,9 @@
pattern.setType (cmd.getParam ("-fs-type"));
pattern.setAuthority (cmd.getParam ("-fs-auth"));
if ((param = cmd.getParam ("-fs-in")) != null ) {
- String[] inputs = StringUtils.split (param, ",");
+ String[] inputs = param.split (",");
for (int i = 0; i < inputs.length; i++) {
- String[] parts = StringUtils.split (inputs[i], "=");
+ String[] parts = inputs[i].split ("=");
MobyPrimaryDataSimple input = new MobyPrimaryDataSimple ("dummy");
input.setDataType (new MobyDataType (parts[0]));
if (parts.length >= 2)
@@ -566,7 +568,7 @@
}
}
if ((param = cmd.getParam ("-fs-out")) != null ) {
- String[] outs = StringUtils.split (param, ",");
+ String[] outs = param.split (",");
for (int i = 0; i < outs.length; i++) {
MobyPrimaryDataSimple output = new MobyPrimaryDataSimple ("dummy");
output.setDataType (new MobyDataType (outs[i]));
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyDigestClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/MobyDigestClient.java 2004/11/14 16:43:49 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyDigestClient.java 2005/09/04 13:45:37 1.2
@@ -7,8 +7,9 @@
import org.biomoby.shared.*;
import org.biomoby.client.*;
-import embl.ebi.tools.*;
-import embl.ebi.utils.*;
+import org.tulsoft.tools.BaseCmdLine;
+import org.tulsoft.shared.FileUtils;
+import org.tulsoft.shared.GException;
/**
* A simple client retrieving and printing cummulative (digestive)
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MobyGraphs.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/Clients/MobyGraphs.java 2005/07/19 12:39:58 1.8
+++ /home/repository/moby/moby-live/Java/src/Clients/MobyGraphs.java 2005/09/04 13:45:37 1.9
@@ -8,8 +8,11 @@
import org.biomoby.shared.*;
import org.biomoby.client.*;
-import embl.ebi.tools.*;
-import embl.ebi.utils.*;
+import org.tulsoft.tools.BaseCmdLine;
+import org.tulsoft.tools.Printf;
+import org.tulsoft.shared.UUtils;
+import org.tulsoft.shared.FileUtils;
+import org.tulsoft.shared.GException;
import java.net.*;
import java.util.*;
@@ -146,7 +149,7 @@
while ((line = data.readLine()) != null) {
if (line.trim().equals ("")) continue;
if (line.trim().startsWith ("#")) continue;
- String[] fields = StringUtils.split (line);
+ String[] fields = line.split ("\\s+");
if (fields.length > 1) {
if (fields[0].equalsIgnoreCase ("start")) {
DataServiceEdge dse = new DataServiceEdge (new MobyDataType ("start"),
@@ -181,9 +184,9 @@
String[] serviceNames = null;
int depth = 1;
if ((param = cmd.getParam ("-auth")) != null )
- authorities = StringUtils.split (param, ",");
+ authorities = param.split (",");
if ((param = cmd.getParam ("-name")) != null )
- serviceNames = StringUtils.split (param, ",");
+ serviceNames = param.split (",");
param = cmd.getParam ("-depth");
if (param != null) {
try {
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/MosesGenerators.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/MosesGenerators.java 2005/08/26 06:27:03 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/MosesGenerators.java 2005/09/04 13:45:37 1.2
@@ -12,7 +12,7 @@
import org.biomoby.shared.MobyException;
import org.biomoby.shared.Utils;
-import embl.ebi.tools.BaseCmdLine;
+import org.tulsoft.tools.BaseCmdLine;
import java.util.Properties;
/**
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestArgs.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/TestArgs.java 2005/09/01 05:51:18 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/TestArgs.java 2005/09/04 13:45:37 1.2
@@ -6,6 +6,9 @@
// Copyright Martin Senger (martin.senger at gmail.com).
//
+import org.tulsoft.tools.BaseCmdLine;
+import org.tulsoft.shared.UUtils;
+
/**
* Work in progress...
*
@@ -16,8 +19,17 @@
public static void main (String[] args)
throws Exception {
- for (int i = 0; i < args.length; i++) {
- System. out.println (i + ": " + args[i]);
+ String withTools = System.getProperty ("with_tools");
+ if (UUtils.is (withTools)) {
+ System.out.println ("Using BaseCmdLine:\n");
+ BaseCmdLine cmd = new BaseCmdLine (args, true);
+ for (int i = 0; i < cmd.params.length; i++) {
+ System. out.println (i + ": " + cmd.params[i]);
+ }
+ } else {
+ for (int i = 0; i < args.length; i++) {
+ System. out.println (i + ": " + args[i]);
+ }
}
}
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/TestingMobyParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/TestingMobyParser.java 2005/08/26 06:27:03 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/TestingMobyParser.java 2005/09/04 13:45:37 1.2
@@ -10,7 +10,7 @@
import org.biomoby.shared.MobyException;
import org.biomoby.shared.Utils;
-import embl.ebi.tools.BaseCmdLine;
+import org.tulsoft.tools.BaseCmdLine;
import java.io.File;
/**
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/Clients/UnregisterByAuthority.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/Clients/UnregisterByAuthority.java 2005/08/26 06:27:03 1.1
+++ /home/repository/moby/moby-live/Java/src/Clients/UnregisterByAuthority.java 2005/09/04 13:45:37 1.2
@@ -11,7 +11,7 @@
import org.biomoby.shared.Central;
import org.biomoby.client.CentralImpl;
-import embl.ebi.tools.BaseCmdLine;
+import org.tulsoft.tools.BaseCmdLine;
import java.util.Map;
import java.util.Map.Entry;
More information about the MOBY-guts
mailing list