From: Jim Procter Date: Wed, 2 Oct 2019 15:25:08 +0000 (+0100) Subject: JAL-3070 decontaminate the ‘preferred service’ methods for instantaneous alignment... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=26da2256015e86e959dd31eb808898bdf5c216ad;p=jalview.git JAL-3070 decontaminate the ‘preferred service’ methods for instantaneous alignment analysis service GUI --- diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index d5f6a5d..c2e3eb3 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -98,9 +98,9 @@ import jalview.viewmodel.ViewportRanges; import jalview.viewmodel.seqfeatures.FeatureRendererModel; import jalview.viewmodel.seqfeatures.FeatureRendererSettings; import jalview.viewmodel.seqfeatures.FeaturesDisplayed; +import jalview.ws.api.ServiceWithParameters; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.dm.AAConSettings; -import jalview.ws.jws2.jabaws2.Jws2Instance; import jalview.ws.params.ArgumentI; import jalview.ws.params.AutoCalcSetting; import jalview.ws.params.WsParamSetI; @@ -2413,7 +2413,7 @@ public class Jalview2XML if (calcIdParam.getVersion().equals("1.0")) { final String[] calcIds = calcIdParam.getServiceURL().toArray(new String[0]); - Jws2Instance service = Jws2Discoverer.getDiscoverer() + ServiceWithParameters service = Jws2Discoverer.getDiscoverer() .getPreferredServiceFor(calcIds); if (service != null) { @@ -2454,7 +2454,7 @@ public class Jalview2XML } else { - warn("Cannot resolve a service for the parameters used in this project. Try configuring a JABAWS server."); + warn("Cannot resolve a service for the parameters used in this project. Try configuring a server in the Web Services preferences tab."); return false; } } diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index 2a05228..dc90d82 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -951,14 +951,14 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI * @param serviceURL * @return null or best match for given uri/ls. */ - public Jws2Instance getPreferredServiceFor(String[] serviceURLs) + public ServiceWithParameters getPreferredServiceFor(String[] serviceURLs) { HashSet urls = new HashSet<>(); urls.addAll(Arrays.asList(serviceURLs)); - Jws2Instance match = null; + ServiceWithParameters match = null; if (services != null) { - for (Jws2Instance svc : services) + for (ServiceWithParameters svc : services) { // TODO getNameURI Should return a versioned URI for the service, but // doesn't as of 2.11