[MOBY-guts] biomoby commit

senger@ebi.ac.uk senger at pub.open-bio.org
Fri Nov 12 23:02:31 UTC 2004


senger
Fri Nov 12 18:02:31 EST 2004
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory pub.open-bio.org:/tmp/cvs-serv12053/src/main/org/biomoby/client

Modified Files:
	FilterServices.java 
Log Message:
command-line client is able now to call services easier

moby-live/Java/src/main/org/biomoby/client FilterServices.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/FilterServices.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/FilterServices.java	2004/10/18 14:35:06	1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/FilterServices.java	2004/11/12 23:02:31	1.3
@@ -305,7 +305,7 @@
 
     /*************************************************************************
      * Find all paths (using available 'edges') that start by any of
-     * the 'startringEdges' and finish by any of the 'endingEdges'.
+     * the 'startingEdges' and finish by any of the 'endingEdges'.
      * Each path always has one start and one end and it has no
      * cycles and no branches. <p>
      *
@@ -342,6 +342,9 @@
 
 	// find all (no-cycle-containing) paths (recursively)
 	Vector allPaths = new Vector();
+	for (int i = 0; i < startingEdges.length; i++) {
+	    System.out.println ("SE: " + startingEdges[i].toString());
+	}
 	findAllPaths (startingEdges, allEdges, new Hashtable(), allPaths);
 	ServicesEdge[][] result = new ServicesEdge [allPaths.size()][];
 	allPaths.copyInto (result);
@@ -351,13 +354,22 @@
     /*************************************************************************
      * Does the real job, recursivelly...
      *************************************************************************/
+    static int Count = 0;
     static void findAllPaths (ServicesEdge[] startingEdges,
 			      ServicesEdge[] allEdges,
 			      Hashtable soFarIncluded, // key: target service name
 			      Vector foundPaths) {     // elements of type ServicesEdge[]
 
+	Count++;
+// 	for (int i = 0; i < Count; i++) System.out.print (" ");
+// 	System.out.println (soFarIncluded.size());
+
 	for (int i = 0; i < startingEdges.length; i++) {
 
+// 	    if (Count == 1) System.out.println ("i: " + i);
+	    for (int c = 0; c < Count; c++) System.out.print (" ");
+	    System.out.println ("i: " + i + " (of " + startingEdges.length + ")");
+
 	    // is this the final edge (ending in a target data type)?
  	    if ( (startingEdges[i] instanceof DataServiceEdge) &&
  		 ((DataServiceEdge)startingEdges[i]).isEndingEdge() ) {
@@ -394,6 +406,10 @@
 	    ServicesEdge[] contEdges = new ServicesEdge [v.size()];
 	    v.copyInto (contEdges);
 
+// 	    for (int c = 0; c < Count; c++) System.out.print (" ");
+// 	    System.out.print ("(Count: " + Count + ") ");
+// 	    System.out.println ("contEdges: " + contEdges.length);
+
 	    // ...call itself recursively
 	    findAllPaths (contEdges, allEdges, soFarIncluded, foundPaths);
 
@@ -402,6 +418,7 @@
 	    // 'soFarIncluded'
 	    soFarIncluded.remove (toServiceName);
 	}
+	Count--;
     }
 
 }




More information about the MOBY-guts mailing list