From 6e4e761693d6c876ae621e31c6cbd4f20c83f6a3 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 23 Apr 2007 11:45:34 +0000 Subject: [PATCH] remove alignmentAnnotation added --- src/jalview/datamodel/Sequence.java | 10 ++++++++++ src/jalview/datamodel/SequenceI.java | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index aaf06f1..718d72b 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -762,6 +762,16 @@ public class Sequence annotation.setSequenceRef(this); } + public void removeAlignmentAnnotation(AlignmentAnnotation annotation) + { + if(this.annotation!=null) + { + this.annotation.remove(annotation); + if(this.annotation.size()==0) + this.annotation = null; + } + } + /** * test if this is a valid candidate for another diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 44e74e2..dd92c70 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -257,6 +257,8 @@ public interface SequenceI public void addAlignmentAnnotation(AlignmentAnnotation annotation); + public void removeAlignmentAnnotation(AlignmentAnnotation annotation); + /** * Derive a sequence (using this one's dataset or as the dataset) * @return duplicate sequence with valid dataset sequence -- 1.7.10.2