import jalview.viewmodel.ViewportRanges;
import jalview.ws.DBRefFetcher;
import jalview.ws.DBRefFetcher.FetchFinishedListenerI;
+import jalview.ws.api.ServiceWithParameters;
import jalview.ws.jws1.Discoverer;
import jalview.ws.jws2.Jws2Discoverer;
-import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.ParamDatastoreI;
import jalview.ws.params.WsParamSetI;
if (jws2servs.hasServices())
{
jws2servs.attachWSMenuEntry(webService, me);
- for (Jws2Instance sv : jws2servs.getServices())
+ for (ServiceWithParameters sv : jws2servs.getServices())
{
if (sv.getName().toLowerCase().contains("jpred"))
{
public abstract class ServiceWithParameters extends UIinfo
{
+ protected jalview.ws.uimodel.AlignAnalysisUIText aaui;
+
public ServiceWithParameters(String serviceType, String action,
String name, String description, String hosturl)
{
public abstract void initParamStore(ParamManager userParameterStore);
+ public jalview.ws.uimodel.AlignAnalysisUIText getAlignAnalysisUI()
+ {
+ return aaui;
+ }
+
+ public void setAlignAnalysisUI(
+ jalview.ws.uimodel.AlignAnalysisUIText aaui)
+ {
+ this.aaui = aaui;
+ }
+
+ public boolean isInteractiveUpdate()
+ {
+ return aaui != null && aaui.isAA();
+ }
+ // config flags for SeqAnnotationServiceCalcWorker
+
+ public boolean isProteinService()
+ {
+ return aaui == null ? true : aaui.isPr();
+ }
+
+ public boolean isNucleotideService()
+ {
+ return aaui == null ? false : aaui.isNa();
+ }
+
+ public boolean isNeedsAlignedSequences()
+ {
+ return aaui == null ? false : aaui.isNeedsAlignedSeqs();
+ }
+
+ public boolean isAlignmentAnalysis()
+ {
+ return aaui == null ? false : aaui.isAA();
+ }
+
+ public boolean isFilterSymbols()
+ {
+ return aaui != null ? aaui.isFilterSymbols() : true;
+ }
+
+ public int getMinimumInputSequences()
+ {
+ return aaui != null ? aaui.getMinimumSequences() : 1;
+ }
+
+ public String getNameURI()
+ {
+ return "java:" + getName();
+ }
+
+ public String getUri()
+ {
+ // TODO verify that service parameter sets in projects are consistent with
+ // Jalview 2.10.4
+ // this is only valid for Jaba 1.0 - this formula might have to change!
+ return getHostURL()
+ + (getHostURL().lastIndexOf("/") == (getHostURL().length() - 1)
+ ? ""
+ : "/")
+ + getName();
+ }
+
}
import jalview.gui.JvSwingUtils;
import jalview.util.MessageManager;
import jalview.ws.WSMenuEntryProviderI;
+import jalview.ws.api.ServiceWithParameters;
import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.ParamDatastoreI;
MessageManager.getString("label.switch_server")));
hitm.setToolTipText(JvSwingUtils.wrapTooltip(false,
MessageManager.getString("label.choose_jabaws_server")));
- for (final Jws2Instance sv : alternates.get(service.getName()))
+ for (final ServiceWithParameters sv : alternates.get(service.getName()))
{
JMenuItem itm;
hitm.add(itm = new JMenuItem(sv.getHostURL()));
System.out.println("Changesupport: There are now "
+ getDiscoverer().services.size() + " services");
int i = 1;
- for (Jws2Instance instance : getDiscoverer().services)
+ for (ServiceWithParameters instance : getDiscoverer().services)
{
System.out.println("Service " + i++ + " "
+ instance.getClass() + "@"
}
public void setPreferredServiceFor(AlignFrame af, String serviceName,
- String serviceAction, Jws2Instance selectedServer)
+ String serviceAction, ServiceWithParameters selectedServer)
{
// TODO: pull out and generalise for the selectedServer's attributes
String afid = (af == null) ? "" : af.getViewport().getSequenceSetId();
}
public void setPreferredServiceFor(String serviceType,
- String serviceAction, Jws2Instance selectedServer)
+ String serviceAction, ServiceWithParameters selectedServer)
{
setPreferredServiceFor(null, serviceType, serviceAction,
selectedServer);
import jalview.util.MessageManager;
import jalview.workers.AlignCalcWorker;
import jalview.ws.api.CancellableI;
+import jalview.ws.api.JalviewServiceEndpointProviderI;
import jalview.ws.api.JobId;
import jalview.ws.api.SequenceAnnotationServiceI;
+import jalview.ws.api.ServiceWithParameters;
import jalview.ws.api.WSAnnotationCalcManagerI;
import jalview.ws.gui.AnnotationWsJob;
import jalview.ws.jws2.dm.AAConSettings;
-import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.WsParamSetI;
implements WSAnnotationCalcManagerI
{
- protected Jws2Instance service;
+ protected ServiceWithParameters service;
protected WsParamSetI preset;
super(alignViewport, alignPanel);
}
- public SeqAnnotationServiceCalcWorker(Jws2Instance service, AlignFrame alignFrame,
+ public SeqAnnotationServiceCalcWorker(ServiceWithParameters service,
+ AlignFrame alignFrame,
WsParamSetI preset, List<ArgumentI> paramset)
{
this(alignFrame.getCurrentView(), alignFrame.alignPanel);
this.service = service;
try
{
- annotService = (jalview.ws.api.SequenceAnnotationServiceI) service
+ annotService = (jalview.ws.api.SequenceAnnotationServiceI) ((JalviewServiceEndpointProviderI) service)
.getEndpoint();
} catch (ClassCastException cce)
{
// dan think. Do I need to change this method to run RNAalifold through the
// GUI
- public void initSequenceAnnotationWSClient(final Jws2Instance sh,
+ public void initSequenceAnnotationWSClient(final ServiceWithParameters sh,
AlignFrame alignFrame, WsParamSetI preset, boolean editParams)
{
// dan changed! dan test. comment out if conditional
package jalview.ws.jws2.dm;
import jalview.util.MessageManager;
+import jalview.ws.api.ServiceWithParameters;
import jalview.ws.jws2.JabaParamStore;
import jalview.ws.jws2.JabaPreset;
import jalview.ws.jws2.ParameterUtils;
*/
public class AAConSettings extends jalview.ws.params.AutoCalcSetting
{
- Jws2Instance service;
+ ServiceWithParameters service;
- public AAConSettings(boolean autoUpdate, Jws2Instance service,
+ public AAConSettings(boolean autoUpdate, ServiceWithParameters service2,
WsParamSetI preset, List<ArgumentI> jobArgset)
{
super(preset, jobArgset, autoUpdate);
- this.service = service;
+ this.service = service2;
}
- public Jws2Instance getService()
+ public ServiceWithParameters getService()
{
return service;
}
import jalview.ws.api.JobId;
import jalview.ws.api.SequenceAnnotationServiceI;
import jalview.ws.gui.AnnotationWsJob;
-import jalview.ws.jws2.SeqAnnotationServiceCalcWorker;
import jalview.ws.jws2.JabaParamStore;
import jalview.ws.jws2.JabaPreset;
+import jalview.ws.jws2.SeqAnnotationServiceCalcWorker;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.WsParamSetI;
*/
public String getCalcId()
{
- return our.aaui == null ? null : our.aaui.getCalcId();
+ return our.getAlignAnalysisUI() == null ? null
+ : our.getAlignAnalysisUI().getCalcId();
}
@Override
return paramStore;
}
- public String getUri()
- {
- // TODO verify that service parameter sets in projects are consistent with
- // Jalview 2.10.4
- // this is only valid for Jaba 1.0 - this formula might have to change!
- return getHostURL()
- + (getHostURL().lastIndexOf("/") == (getHostURL().length() - 1)
- ? ""
- : "/")
- + getName();
- }
-
private boolean hasParams = false, lookedForParams = false;
@Override
}
}
- public String getNameURI()
- {
- return "java:" + getName();
- }
-
- jalview.ws.uimodel.AlignAnalysisUIText aaui;
-
- public jalview.ws.uimodel.AlignAnalysisUIText getAlignAnalysisUI()
- {
- return aaui;
- }
-
/**
* initialise a parameter store for this service
*
return null;
}
}
-
- public boolean isInteractiveUpdate()
- {
- return aaui != null && aaui.isAA();
- }
- // config flags for SeqAnnotationServiceCalcWorker
-
- public boolean isProteinService()
- {
- return aaui == null ? true : aaui.isPr();
- }
-
- public boolean isNucleotideService()
- {
- return aaui == null ? false : aaui.isNa();
- }
-
- public boolean isNeedsAlignedSequences()
- {
- return aaui == null ? false : aaui.isNeedsAlignedSeqs();
- }
-
- public boolean isAlignmentAnalysis()
- {
- return aaui == null ? false : aaui.isAA();
- }
-
- public boolean isFilterSymbols()
- {
- return aaui != null ? aaui.isFilterSymbols() : true;
- }
-
- public int getMinimumInputSequences()
- {
- return aaui != null ? aaui.getMinimumSequences() : 1;
- }
}
init();
Jws2Instance svc = new Jws2Instance(jwsservers, serviceType,
category_rewrite(name), description, service);
- svc.aaui = aaConGUI.get(serviceType.toString());
+ svc.setAlignAnalysisUI(aaConGUI.get(serviceType.toString()));
return svc;
}