[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Tue Apr 3 02:22:57 UTC 2007


gordonp
Mon Apr  2 22:22:56 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory dev.open-bio.org:/tmp/cvs-serv6605/src/main/org/biomoby/client

Modified Files:
	MobyRequest.java 
Log Message:
Added support for asynchronous service calls
moby-live/Java/src/main/org/biomoby/client MobyRequest.java,1.23,1.24
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java	2007/03/30 21:17:27	1.23
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java	2007/04/03 02:22:56	1.24
@@ -121,6 +121,7 @@
 	    debugPS.println("Syntax error encountered while compiling XPath " +
 			    "statements for internal use (code bug?): " + te);
 	}
+	setDebugMode(System.getProperty("moby.debug") != null);
     }
 
     /**
@@ -317,17 +318,17 @@
 		    }
 		}
 
-		// Parse and merge the new data into the existing contents
-		InputStream resultStream = AsyncClient.getResultStream(epr, newDataAvailable);
-		Element mobyDOM = asyncSoapTextToMobyDOM(resultStream);
-		MobyContentInstance newResults = MobyDataUtils.fromXMLDocument(mobyDOM);
-		// The merge
-		for(String jobid: newResults.keySet()){
-		    finalContents.put(jobid, newResults.get(jobid));
-		}
-
-		// Inform the handler that some data has been added to the response (for incremental display?)
 		if(newDataAvailable.size() > 0 && handler != null){
+		    // Parse and merge the new data into the existing contents
+		    InputStream resultStream = AsyncClient.getResultStream(epr, newDataAvailable);
+		    Element mobyDOM = asyncSoapTextToMobyDOM(resultStream);
+		    MobyContentInstance newResults = MobyDataUtils.fromXMLDocument(mobyDOM);
+		    // The merge
+		    for(String jobid: newResults.keySet()){
+			finalContents.put(jobid, newResults.get(jobid));
+		    }
+		    
+		    // Inform the handler that some data has been added to the response (for incremental display?)
 		    MobyRequestEvent mre = new MobyRequestEvent(finalContents, this, null, requestId);
 		    StringWriter xmlWriter = new StringWriter();
 		    MobyDataUtils.toXMLDocument(xmlWriter, finalContents);




More information about the MOBY-guts mailing list