* @author JimP
*
*/
+import java.util.Locale;
+
public class DBRefSource
{
public static final String UNIPROT = "UNIPROT";
- public static final String UP_NAME = "UNIPROT_NAME".toUpperCase();
+ public static final String UP_NAME = "UNIPROT_NAME".toUpperCase(Locale.ROOT);
/**
* Uniprot Knowledgebase/TrEMBL as served from EMBL protein products.
*/
- public static final String UNIPROTKB = "UniProtKB/TrEMBL".toUpperCase();
+ public static final String UNIPROTKB = "UniProtKB/TrEMBL".toUpperCase(Locale.ROOT);
public static final String ENSEMBL = "ENSEMBL";
public static final String ENSEMBLGENOMES = "ENSEMBLGENOMES";
public static final String EMBL = "EMBL";
public static final String EMBLCDS = "EMBLCDS";
- public static final String EMBLCDSProduct = "EMBLCDSProtein".toUpperCase();
+ public static final String EMBLCDSProduct = "EMBLCDSProtein".toUpperCase(Locale.ROOT);
public static final String PDB = "PDB";
public static final String PFAM = "PFAM";
public static final String RFAM = "RFAM";
- public static final String GENEDB = "GeneDB".toUpperCase();
+ public static final String GENEDB = "GeneDB".toUpperCase(Locale.ROOT);
public static final String PDB_CANONICAL_NAME = PDB;
public static int getSourceKey(String name) {
for (int i = 0; i < MASK_COUNT; i++) {
if (name.equals(allSources[i]))
- return 1<<i;
+ {
+ return 1<<i;
+ }
}
return 0;
}
return ((PRIMARY_SOURCES_MASK & getSourceKey(source)) != 0);
}
-
-// 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;
-// }
-// }
-
public static boolean isPrimaryCandidate(String ucversion) {
// tricky - this test really needs to search the sequence's set of dbrefs to
// see if there is a primary reference that derived this reference.
for (int i = allSources.length; --i >= 0;)
{
- if (ucversion.startsWith(allSources[i])) // BH 2019.01.25 .toUpperCase() unnecessary here for allSources
+ if (ucversion.startsWith(allSources[i])) // BH 2019.01.25 .toUpperCase(Locale.ROOT) unnecessary here for allSources
{
// by convention, many secondary references inherit the primary
// reference's