private static FTSRestClientI instance = null;
+ public static FTSRestClientI getInstance()
+ {
+
+ // BH 2019.05.08 need to isolate static fields in JavaScript
+
+ FTSRestClientI i = instance;
+ @SuppressWarnings("unused")
+ ThreadGroup g = null;
+ if (Platform.isJS())
+ {
+ g = Thread.currentThread().getThreadGroup();
+ /**
+ * @j2sNative i = g._jalviewPDBFTSRestClientInstance;
+ *
+ */
+ }
+ if (i == null)
+ {
+ i = new PDBFTSRestClient();
+
+ if (Platform.isJS())
+ {
+ /**
+ * @j2sNative g._jalviewPDBFTSRestClientInstance = i;
+ *
+ */
+ }
+ else
+ {
+ instance = i;
+ }
+ }
+ return i;
+ }
+
public static final String PDB_SEARCH_ENDPOINT = "https://www.ebi.ac.uk/pdbe/search/pdb/select?";
protected PDBFTSRestClient()
return "/fts/pdb_data_columns.txt";
}
- public static FTSRestClientI getInstance()
- {
- if (instance == null)
- {
- instance = new PDBFTSRestClient();
- }
- return instance;
- }
-
private Collection<FTSDataColumnI> allDefaultDisplayedStructureDataColumns;
public Collection<FTSDataColumnI> getAllDefaultDisplayedStructureDataColumns()