/*
* Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
package jalview.ws;
-import ext.vamsas.*;
+import javax.swing.*;
+import ext.vamsas.*;
import jalview.datamodel.*;
-
import jalview.gui.*;
-import javax.swing.*;
-
/**
* DOCUMENT ME!
*
ext.vamsas.MuscleWS server;
AlignFrame alignFrame;
-
/**
* Creates a new MsaWSClient object that uses a service
* given by an externally retrieved ServiceHandle
{
JOptionPane.showMessageDialog(Desktop.desktop,
"The Service called \n" + sh.getName() +
- "\nis not a \nMultiple Sequence Alignment Service !",
+ "\nis not a \nMultiple Sequence Alignment Service !",
"Internal Jalview Error",
JOptionPane.WARNING_MESSAGE);
return;
}
- if ((wsInfo = setWebService(sh))==null)
- {
- JOptionPane.showMessageDialog(Desktop.desktop,
- "The Multiple Sequence Alignment Service named " +
- sh.getName() +
- " is unknown", "Internal Jalview Error",
- JOptionPane.WARNING_MESSAGE);
+ if ( (wsInfo = setWebService(sh)) == null)
+ {
+ JOptionPane.showMessageDialog(Desktop.desktop,
+ "The Multiple Sequence Alignment Service named " +
+ sh.getName() +
+ " is unknown", "Internal Jalview Error",
+ JOptionPane.WARNING_MESSAGE);
- return;
- }
+ return;
+ }
startMsaWSClient(altitle, msa, submitGaps, preserveOrder, seqdataset);
}
-
private void startMsaWSClient(String altitle, AlignmentView msa,
- boolean submitGaps, boolean preserveOrder, Alignment seqdataset)
+ boolean submitGaps, boolean preserveOrder,
+ Alignment seqdataset)
{
if (!locateWebService())
{
wsInfo.setProgressText( ( (submitGaps) ? "Re-alignment" : "Alignment") +
" of " + altitle + "\nJob details\n");
String jobtitle = WebServiceName.toLowerCase();
- if (jobtitle.endsWith("alignment")) {
- if (submitGaps
- && (!jobtitle.endsWith("realignment")
- || jobtitle.indexOf("profile")==-1)) {
- int pos=jobtitle.indexOf("alignment");
- jobtitle = WebServiceName.substring(0, pos) + "re-alignment of "+altitle;
- } else {
- jobtitle = WebServiceName+" of "+altitle;
- }
- } else {
- jobtitle = WebServiceName+(submitGaps? " re" : " ") +"alignment of "+altitle;
+ if (jobtitle.endsWith("alignment"))
+ {
+ if (submitGaps
+ && (!jobtitle.endsWith("realignment")
+ || jobtitle.indexOf("profile") == -1))
+ {
+ int pos = jobtitle.indexOf("alignment");
+ jobtitle = WebServiceName.substring(0, pos) + "re-alignment of " +
+ altitle;
+ }
+ else
+ {
+ jobtitle = WebServiceName + " of " + altitle;
+ }
+ }
+ else
+ {
+ jobtitle = WebServiceName + (submitGaps ? " re" : " ") + "alignment of " +
+ altitle;
}
MsaWSThread msathread = new MsaWSThread(server, WsURL, wsInfo, alignFrame,
- WebServiceName,
- jobtitle,
- msa,
- submitGaps, preserveOrder, seqdataset);
+ WebServiceName,
+ jobtitle,
+ msa,
+ submitGaps, preserveOrder,
+ seqdataset);
wsInfo.setthisService(msathread);
msathread.start();
}