X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=d52e0497aa7f52b5a3c7092328c53c134cc93aa5;hb=6b2dfe29409d0064c70554cd95fde1f610741419;hp=e0a9d35629542116562095a1f2d17f5897100ceb;hpb=0b573ed90b14079f7326281f50c0c9cffdace586;p=jalview.git diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index e0a9d35..d52e049 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -523,6 +523,7 @@ public class Sequence extends ASequence implements SequenceI public void setStart(int start) { this.start = start; + sequenceChanged(); } /** @@ -1798,13 +1799,30 @@ public class Sequence extends ASequence implements SequenceI public List getAlignmentAnnotations(String calcId, String label) { + return getAlignmentAnnotations(calcId, label, null, true); + } + + @Override + public List getAlignmentAnnotations(String calcId, + String label, String description) + { + return getAlignmentAnnotations(calcId, label, description, false); + } + + private List getAlignmentAnnotations(String calcId, + String label, String description, boolean ignoreDescription) + { List result = new ArrayList<>(); if (this.annotation != null) { for (AlignmentAnnotation ann : annotation) { - if (ann.calcId != null && ann.calcId.equals(calcId) - && ann.label != null && ann.label.equals(label)) + if ((ann.calcId != null && ann.calcId.equals(calcId)) + && (ann.label != null && ann.label.equals(label)) + && ((ignoreDescription && description == null) + || (ann.description != null + && ann.description.equals(description)))) + { result.add(ann); }