From: Jim Procter Date: Mon, 29 Aug 2016 21:10:27 +0000 (+0100) Subject: JAL-2154 canonical dbsources are lowercased before matching X-Git-Tag: Release_2_10_0~47^2~4^2~35 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=993d8ed7d398dd3f48838f8accf4a9f151bb9923;p=jalview.git JAL-2154 canonical dbsources are lowercased before matching --- diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 1965c20..52629ed 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -31,6 +31,7 @@ import java.util.HashSet; import java.util.Hashtable; import java.util.List; import java.util.Map; +import java.util.Set; import com.stevesoft.pat.Regex; @@ -64,6 +65,13 @@ public class DBRefUtils canonicalSourceNameLookup.put("ensembl-tr", DBRefSource.ENSEMBL); canonicalSourceNameLookup.put("ensembl-gn", DBRefSource.ENSEMBL); + // Make sure we have lowercase entries for all canonical string lookups + Set keys = canonicalSourceNameLookup.keySet(); + for (String k : keys) + { + canonicalSourceNameLookup.put(k.toLowerCase(), + canonicalSourceNameLookup.get(k)); + } dasCoordinateSystemsLookup.put("pdbresnum", DBRefSource.PDB); dasCoordinateSystemsLookup.put("uniprot", DBRefSource.UNIPROT);