[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Thu May 13 15:57:59 UTC 2010


gordonp
Thu May 13 11:57:59 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv28361/src/main/ca/ucalgary/seahawk/services

Modified Files:
	DaggooClient.java 
Log Message:
Added splash screen updates
moby-live/Java/src/main/ca/ucalgary/seahawk/services DaggooClient.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/DaggooClient.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/DaggooClient.java	2010/03/17 20:21:55	1.2
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/DaggooClient.java	2010/05/13 15:57:59	1.3
@@ -1,12 +1,14 @@
 package ca.ucalgary.seahawk.services;
 
 import ca.ucalgary.seahawk.gui.MobyContentPane;
+import ca.ucalgary.seahawk.gui.MobyServicesGUI;
 import ca.ucalgary.seahawk.util.SeahawkOptions;
 import ca.ucalgary.seahawk.util.HTMLUtils;
 import ca.ucalgary.services.Registration;
 import ca.ucalgary.services.util.PBERecorder;
 
 import org.biomoby.client.CentralImpl;
+import org.biomoby.shared.MobyService;
 
 import javax.swing.JOptionPane;
 
@@ -26,9 +28,9 @@
      */
     public enum Action {WRAP, CALL, VIEW, NOTHING}
 	
-    public static boolean acceptAnExistingWrapper(URL u, MobyContentPane dropTargetPane){
+    public static boolean acceptAnExistingWrapper(URL u, MobyContentPane dropTargetPane, MobyServicesGUI servicesGUI){
 	// by default, do not provide view vs. wrap option
-	return acceptAnExistingWrapper(u, dropTargetPane, false) != Action.WRAP;
+	return acceptAnExistingWrapper(u, dropTargetPane, servicesGUI, false) != Action.WRAP;
 	// all actions except wrap are handled by this method
     }
 
@@ -41,7 +43,8 @@
      * @param dropTargetPane the Seahawk GUI element onto which the URL was dropped
      * @param giveViewOption provide extra option to just view the page in Seahawk, rather than wrap the service
      */
-    public static Action acceptAnExistingWrapper(URL u, MobyContentPane dropTargetPane, boolean giveViewOption){
+    public static Action acceptAnExistingWrapper(URL u, MobyContentPane dropTargetPane, 
+						 MobyServicesGUI servicesGUI, boolean giveViewOption){
 	// Before wrapping the WSDL, see if there are already services wrapping it (in Daggoo).
 	// If so, ask the user if they want to use one of those instead.
 	try{
@@ -86,6 +89,12 @@
 		    // cancel = wrap it yourself instead of using one of the service options presented
 		    return Action.WRAP;
 		}
+		// Deconstruct the label built above
+		String providerURI = ((String) selectedValue).replaceFirst("^.*\\((\\S+)\\).*$", "$1");
+		String serviceName = ((String) selectedValue).replaceFirst("^(.*)\\s*\\(.*$", "$1");
+		MobyService mobyService = dropTargetPane.getContentGUI().findService(providerURI, serviceName);
+		// Launch the GUI to populate the service request (no initial data provided)
+		servicesGUI.setupService(mobyService, null, null);
 	    }
 	    else{ // give user three options: call service, wrap service or view URL contents in Seahawk
 		Action action = Action.NOTHING;




More information about the MOBY-guts mailing list