- /**
- * DB query returns an alignment for each accession provided.
- */
- public static final Object ALIGNMENTDB = "ALIGNMENTS";
+static {
+ // BH 2019.01.25 trying to speed this up
+ String s = ";";
+ for (int i = PROTEINDBS.length; --i >= 0;)
+ s += PROTEINDBS[i] + ";";
+ PROTEINDBSKEYS = s;
+
+ s = ";";
+ for (int i = DNACODINGDBS.length; --i >= 0;)
+ s += DNACODINGDBS[i] + ";";
+ DNACODINGDBSKEYS = s;
+
+ PROMTYPES = new String[] { null, ";" + UNIPROT + ";", ";" + ENSEMBL + ";" , ";" + UNIPROT + ";" + ENSEMBL + ";" };
+}
+
+ public static String[] allSourcesFromReflection;
+
+ public static String[] allSources()
+
+ {
+ /**
+ * @j2sNative
+ *
+ * return C$.allTypes;
+ *
+ */
+
+ {
+ if (allSourcesFromReflection == null)
+ {
+ List<String> src = new ArrayList<>();
+ for (Field f : DBRefSource.class.getFields())
+ {
+ if (String.class.equals(f.getType()))
+ {
+ try
+ {
+ src.add((String) f.get(null));
+ } catch (Exception x)
+ {
+ x.printStackTrace();
+ }
+ }
+ }
+ allSourcesFromReflection = src.toArray(new String[0]);
+ }
+ return allSourcesFromReflection;
+ }
+ }
+
+