X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FDBRefUtils.java;fp=src%2Fjalview%2Futil%2FDBRefUtils.java;h=203b4e7ecc50bff607be1c469cead46a39e6e33f;hb=126d3237c583c793ad78c02b8cc9e6f7bb61e146;hp=50a34fc9b5017cc4000f6d28c018b8d8a93f9a43;hpb=66f234b0514ccbe75ae8682ec400dc880c87fb19;p=jalview.git diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 50a34fc..203b4e7 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -43,9 +43,9 @@ public class DBRefUtils /* * lookup from lower-case form of a name to its canonical (standardised) form */ - private static Map canonicalSourceNameLookup = new HashMap(); + private static Map canonicalSourceNameLookup = new HashMap<>(); - private static Map dasCoordinateSystemsLookup = new HashMap(); + private static Map dasCoordinateSystemsLookup = new HashMap<>(); static { @@ -65,6 +65,8 @@ public class DBRefUtils canonicalSourceNameLookup.put("ensembl-tr", DBRefSource.ENSEMBL); canonicalSourceNameLookup.put("ensembl-gn", DBRefSource.ENSEMBL); + canonicalSourceNameLookup.put("pfam", DBRefSource.PFAM); + // Make sure we have lowercase entries for all canonical string lookups Set keys = canonicalSourceNameLookup.keySet(); for (String k : keys) @@ -97,13 +99,13 @@ public class DBRefUtils { return dbrefs; } - HashSet srcs = new HashSet(); + HashSet srcs = new HashSet<>(); for (String src : sources) { srcs.add(src.toUpperCase()); } - List res = new ArrayList(); + List res = new ArrayList<>(); for (DBRefEntry dbr : dbrefs) { String source = getCanonicalName(dbr.getSource()); @@ -218,7 +220,7 @@ public class DBRefUtils static List searchRefs(DBRefEntry[] refs, DBRefEntry entry, DbRefComp comparator) { - List rfs = new ArrayList(); + List rfs = new ArrayList<>(); if (refs == null || entry == null) { return rfs; @@ -594,7 +596,7 @@ public class DBRefUtils public static List searchRefsForSource(DBRefEntry[] dbRefs, String source) { - List matches = new ArrayList(); + List matches = new ArrayList<>(); if (dbRefs != null && source != null) { for (DBRefEntry dbref : dbRefs) @@ -644,7 +646,7 @@ public class DBRefUtils // nothing to do return; } - List selfs = new ArrayList(); + List selfs = new ArrayList<>(); { DBRefEntry[] selfArray = selectDbRefs(!sequence.isProtein(), sequence.getDBRefs()); @@ -664,11 +666,11 @@ public class DBRefUtils selfs.remove(p); } } - List toPromote = new ArrayList(); + List toPromote = new ArrayList<>(); for (DBRefEntry p : pr) { - List promType = new ArrayList(); + List promType = new ArrayList<>(); if (sequence.isProtein()) { switch (getCanonicalName(p.getSource()))