[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Thu May 13 16:12:19 UTC 2010


gordonp
Thu May 13 12:12:19 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv29337/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobyContentPane.java 
Log Message:
Proper support for the calling of existing services listed in the WSDL/Web form import dialog
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobyContentPane.java,1.32,1.33
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java	2010/05/04 16:19:37	1.32
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java	2010/05/13 16:12:19	1.33
@@ -365,7 +365,7 @@
 	editorPane.setText("Please wait a moment while I study the Web page...");
 
 	//true == allow viewing of URL contents instead of wrapping as option
-	DaggooClient.Action action = DaggooClient.acceptAnExistingWrapper(u, this, true);
+	DaggooClient.Action action = DaggooClient.acceptAnExistingWrapper(u, this, servicesGUI, true);
 	if(action != DaggooClient.Action.WRAP){
 	    // call to the selected service is done by DaggooClient in this case
 	    return;
@@ -389,7 +389,7 @@
 	tabbedPane.setSelectedComponent(this);
 	editorPane.setText("Please wait a moment while I study the document...");
 
-	if(DaggooClient.acceptAnExistingWrapper(u, this)){
+	if(DaggooClient.acceptAnExistingWrapper(u, this, servicesGUI)){
 	    // call to the selected service is done by DaggooClient if returning true
 	    return;
 	}
@@ -862,6 +862,34 @@
 	}
     }
 
+    public int getExportOption(String[] options){
+	if(cgiServlet == null && soapServlet == null){
+	    logger.warn("Not showing GUI for export options: CGI and SOAP servlets are null");
+	    return -1;
+	}
+	
+	if(cgiServlet != null && cgiServlet.getRecorder() != null){
+	    if(!(cgiServlet.getRecorder() instanceof PBERecorder)){
+		logger.warn("Not showing GUI for export options: CGI servlet recorder was not " +
+			    "of expected class PBERecorder: found " + cgiServlet.getRecorder().getClass().getName());
+		return -1;
+	    }
+	    return ((PBERecorder) cgiServlet.getRecorder()).getChoice("Choose a format for the pasted data:", options);
+	}
+	else if(soapServlet != null && soapServlet.getRecorder() != null){
+	    if(!(soapServlet.getRecorder() instanceof PBERecorder)){
+		logger.warn("Not showing GUI for export options: SOAP servlet recorder was not " +
+			    "of expected class PBERecorder: found " + soapServlet.getRecorder().getClass().getName());
+		return -1;
+	    }
+	    return ((PBERecorder) soapServlet.getRecorder()).getChoice("Choose a format for the pasted data:", options);
+	}
+	else{
+	    logger.warn("Not showing GUI for export options: neither the CGI nor the SOAP servlet recorder is set");
+	    return -1;
+	}
+    }
+
     /**
      * Called by MOBYRequest when the service request is being sent.  We
      * can create the GUI and wait message here.
@@ -1177,6 +1205,10 @@
 	}
     }
 
+    public MobyContentGUI getContentGUI(){
+	return contentGUI;
+    }
+
     private void callServiceForInputURL(String providerURI, String serviceName, URL inputURL) throws Exception{
 	MobyContentInstance inEnvelope = MobyDataUtils.fromXMLDocument(inputURL);
 	MobyService service = contentGUI.findService(providerURI, serviceName);




More information about the MOBY-guts mailing list