git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'Jalview-BH/JAL-3026-JAL-3063-JAXB' of https://source.jalview.org/git...
[jalview.git]
/
src
/
jalview
/
datamodel
/
DBRefSource.java
diff --git
a/src/jalview/datamodel/DBRefSource.java
b/src/jalview/datamodel/DBRefSource.java
index
0ac14e5
..
47d1082
100755
(executable)
--- a/
src/jalview/datamodel/DBRefSource.java
+++ b/
src/jalview/datamodel/DBRefSource.java
@@
-25,6
+25,9
@@
import java.util.ArrayList;
import java.util.List;
/**
import java.util.List;
/**
+ * BH 2018 SwingJS note: If additional final static Strings are added to this
+ * file, they should be added to public static final String[] allTypes.
+ *
* Defines internal constants for unambiguous annotation of DbRefEntry source
* strings and describing the data retrieved from external database sources (see
* jalview.ws.DbSourcProxy) <br/>
* Defines internal constants for unambiguous annotation of DbRefEntry source
* strings and describing the data retrieved from external database sources (see
* jalview.ws.DbSourcProxy) <br/>
@@
-32,11
+35,16
@@
import java.util.List;
* (e.g. protein coding, alignment (ortholog db, paralog db, domain db),
* genomic, transcriptomic, 3D structure providing (PDB, MODBASE, etc) ..).
*
* (e.g. protein coding, alignment (ortholog db, paralog db, domain db),
* genomic, transcriptomic, 3D structure providing (PDB, MODBASE, etc) ..).
*
+ *
+ *
* @author JimP
*
*/
public class DBRefSource
{
* @author JimP
*
*/
public class DBRefSource
{
+
+
+
/**
* UNIPROT Accession Number
*/
/**
* UNIPROT Accession Number
*/
@@
-52,9
+60,9
@@
public class DBRefSource
*/
public static final String UNIPROTKB = "UniProtKB/TrEMBL".toUpperCase();
*/
public static final String UNIPROTKB = "UniProtKB/TrEMBL".toUpperCase();
- public static final String EMBLCDSProduct = "EMBLCDSProtein"
- .toUpperCase();
+ public static final String EMBLCDSProduct = "EMBLCDSProtein".toUpperCase();
+
/**
* PDB Entry Code
*/
/**
* PDB Entry Code
*/
@@
-70,6
+78,7
@@
public class DBRefSource
*/
public static final String EMBLCDS = "EMBLCDS";
*/
public static final String EMBLCDS = "EMBLCDS";
+
/**
* PFAM ID
*/
/**
* PFAM ID
*/
@@
-85,6
+94,7
@@
public class DBRefSource
*/
public static final String GENEDB = "GeneDB".toUpperCase();
*/
public static final String GENEDB = "GeneDB".toUpperCase();
+
/**
* Ensembl
*/
/**
* Ensembl
*/
@@
-92,33
+102,61
@@
public class DBRefSource
public static final String ENSEMBLGENOMES = "ENSEMBLGENOMES";
public static final String ENSEMBLGENOMES = "ENSEMBLGENOMES";
- /**
+
+ /**
* List of databases whose sequences might have coding regions annotated
*/
public static final String[] DNACODINGDBS = { EMBL, EMBLCDS, GENEDB,
* List of databases whose sequences might have coding regions annotated
*/
public static final String[] DNACODINGDBS = { EMBL, EMBLCDS, GENEDB,
- ENSEMBL };
+ 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[] 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 String[] allSourcesFromReflection;
+
public static String[] allSources()
public static String[] allSources()
+
{
{
- List<String> src = new ArrayList<String>();
- for (Field f : DBRefSource.class.getFields())
+ /**
+ * @j2sNative
+ *
+ * return C$.allTypes;
+ *
+ */
+
{
{
- if (String.class.equals(f.getType()))
+ if (allSourcesFromReflection == null)
{
{
- try
- {
- src.add((String) f.get(null));
- } catch (Exception x)
+ List<String> src = new ArrayList<>();
+ for (Field f : DBRefSource.class.getFields())
{
{
- x.printStackTrace();
+ 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;
}
}
- return src.toArray(new String[0]);
}
}
+
+
}
}