Note: The jws2.WSClient’s ’serviceType’ is now UIinfo.getName() - reflecting that serviceType was actually the name of the service
jws2servs.attachWSMenuEntry(webService, me);
for (Jws2Instance sv : jws2servs.getServices())
{
- if (sv.description.toLowerCase().contains("jpred"))
+ if (sv.getName().toLowerCase().contains("jpred"))
{
for (JMenuItem jmi : legacyItems)
{
public class UIinfo
{
- public UIinfo(String action, String name, String description)
+ private String ServiceType;
+
+ public UIinfo(String serviceType, String action, String name,
+ String description)
{
+ this.setServiceType(serviceType == null ? "" : serviceType);
this.Action = action == null ? "" : action;
this.description = description == null ? "" : description;
this.Name = name == null ? "" : name;
}
+ /**
+ * The type of analysis the service performs
+ */
+ public String getServiceType()
+ {
+ return ServiceType;
+ }
+
+ public void setServiceType(String serviceType)
+ {
+ ServiceType = serviceType;
+ }
+
+ /**
+ * The action when the service performs the analysis
+ */
public String getAction()
{
return Action;
Action = action;
}
+ /**
+ * name shown to user
+ *
+ * @return
+ */
public String getName()
{
return Name;
Name = name;
}
+ /**
+ * Detailed description (may include references, URLs, html,etc)
+ *
+ * @return
+ */
public String getDescription()
{
return description;
}
UIinfo other = (UIinfo) object;
- return (Name == null && other.getName() == null || Name != null
- && other.getName() != null && Name.equals(other.getName()))
+ return (ServiceType == null && other.getServiceType() == null
+ || ServiceType != null && other.getServiceType() != null
+ && ServiceType.equals(other.getServiceType()))
+ && (Name == null && other.getName() == null
+ || Name != null && other.getName() != null
+ && Name.equals(other.getName()))
&& (Action == null && other.getAction() == null
|| Action != null && other.getAction() != null
&& Action.equals(other.getAction()))
{
super(sh, alignFrame, thePreset, paramset);
af = alignFrame;
- typeName = sh.action;
- methodName = sh.serviceType;
+ typeName = sh.getAction();
+ methodName = sh.getName();
submitGaps = false;
alignedSeqs = false;
if (immediate || !calcMan.isWorking(this) && scoremanager != null)
{
Map<String, String[]> featureTypeMap = featureMap
- .get(service.serviceType);
+ .get(service.getName());
Map<String, Map<String, Object>> annotTypeMap = annotMap
- .get(service.serviceType);
+ .get(service.getName());
boolean dispFeatures = false;
Map<String, Object> fc = new Hashtable<>();
List<AlignmentAnnotation> ourAnnot = new ArrayList<>();
String typename, calcName;
AlignmentAnnotation annot = createAnnotationRowsForScores(
ourAnnot,
- typename = service.serviceType + " ("
+ typename = service.getName() + " ("
+ scr.getMethod() + ")",
- calcName = service.getServiceTypeURI() + "/"
+ calcName = service.getNameURI() + "/"
+ scr.getMethod(),
aseq, base + 1, scr);
annot.graph = AlignmentAnnotation.LINE_GRAPH;
public class JabaParamStore implements ParamDatastoreI
{
- Hashtable<String, JabaWsParamSet> editedParams = new Hashtable<String, JabaWsParamSet>();
+ Hashtable<String, JabaWsParamSet> editedParams = new Hashtable<>();
private Jws2Instance service;
List<WsParamSetI> prefs = new ArrayList();
if (servicePresets == null)
{
- servicePresets = new Hashtable<String, JabaPreset>();
+ servicePresets = new Hashtable<>();
PresetManager prman;
if ((prman = service.getPresets()) != null)
{
public static List<ArgumentI> getJwsArgsfromJaba(List jabargs,
boolean sortByOpt)
{
- List<ArgumentI> rgs = new ArrayList<ArgumentI>();
- List<String> rgnames = new ArrayList<String>();
+ List<ArgumentI> rgs = new ArrayList<>();
+ List<String> rgnames = new ArrayList<>();
for (Object rg : jabargs)
{
ArgumentI narg = null;
boolean found = false;
for (String url : urls)
{
- if (service.getServiceTypeURI().equals(url)
+ if (service.getNameURI().equals(url)
|| service.getUri().equalsIgnoreCase(url))
{
found = true;
wsp.setDescription(descr);
wsp.setApplicableUrls(urls.clone());
- List<String> lines = new ArrayList<String>();
+ List<String> lines = new ArrayList<>();
StringTokenizer st = new StringTokenizer(parameterfile, "\n");
while (st.hasMoreTokens())
{
protected WebserviceInfo setWebService(Jws2Instance serv, boolean b)
{
- // serviceHandle = serv;
- String serviceInstance = serv.action; // serv.service.getClass().getName();
- WebServiceName = serv.serviceType;
+ WebServiceName = serv.getName();
WebServiceJobTitle = serv.getActionText();
WsURL = serv.hosturl;
if (!b)
return new WebserviceInfo(WebServiceJobTitle,
WebServiceJobTitle + " using service hosted at "
+ serv.hosturl + "\n"
- + (serv.description != null ? serv.description : ""),
+ + (serv.getDescription() != null
+ ? serv.getDescription()
+ : ""),
false);
}
return null;
{
if (service != null)
{
- if (!service.serviceType.toString()
+ if (!service.getServiceType()
.equals(compbio.ws.client.Services.AAConWS.toString()))
{
Cache.log.warn(
"Ignoring invalid preferred service for AACon calculations (service type was "
- + service.serviceType + ")");
+ + service.getServiceType() + ")");
service = null;
}
else
running = true;
// first set up exclusion list if needed
- final Set<String> ignoredServices = new HashSet<String>();
+ final Set<String> ignoredServices = new HashSet<>();
for (String ignored : Cache
.getDefault("IGNORED_JABAWS_SERVICETYPES", "").split("\\|"))
{
{
validServiceUrls.removeAllElements();
}
- ArrayList<String> svctypes = new ArrayList<String>();
+ ArrayList<String> svctypes = new ArrayList<>();
- List<JabaWsServerQuery> qrys = new ArrayList<JabaWsServerQuery>();
+ List<JabaWsServerQuery> qrys = new ArrayList<>();
for (final String jwsserver : getServiceUrls())
{
JabaWsServerQuery squery = new JabaWsServerQuery(this, jwsserver);
{
svcs[ipos] = svc;
spos[ipos++] = 1000 * svcUrls.indexOf(svc.getHost()) + 1
- + svctypes.indexOf(svc.serviceType);
+ + svctypes.indexOf(svc.getName());
}
jalview.util.QuickSort.sort(spos, svcs);
- services = new Vector<Jws2Instance>();
+ services = new Vector<>();
for (Jws2Instance svc : svcs)
{
- if (!ignoredServices.contains(svc.serviceType))
+ if (!ignoredServices.contains(svc.getName()))
{
services.add(svc);
}
{
if (services == null)
{
- services = new Vector<Jws2Instance>();
+ services = new Vector<>();
}
System.out.println(
"Discovered service: " + jwsservers + " " + service.toString());
service.hasParameters();
if (validServiceUrls == null)
{
- validServiceUrls = new Vector<String>();
+ validServiceUrls = new Vector<>();
}
validServiceUrls.add(jwsservers);
}
* for moment we keep them separate.
*/
JMenu atpoint;
- List<Jws2Instance> enumerableServices = new ArrayList<Jws2Instance>();
+ List<Jws2Instance> enumerableServices = new ArrayList<>();
// jws2al.removeAll();
- Map<String, Jws2Instance> preferredHosts = new HashMap<String, Jws2Instance>();
- Map<String, List<Jws2Instance>> alternates = new HashMap<String, List<Jws2Instance>>();
+ Map<String, Jws2Instance> preferredHosts = new HashMap<>();
+ Map<String, List<Jws2Instance>> alternates = new HashMap<>();
for (Jws2Instance service : services.toArray(new Jws2Instance[0]))
{
- if (!isRecalculable(service.action))
+ // TODO: check this behaves with refactored serviceType to getName
+ if (!isRecalculable(service.getName()))
{
// add 'one shot' services to be displayed using the classic menu
// structure
}
else
{
- if (!preferredHosts.containsKey(service.serviceType))
+ if (!preferredHosts.containsKey(service.getName()))
{
Jws2Instance preferredInstance = getPreferredServiceFor(
- alignFrame, service.serviceType);
+ alignFrame, service.getName());
if (preferredInstance != null)
{
- preferredHosts.put(service.serviceType, preferredInstance);
+ preferredHosts.put(service.getName(), preferredInstance);
}
else
{
- preferredHosts.put(service.serviceType, service);
+ preferredHosts.put(service.getName(), service);
}
}
- List<Jws2Instance> ph = alternates.get(service.serviceType);
- if (preferredHosts.get(service.serviceType) != service)
+ List<Jws2Instance> ph = alternates.get(service.getName());
+ if (preferredHosts.get(service.getName()) != service)
{
if (ph == null)
{
- ph = new ArrayList<Jws2Instance>();
+ ph = new ArrayList<>();
}
ph.add(service);
- alternates.put(service.serviceType, ph);
+ alternates.put(service.getName(), ph);
}
}
// and the instantaneous services
for (final Jws2Instance service : preferredHosts.values())
{
- atpoint = JvSwingUtils.findOrCreateMenu(jws2al, service.action);
+ atpoint = JvSwingUtils.findOrCreateMenu(jws2al,
+ service.getServiceType());
JMenuItem hitm;
if (atpoint.getItemCount() > 1)
{
MessageManager.getString("label.open_jabaws_web_page")));
service.attachWSMenuEntry(atpoint, alignFrame);
- if (alternates.containsKey(service.serviceType))
+ if (alternates.containsKey(service.getName()))
{
atpoint.add(hitm = new JMenu(
MessageManager.getString("label.switch_server")));
hitm.setToolTipText(JvSwingUtils.wrapTooltip(false,
MessageManager.getString("label.choose_jabaws_server")));
- for (final Jws2Instance sv : alternates.get(service.serviceType))
+ for (final Jws2Instance sv : alternates.get(service.getName()))
{
JMenuItem itm;
hitm.add(itm = new JMenuItem(sv.getHost()));
@Override
public void run()
{
- setPreferredServiceFor(alignFrame, sv.serviceType,
- sv.action, sv);
+ setPreferredServiceFor(alignFrame, sv.getName(),
+ sv.getServiceType(), sv);
changeSupport.firePropertyChange("services",
new Vector<Jws2Instance>(), services);
};
*/
JMenu atpoint;
- List<String> hostLabels = new ArrayList<String>();
- Hashtable<String, String> lasthostFor = new Hashtable<String, String>();
- Hashtable<String, ArrayList<Jws2Instance>> hosts = new Hashtable<String, ArrayList<Jws2Instance>>();
- ArrayList<String> hostlist = new ArrayList<String>();
+ List<String> hostLabels = new ArrayList<>();
+ Hashtable<String, String> lasthostFor = new Hashtable<>();
+ Hashtable<String, ArrayList<Jws2Instance>> hosts = new Hashtable<>();
+ ArrayList<String> hostlist = new ArrayList<>();
for (Jws2Instance service : enumerableServices)
{
ArrayList<Jws2Instance> hostservices = hosts.get(service.getHost());
if (hostservices == null)
{
hosts.put(service.getHost(),
- hostservices = new ArrayList<Jws2Instance>());
+ hostservices = new ArrayList<>());
hostlist.add(service.getHost());
}
hostservices.add(service);
String sortbytype[] = new String[orderedsvcs.length];
for (int i = 0; i < sortbytype.length; i++)
{
- sortbytype[i] = orderedsvcs[i].serviceType;
+ sortbytype[i] = orderedsvcs[i].getName();
}
jalview.util.QuickSort.sort(sortbytype, orderedsvcs);
for (final Jws2Instance service : orderedsvcs)
{
- atpoint = JvSwingUtils.findOrCreateMenu(jws2al, service.action);
- String type = service.serviceType;
+ atpoint = JvSwingUtils.findOrCreateMenu(jws2al,
+ service.getAction());
+ String type = service.getName();
if (byhost)
{
atpoint = JvSwingUtils.findOrCreateMenu(atpoint, host);
}
}
if (!byhost && !hostLabels.contains(
- host + service.serviceType + service.getActionText()))
+ host + service.getName() + service.getActionText()))
// !hostLabels.contains(host + (bytype ?
// service.serviceType+service.getActionText() : "")))
{
{
hostLabels.add(host);
}
- if (lasthostFor.get(service.action) == null
- || !lasthostFor.get(service.action).equals(host))
+ if (lasthostFor.get(service.getAction()) == null
+ || !lasthostFor.get(service.getAction()).equals(host))
{
atpoint.add(hitm = new JMenuItem(host));
hitm.setForeground(Color.blue);
hitm.setToolTipText(
JvSwingUtils.wrapTooltip(true, MessageManager
.getString("label.open_jabaws_web_page")));
- lasthostFor.put(service.action, host);
+ lasthostFor.put(service.getAction(), host);
}
hostLabels.add(
- host + service.serviceType + service.getActionText());
+ host + service.getName() + service.getActionText());
}
service.attachWSMenuEntry(atpoint, alignFrame);
{
if (args.length > 0)
{
- testUrls = new ArrayList<String>();
+ testUrls = new ArrayList<>();
for (String url : args)
{
testUrls.add(url);
// return test urls, if there are any, instead of touching cache
return testUrls;
}
- List<String> urls = new ArrayList<String>();
+ List<String> urls = new ArrayList<>();
if (this.preferredUrl != null)
{
public Vector<Jws2Instance> getServices()
{
- return (services == null) ? new Vector<Jws2Instance>()
- : new Vector<Jws2Instance>(services);
+ return (services == null) ? new Vector<>()
+ : new Vector<>(services);
}
/**
{
if (urlsWithoutServices == null)
{
- urlsWithoutServices = new Vector<String>();
+ urlsWithoutServices = new Vector<>();
}
if ((invalidServiceUrls == null
{
if (invalidServiceUrls == null)
{
- invalidServiceUrls = new Vector<String>();
+ invalidServiceUrls = new Vector<>();
}
if (!invalidServiceUrls.contains(jwsservers))
{
*/
public Jws2Instance getPreferredServiceFor(String[] serviceURLs)
{
- HashSet<String> urls = new HashSet<String>();
+ HashSet<String> urls = new HashSet<>();
urls.addAll(Arrays.asList(serviceURLs));
Jws2Instance match = null;
if (services != null)
{
for (Jws2Instance svc : services)
{
- if (urls.contains(svc.getServiceTypeURI()))
+ // TODO getNameURI Should return a versioned URI for the service, but
+ // doesn't as of 2.11
+ if (urls.contains(svc.getNameURI()))
{
if (match == null)
{
return match;
}
- Map<String, Map<String, String>> preferredServiceMap = new HashMap<String, Map<String, String>>();;
+ Map<String, Map<String, String>> preferredServiceMap = new HashMap<>();;
/**
- * get current preferred service of the given type, or global default
+ * get current preferred endpoint of the given Jabaws service, or global
+ * default
*
* @param af
* null or a specific alignFrame
- * @param serviceType
- * Jws2Instance.serviceType for service
+ * @param serviceName
+ * Jws2Instance.getName() for service
* @return null if no service of this type is available, the preferred service
* for the serviceType and af if specified and if defined.
*/
public Jws2Instance getPreferredServiceFor(AlignFrame af,
- String serviceType)
+ String serviceName)
{
String serviceurl = null;
synchronized (preferredServiceMap)
}
if (prefmap != null)
{
- serviceurl = prefmap.get(serviceType);
+ serviceurl = prefmap.get(serviceName);
}
}
Jws2Instance response = null;
for (Jws2Instance svc : services)
{
- if (svc.serviceType.equals(serviceType))
+ if (svc.getName().equals(serviceName))
{
if (serviceurl == null || serviceurl.equals(svc.getHost()))
{
return response;
}
- public void setPreferredServiceFor(AlignFrame af, String serviceType,
+ public void setPreferredServiceFor(AlignFrame af, String serviceName,
String serviceAction, Jws2Instance selectedServer)
{
+ // TODO: pull out and generalise for the selectedServer's attributes
String afid = (af == null) ? "" : af.getViewport().getSequenceSetId();
if (preferredServiceMap == null)
{
- preferredServiceMap = new HashMap<String, Map<String, String>>();
+ preferredServiceMap = new HashMap<>();
}
Map<String, String> prefmap = preferredServiceMap.get(afid);
if (prefmap == null)
{
- prefmap = new HashMap<String, String>();
+ prefmap = new HashMap<>();
preferredServiceMap.put(afid, prefmap);
}
- prefmap.put(serviceType, selectedServer.getHost());
+ prefmap.put(serviceName, selectedServer.getHost());
prefmap.put(serviceAction, selectedServer.getHost());
}
MessageManager.formatMessage(
"label.service_called_is_not_msa_service",
new String[]
- { sh.serviceType }),
+ { sh.getName() }),
MessageManager.getString("label.internal_jalview_error"),
JvOptionPane.WARNING_MESSAGE);
{
JvOptionPane.showMessageDialog(Desktop.desktop, MessageManager
.formatMessage("label.msa_service_is_unknown", new String[]
- { sh.serviceType }),
+ { sh.getName() }),
MessageManager.getString("label.internal_jalview_error"),
JvOptionPane.WARNING_MESSAGE);
{
super(sh, alignFrame, preset, paramset);
af = alignFrame;
- methodName = sh.serviceType;
+ methodName = sh.getName();
alignedSeqs = true;
submitGaps = true;
nucleotidesAllowed = true;
if (immediate || !calcMan.isWorking(this) && scoremanager != null)
{
- List<AlignmentAnnotation> ourAnnot = new ArrayList<AlignmentAnnotation>();
+ List<AlignmentAnnotation> ourAnnot = new ArrayList<>();
// Unpack the ScoreManager
List<String> structs = ((RNAStructScoreManager) scoremanager)
// The base pair probabilities are stored in a set in scoreholder. we want
// a map
- LinkedHashMap<Range, Float> basePairs = new LinkedHashMap<Range, Float>();
+ LinkedHashMap<Range, Float> basePairs = new LinkedHashMap<>();
for (Score score : data)
{
// The Score objects contain a set of size one containing the range and
private LinkedHashMap<Range, Float> isContact(
LinkedHashMap<Range, Float> basePairs, int i)
{
- LinkedHashMap<Range, Float> contacts = new LinkedHashMap<Range, Float>();
+ LinkedHashMap<Range, Float> contacts = new LinkedHashMap<>();
for (Range contact : basePairs.keySet())
{
worker.updateParameters(this.preset, paramset);
}
}
- if (sh.action.toLowerCase().contains("disorder"))
+ if (sh.getAction().toLowerCase().contains("disorder"))
{
// build IUPred style client. take sequences, returns annotation per
// sequence.
* @see jalview.ws.jws2.Jws2Client#attachWSMenuEntry(javax.swing.JMenu,
* jalview.ws.jws2.jabaws2.Jws2Instance, jalview.gui.AlignFrame)
*/
+ @Override
public void attachWSMenuEntry(JMenu wsmenu, final Jws2Instance service,
final AlignFrame alignFrame)
{
}
boolean hasparams = service.hasParameters();
// Assume name ends in WS
- String calcName = service.serviceType.substring(0,
- service.serviceType.length() - 2);
+ String calcName = service.getName().substring(0,
+ service.getName().length() - 2);
JMenuItem annotservice = new JMenuItem(MessageManager.formatMessage(
"label.calcname_with_default_settings", new String[]
annotservice.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
new SequenceAnnotationWSClient(service, alignFrame, null, true);
+ "</strong><br/>" + preset.getDescription()));
methodR.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
new SequenceAnnotationWSClient(service, alignFrame, preset,
preset = pr;
return;
}
- List<ArgumentI> oldargs = new ArrayList<ArgumentI>(),
- newargs = new ArrayList<ArgumentI>();
+ List<ArgumentI> oldargs = new ArrayList<>(),
+ newargs = new ArrayList<>();
oldargs.addAll(preset.getArguments());
// need to compare parameters
for (ArgumentI newparg : pr.getArguments())
: JabaParamStore.getJwsArgsfromJaba(jobArgset);
}
+ @Override
public String getWsParamFile()
{
List<Option> opts = null;
@Override
public String getServiceURI()
{
- return service.getServiceTypeURI();
+ return service.getNameURI();
}
@Override
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.util.MessageManager;
+import jalview.ws.api.UIinfo;
import jalview.ws.jws2.JabaParamStore;
import jalview.ws.jws2.MsaWSClient;
import jalview.ws.jws2.SequenceAnnotationWSClient;
import compbio.metadata.PresetManager;
import compbio.metadata.RunnerConfig;
-public class Jws2Instance
+public class Jws2Instance extends UIinfo
{
public String hosturl;
- public String serviceType;
-
- public String action;
-
public JABAService service;
- public String description;
-
public String docUrl;
/**
public Jws2Instance(String hosturl, String serviceType, String action,
String description, JABAService service)
{
- super();
+ super(action, action, serviceType, description);
this.hosturl = hosturl;
- this.serviceType = serviceType;
this.service = service;
- this.action = action;
- this.description = description;
int p = description.indexOf("MORE INFORMATION:");
if (p > -1)
{
} catch (Exception ex)
{
System.err.println("Exception when retrieving presets for service "
- + serviceType + " at " + hosturl);
+ + getServiceType() + " at " + hosturl);
}
}
return presets;
*/
public String getActionText()
{
- return action + " with " + serviceType;
+ return getAction() + " with " + getServiceType();
}
/**
throw new Error(MessageManager.formatMessage(
"error.implementation_error_runner_config_not_available",
new String[]
- { serviceType, service.getClass().toString() }));
+ { getServiceType(), service.getClass().toString() }));
}
@Override
return hosturl
+ (hosturl.lastIndexOf("/") == (hosturl.length() - 1) ? ""
: "/")
- + serviceType;
+ + getServiceType();
}
private boolean hasParams = false, lookedForParams = false;
}
}
- public String getServiceTypeURI()
+ public String getNameURI()
{
- return "java:" + serviceType;
+ return "java:" + getName();
}
jalview.ws.uimodel.AlignAnalysisUIText aaui;
{
WebServiceJobTitle = MessageManager
.formatMessage("label.webservice_job_title", new String[]
- { service.details.Action, service.details.Name });
- WebServiceName = service.details.Name;
+ { service.details.getAction(), service.details.getName() });
+ WebServiceName = service.details.getName();
WebServiceReference = "No reference - go to url for more info";
- if (service.details.description != null)
+ if (service.details.getDescription() != null)
{
- WebServiceReference = service.details.description;
+ WebServiceReference = service.details.getDescription();
}
if (!headless)
{
public void attachWSMenuEntry(final JMenu wsmenu,
final AlignFrame alignFrame)
{
- JMenuItem submit = new JMenuItem(service.details.Name);
+ JMenuItem submit = new JMenuItem(service.details.getName());
submit.setToolTipText(MessageManager
.formatMessage("label.rest_client_submit", new String[]
- { service.details.Action, service.details.Name }));
+ { service.details.getAction(), service.details.getName() }));
submit.addActionListener(new ActionListener()
{
String action = "Analysis",
description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)",
name = MessageManager.getString("label.multiharmony");
- Hashtable<String, InputType> iparams = new Hashtable<String, InputType>();
+ Hashtable<String, InputType> iparams = new Hashtable<>();
jalview.ws.rest.params.JobConstant toolp;
// toolp = new jalview.ws.rest.JobConstant("tool","jalview");
// iparams.put(toolp.token, toolp);
{
if (services == null)
{
- services = new Vector<String>();
+ services = new Vector<>();
try
{
for (RestServiceDescription descr : RestServiceDescription
public String getAction()
{
- return service.details.Action;
+ return service.details.getAction();
}
public RestServiceDescription getRestDescription()
public static Vector<String> getRsbsDescriptions()
{
- Vector<String> rsbsDescrs = new Vector<String>();
+ Vector<String> rsbsDescrs = new Vector<>();
for (RestClient rsbs : getRestClients())
{
rsbsDescrs.add(rsbs.getRestDescription().toString());
if (rsbsUrls != null)
{
// TODO: consider validating services ?
- services = new Vector<String>(rsbsUrls);
+ services = new Vector<>(rsbsUrls);
StringBuffer sprop = new StringBuffer();
for (String s : services)
{
/**
* alignment panels derived from each alignment set returned by service.
*/
- ArrayList<jalview.gui.AlignmentPanel> destPanels = new ArrayList<jalview.gui.AlignmentPanel>();
+ ArrayList<jalview.gui.AlignmentPanel> destPanels = new ArrayList<>();
/**
* list of instructions for how to process each distinct alignment set
* returned by the job set
*/
- ArrayList<AddDataTo> resultDest = new ArrayList<AddDataTo>();
+ ArrayList<AddDataTo> resultDest = new ArrayList<>();
/**
* when false, zeroth pane is panel derived from input deta.
*/
boolean vsepjobs = restClient.service.isVseparable();
// total number of distinct alignment sets generated by job set.
int numAlSets = 0, als = 0;
- List<AlignmentI> destAls = new ArrayList<AlignmentI>();
- List<jalview.datamodel.HiddenColumns> destColsel = new ArrayList<jalview.datamodel.HiddenColumns>();
- List<List<NewickFile>> trees = new ArrayList<List<NewickFile>>();
+ List<AlignmentI> destAls = new ArrayList<>();
+ List<jalview.datamodel.HiddenColumns> destColsel = new ArrayList<>();
+ List<List<NewickFile>> trees = new ArrayList<>();
do
{
if (alset.trees != null)
{
- trees.add(new ArrayList<NewickFile>(alset.trees));
+ trees.add(new ArrayList<>(alset.trees));
}
else
{
*/
int vrestjob = 0;
// Destination alignments for all result data.
- ArrayList<SequenceGroup> visgrps = new ArrayList<SequenceGroup>();
- Hashtable<String, SequenceGroup> groupNames = new Hashtable<String, SequenceGroup>();
+ ArrayList<SequenceGroup> visgrps = new ArrayList<>();
+ Hashtable<String, SequenceGroup> groupNames = new Hashtable<>();
ArrayList<AlignmentAnnotation> visAlAn = null;
for (nvertsep = 0; nvertsep < nvertseps; nvertsep++)
{
}
if (visAlAn == null)
{
- visAlAn = new ArrayList<AlignmentAnnotation>();
+ visAlAn = new ArrayList<>();
}
AlignmentAnnotation visan = null;
for (AlignmentAnnotation v : visAlAn)
HiddenColumns destcs;
String alTitle = MessageManager
.formatMessage("label.webservice_job_title_on", new String[]
- { restClient.service.details.Action,
- restClient.service.details.Name, restClient.viewTitle });
+ { restClient.service.details.getAction(),
+ restClient.service.details.getName(),
+ restClient.viewTitle });
switch (action)
{
case newAlignment:
*/
public boolean isValid()
{
- ArrayList<String> _warnings = new ArrayList<String>();
+ ArrayList<String> _warnings = new ArrayList<>();
boolean validt = true;
if (jobs != null)
{
boolean vseparable, char gapCharacter)
{
super();
- this.details = new UIinfo(action, name, description);
+ this.details = new UIinfo(action, action, name, description);
this.postUrl = postUrl == null ? "" : postUrl;
this.urlSuffix = urlSuffix == null ? "" : urlSuffix;
if (inputParams != null)
{
p++;
}
- details = new UIinfo(list[p + 1], list[p], list[p + 2]);
+ details = new UIinfo(list[p + 1], list[p + 1], list[p], list[p + 2]);
invalid |= !configureFromServiceInputProperties(list[p + 3], warnings);
if (list.length - p > 5 && list[p + 5] != null
&& list[p + 5].trim().length() > 5)