X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=1a5072dde534ff8b4b5e7efe418af1ea61f3deb5;hb=c794c5033adeee182b03a5ea92c0a7495a29661f;hp=bf3cd454bd523a1844905a638ad12a28af989fee;hpb=3609d4b908fa64cab35f2348401baab3347188fc;p=jalview.git diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index bf3cd45..1a5072d 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -20,7 +20,6 @@ */ package jalview.io; -import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.LinkedHashMap; @@ -59,9 +58,7 @@ public class SequenceAnnotationReport private static String linkImageURL; - private static final String[][] PRIMARY_SOURCES = new String[][] { - DBRefSource.CODINGDBS, DBRefSource.DNACODINGDBS, - DBRefSource.PROTEINDBS }; + // public static final String[][] PRIMARY_SOURCES moved to DBRefSource.java /* * Comparator to order DBRefEntry by Source + accession id (case-insensitive), @@ -83,8 +80,8 @@ public class SequenceAnnotationReport } String s1 = ref1.getSource(); String s2 = ref2.getSource(); - boolean s1Primary = isPrimarySource(s1); - boolean s2Primary = isPrimarySource(s2); + boolean s1Primary = DBRefSource.isPrimarySource(s1); + boolean s2Primary = DBRefSource.isPrimarySource(s2); if (s1Primary && !s2Primary) { return -1; @@ -105,20 +102,20 @@ public class SequenceAnnotationReport return comp; } - private boolean isPrimarySource(String source) - { - for (String[] primary : PRIMARY_SOURCES) - { - for (String s : primary) - { - if (source.equals(s)) - { - return true; - } - } - } - return false; - } +// private boolean isPrimarySource(String source) +// { +// for (String[] primary : DBRefSource.PRIMARY_SOURCES) +// { +// for (String s : primary) +// { +// if (source.equals(s)) +// { +// return true; +// } +// } +// } +// return false; +// } }; private boolean forTooltip; @@ -555,14 +552,14 @@ public class SequenceAnnotationReport protected int appendDbRefs(final StringBuilder sb, SequenceI ds, boolean summary) { - DBRefEntry[] dbrefs = ds.getDBRefs(); + List dbrefs = ds.getDBRefs(); if (dbrefs == null) { return 0; } // note this sorts the refs held on the sequence! - Arrays.sort(dbrefs, comparator); + dbrefs.sort(comparator); boolean ellipsis = false; String source = null; String lastSource = null;