git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into releases/Release_2_11_2_Branch
[jalview.git]
/
src
/
jalview
/
io
/
SequenceAnnotationReport.java
diff --git
a/src/jalview/io/SequenceAnnotationReport.java
b/src/jalview/io/SequenceAnnotationReport.java
index
c5bc902
..
95bd1cc
100644
(file)
--- a/
src/jalview/io/SequenceAnnotationReport.java
+++ b/
src/jalview/io/SequenceAnnotationReport.java
@@
-20,12
+20,12
@@
*/
package jalview.io;
*/
package jalview.io;
-import java.util.Locale;
-
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Collection;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import jalview.api.FeatureColourI;
import java.util.Map;
import jalview.api.FeatureColourI;
@@
-493,6
+493,7
@@
public class SequenceAnnotationReport
sb.append(tmp);
maxWidth = Math.max(maxWidth, tmp.length());
}
sb.append(tmp);
maxWidth = Math.max(maxWidth, tmp.length());
}
+ sb.append("\n");
SequenceI ds = sequence;
while (ds.getDatasetSequence() != null)
{
SequenceI ds = sequence;
while (ds.getDatasetSequence() != null)
{
@@
-503,6
+504,7
@@
public class SequenceAnnotationReport
{
maxWidth = Math.max(maxWidth, appendDbRefs(sb, ds, summary));
}
{
maxWidth = Math.max(maxWidth, appendDbRefs(sb, ds, summary));
}
+ sb.append("\n");
/*
* add non-positional features if wanted
/*
* add non-positional features if wanted
@@
-534,12
+536,19
@@
public class SequenceAnnotationReport
protected int appendDbRefs(final StringBuilder sb, SequenceI ds,
boolean summary)
{
protected int appendDbRefs(final StringBuilder sb, SequenceI ds,
boolean summary)
{
- List<DBRefEntry> dbrefs = ds.getDBRefs();
- if (dbrefs == null)
+ List<DBRefEntry> dbrefs, dbrefset = ds.getDBRefs();
+
+ if (dbrefset == null)
{
return 0;
}
{
return 0;
}
+ // PATCH for JAL-3980 defensive copy
+
+ dbrefs = new ArrayList<DBRefEntry>();
+
+ dbrefs.addAll(dbrefset);
+
// note this sorts the refs held on the sequence!
dbrefs.sort(comparator);
boolean ellipsis = false;
// note this sorts the refs held on the sequence!
dbrefs.sort(comparator);
boolean ellipsis = false;
@@
-576,7
+585,7
@@
public class SequenceAnnotationReport
countForSource++;
if (countForSource == 1 || !summary)
{
countForSource++;
if (countForSource == 1 || !summary)
{
- sb.append("<br/>");
+ sb.append("<br/>\n");
}
if (countForSource <= MAX_REFS_PER_SOURCE || !summary)
{
}
if (countForSource <= MAX_REFS_PER_SOURCE || !summary)
{
@@
-584,7
+593,7
@@
public class SequenceAnnotationReport
lineLength += accessionId.length() + 1;
if (countForSource > 1 && summary)
{
lineLength += accessionId.length() + 1;
if (countForSource > 1 && summary)
{
- sb.append(", ").append(accessionId);
+ sb.append(",\n ").append(accessionId);
lineLength++;
}
else
lineLength++;
}
else
@@
-602,11
+611,11
@@
public class SequenceAnnotationReport
}
if (moreSources)
{
}
if (moreSources)
{
- sb.append("<br/>").append(source).append(COMMA).append(ELLIPSIS);
+ sb.append("<br/>\n").append(source).append(COMMA).append(ELLIPSIS);
}
if (ellipsis)
{
}
if (ellipsis)
{
- sb.append("<br/>(");
+ sb.append("<br/>\n(");
sb.append(MessageManager.getString("label.output_seq_details"));
sb.append(")");
}
sb.append(MessageManager.getString("label.output_seq_details"));
sb.append(")");
}