From: Jim Procter Date: Tue, 22 Aug 2017 21:10:27 +0000 (+0100) Subject: JAL-2681 canonicalise DB source before fetching to avoid fetching the same ref ! X-Git-Tag: Release_2_10_3b1~142^2~4^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=065e78a9a486362e2dd3ab8b64b8fd5111d4c656;p=jalview.git JAL-2681 canonicalise DB source before fetching to avoid fetching the same ref ! --- diff --git a/src/jalview/ws/seqfetcher/ASequenceFetcher.java b/src/jalview/ws/seqfetcher/ASequenceFetcher.java index a07e88b..9284f82 100644 --- a/src/jalview/ws/seqfetcher/ASequenceFetcher.java +++ b/src/jalview/ws/seqfetcher/ASequenceFetcher.java @@ -130,11 +130,12 @@ public class ASequenceFetcher Hashtable> queries = new Hashtable<>(); for (DBRefEntry ref : refs) { - if (!queries.containsKey(ref.getSource())) + String canonical = DBRefUtils.getCanonicalName(ref.getSource()); + if (!queries.containsKey(canonical)) { - queries.put(ref.getSource(), new ArrayList()); + queries.put(canonical, new ArrayList()); } - List qset = queries.get(ref.getSource()); + List qset = queries.get(canonical); if (!qset.contains(ref.getAccessionId())) { qset.add(ref.getAccessionId());