X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;fp=src%2Fjalview%2Fdatamodel%2FSequence.java;h=846b8765a829377766c484a4a3bbd06b589513f7;hb=304e64fb34b32659be1bbfd39fb4e15b2f79586e;hp=009a2909f91a61e5dc6ae9cefca97034e35bdef8;hpb=cfb79b69d9fa44595560659bd95d1d1cd27677ad;p=jalview.git diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 009a290..846b876 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -86,7 +86,6 @@ public class Sequence extends ASequence implements SequenceI HiddenMarkovModel hmm; boolean isHMMConsensusSequence = false; - private DBModList dbrefs; // controlled access /** @@ -370,7 +369,6 @@ public class Sequence extends ASequence implements SequenceI { this.hmm = new HiddenMarkovModel(seq.getHMM(), this); } - } @Override @@ -1810,14 +1808,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) { String id = ann.getCalcId(); - if (id != null && id.equals(calcId) - && ann.label != null && ann.label.equals(label)) + if ((id != null && id.equals(calcId)) + && (ann.label != null && ann.label.equals(label)) + && ((ignoreDescription && description == null) + || (ann.description != null + && ann.description.equals(description)))) { result.add(ann); } @@ -1963,7 +1977,6 @@ public class Sequence extends ASequence implements SequenceI } return false; } - /** * {@inheritDoc} */