+ public static final String PFAM = "PFAM";
+
+ /**
+ * RFAM ID
+ */
+ public static final String RFAM = "RFAM";
+
+ /**
+ * GeneDB ID
+ */
+ public static final String GENEDB = "GeneDB".toUpperCase();
+
+
+ /**
+ * Ensembl
+ */
+ public static final String ENSEMBL = "ENSEMBL";
+
+ public static final String ENSEMBLGENOMES = "ENSEMBLGENOMES";
+
+
+ /**
+ * List of databases whose sequences might have coding regions annotated
+ */
+ public static final String[] DNACODINGDBS = { EMBL, EMBLCDS, GENEDB,
+ ENSEMBL, ENSEMBLGENOMES };
+
+ public static final String[] CODINGDBS = { EMBLCDS, GENEDB, ENSEMBL };
+
+ public static final String[] PROTEINDBS = { UNIPROT, UNIPROTKB,
+ EMBLCDSProduct, ENSEMBL }; // Ensembl ENSP* entries are protein
+
+
+ public static final String[] allTypes = new String[] {
+ UNIPROT, UP_NAME, UNIPROTKB,
+ EMBLCDSProduct, PDB, EMBL,
+ EMBLCDS, PFAM, RFAM,
+ GENEDB, ENSEMBL, ENSEMBLGENOMES
+ };
+
+public static final String PROTEINDBSKEYS, DNACODINGDBSKEYS;
+
+public static final String[] PROMTYPES;
+
+
+public static final int UNIPROT_MASK = 1;
+
+public static final int ENSEMBL_MASK = 2;
+
+public static final int ALL_MASKS = UNIPROT_MASK | ENSEMBL_MASK;
+
+public static final String PDB_CANONICAL_NAME = PDB;
+
+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;
+ }
+ }
+
+