- /**
- * Returns those DBRefEntry objects whose source identifier (once converted to
- * Jalview's canonical form) is in the list of sources to search for. Returns
- * null if no matches found.
- *
- * @param dbrefs DBRefEntry objects to search
- * @param sources array of sources to select
- * @return
- */
- public static List<DBRefEntry> selectRefs(List<DBRefEntry> dbrefs, String[] sources) {
- if (dbrefs == null || sources == null) {
- return dbrefs;
- }
-
- // BH TODO
- HashSet<String> srcs = new HashSet<String>();
- for (String src : sources) {
- srcs.add(src.toUpperCase());
- }
-
- int nrefs = dbrefs.size();
- List<DBRefEntry> res = new ArrayList<DBRefEntry>();
- for (int ib = 0; ib < nrefs; ib++) {
- DBRefEntry dbr = dbrefs.get(ib);
- String source = getCanonicalName(dbr.getSource());
- if (srcs.contains(source.toUpperCase())) {
- res.add(dbr);
- }
- }
-
- if (res.size() > 0) {
- // List<DBRefEntry> reply = new DBRefEntry[res.size()];
- return res;// .toArray(reply);
- }
- return null;
+ // BH TODO (what?)
+ HashSet<String> srcs = new HashSet<String>();
+ for (String src : sources)
+ {
+ srcs.add(src.toUpperCase());