X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FSequenceAnnotationReport.java;h=2381ecf721152c8a1eecafcb03bf113092e7eb11;hb=17e4ea278bc9a5fb280db1252ce78b7a295215f5;hp=dd09d0374679e714409a33c1c94430b16e9c9c4b;hpb=fa2429b3c8cd5eb56c4a56572af6e9c4adc916c9;p=jalview.git diff --git a/src/jalview/io/SequenceAnnotationReport.java b/src/jalview/io/SequenceAnnotationReport.java index dd09d03..2381ecf 100644 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@ -53,9 +53,7 @@ public class SequenceAnnotationReport private static final int MAX_SOURCES = 40; - private static final String[][] PRIMARY_SOURCES = new String[][] { - DBRefSource.CODINGDBS, DBRefSource.DNACODINGDBS, - DBRefSource.PROTEINDBS }; + // public static final String[][] PRIMARY_SOURCES moved to DBRefSource.java final String linkImageURL; @@ -79,8 +77,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; @@ -101,20 +99,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; +// } }; public SequenceAnnotationReport(String linkURL) @@ -395,14 +393,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;