X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FAlignment.java;h=b2d4f0fd652b175730375b2d6340cc54baf875bb;hb=d3a2fdc864b586b5c604335dd715ec215b679197;hp=f19d117fbdce32223cdbfb7e8e04d36154a59ded;hpb=fe6b3fb39308b5c045849db2be75ba07824be776;p=jalview.git diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index f19d117..b2d4f0f 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -20,6 +20,8 @@ */ package jalview.datamodel; +import jalview.util.MessageManager; + import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; @@ -117,7 +119,7 @@ public class Alignment implements AlignmentI */ public static AlignmentI createAlignment(CigarArray compactAlignment) { - throw new Error("Alignment(CigarArray) not yet implemented"); + throw new Error(MessageManager.getString("error.alignment_cigararray_not_implemented")); // this(compactAlignment.refCigars); } @@ -1526,32 +1528,4 @@ public class Alignment implements AlignmentI { return dataset; } - - /** - * Returns an iterable collection of annotations on this alignment which match - * the given criteria. - */ - @Override - public Iterable findAnnotation(SequenceI datasequence, - String calcId, String label) - { - List result = new ArrayList(); - for (AlignmentAnnotation ann : annotations) - { - // only sequence-linked annotations can qualify (have a datasequence) - if (ann.sequenceRef == null) - { - continue; - } - boolean matchDatasequence = (ann.sequenceRef.getDatasetSequence() == datasequence); - final String annCalcId = ann.getCalcId(); - boolean matchCalcId = (annCalcId != null && annCalcId.equals(calcId)); - boolean matchLabel = (ann.label != null && ann.label.equals(label)); - if (matchDatasequence && matchCalcId && matchLabel) - { - result.add(ann); - } - } - return result; - } }