*/
package jalview.ws.jws1;
-import jalview.bin.Instance;
+import jalview.bin.ApplicationSingletonProvider;
+import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
import jalview.gui.JvOptionPane;
import jalview.util.MessageManager;
import ext.vamsas.ServiceHandle;
import ext.vamsas.ServiceHandles;
-public class Discoverer implements Runnable
+public class Discoverer implements Runnable, ApplicationSingletonI
{
public static Discoverer getInstance()
{
- Instance j = Instance.getInstance();
- return (j.discoverer == null ? j.discoverer = new Discoverer()
- : j.discoverer);
+ return (Discoverer) ApplicationSingletonProvider.getInstance(Discoverer.class);
}
private Discoverer()
jalview.bin.Cache.log.debug("Setting default services");
d.services = new Hashtable<>();
// Muscle, Clustal and JPred.
- ServiceHandle[] defServices = { new ServiceHandle("MsaWS",
- "Edgar, Robert C. (2004), MUSCLE: multiple sequence alignment "
- + "with high accuracy and high throughput, Nucleic Acids Research 32(5), 1792-97.",
- "http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS",
- MessageManager.getString(
- "label.muscle_multiple_protein_sequence_alignment")),
- new ServiceHandle("MsaWS",
- "Katoh, K., K. Kuma, K., Toh, H., and Miyata, T. (2005) "
- + "\"MAFFT version 5: improvement in accuracy of multiple sequence alignment.\""
- + " Nucleic Acids Research, 33 511-518",
- "http://www.compbio.dundee.ac.uk/JalviewWS/services/MafftWS",
- MessageManager.getString(
- "label.mafft_multiple_sequence_alignment")),
- new ServiceHandle("MsaWS",
- "Thompson, J.D., Higgins, D.G. and Gibson, T.J. (1994) CLUSTAL W: improving the sensitivity of progressive multiple"
- + " sequence alignment through sequence weighting, position specific gap penalties and weight matrix choice."
- + " Nucleic Acids Research, 22 4673-4680",
- "http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS",
- MessageManager.getString(
- "label.clustalw_multiple_sequence_alignment")),
- new ServiceHandle("SecStrPred",
- "Drozdetskiy A, Cole C, Procter J & Barton GJ. (2015)\nJPred4: a protein secondary structure prediction server"
- + "\nNucleic Acids Research, Web Server issue (first published 15th April 2015)"
- + "\ndoi://10.1093/nar/gkv332",
- "http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred",
- "JPred Secondary Structure Prediction") };
+ ServiceHandle[] defServices = new ServiceHandle[0];
+ try
+ {
+ // BH 2020.03.18 issue with applet branch Module problem.
+ defServices = new ServiceHandle[] { new ServiceHandle("MsaWS",
+ "Edgar, Robert C. (2004), MUSCLE: multiple sequence alignment "
+ + "with high accuracy and high throughput, Nucleic Acids Research 32(5), 1792-97.",
+ "http://www.compbio.dundee.ac.uk/JalviewWS/services/MuscleWS",
+ MessageManager.getString(
+ "label.muscle_multiple_protein_sequence_alignment")),
+ new ServiceHandle("MsaWS",
+ "Katoh, K., K. Kuma, K., Toh, H., and Miyata, T. (2005) "
+ + "\"MAFFT version 5: improvement in accuracy of multiple sequence alignment.\""
+ + " Nucleic Acids Research, 33 511-518",
+ "http://www.compbio.dundee.ac.uk/JalviewWS/services/MafftWS",
+ MessageManager.getString(
+ "label.mafft_multiple_sequence_alignment")),
+ new ServiceHandle("MsaWS",
+ "Thompson, J.D., Higgins, D.G. and Gibson, T.J. (1994) CLUSTAL W: improving the sensitivity of progressive multiple"
+ + " sequence alignment through sequence weighting, position specific gap penalties and weight matrix choice."
+ + " Nucleic Acids Research, 22 4673-4680",
+ "http://www.compbio.dundee.ac.uk/JalviewWS/services/ClustalWS",
+ MessageManager.getString(
+ "label.clustalw_multiple_sequence_alignment")),
+ new ServiceHandle("SecStrPred",
+ "Drozdetskiy A, Cole C, Procter J & Barton GJ. (2015)\nJPred4: a protein secondary structure prediction server"
+ + "\nNucleic Acids Research, Web Server issue (first published 15th April 2015)"
+ + "\ndoi://10.1093/nar/gkv332",
+ "http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred",
+ "JPred Secondary Structure Prediction") };
+ } catch (Throwable e)
+ {
+
+ }
d.services = new Hashtable<>();
d.serviceList = new Vector<>();
buildServiceLists(defServices, d.serviceList, d.services);