From a4c795966bb5dd6dc504129aa5e07b8e962293c9 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 10 Oct 2014 14:58:37 +0100 Subject: [PATCH] JAL-1264 reverted (removed added method) --- src/jalview/datamodel/Alignment.java | 28 ----------------------- src/jalview/datamodel/AnnotatedCollectionI.java | 17 -------------- src/jalview/datamodel/SequenceGroup.java | 24 ------------------- 3 files changed, 69 deletions(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index bfe6406..b2d4f0f 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -1528,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; - } } diff --git a/src/jalview/datamodel/AnnotatedCollectionI.java b/src/jalview/datamodel/AnnotatedCollectionI.java index 6bd4ab9..0b4c117 100644 --- a/src/jalview/datamodel/AnnotatedCollectionI.java +++ b/src/jalview/datamodel/AnnotatedCollectionI.java @@ -40,21 +40,4 @@ public interface AnnotatedCollectionI extends SequenceCollectionI * alignment, parent group). */ AnnotatedCollectionI getContext(); - - /** - * Return an iterable set of any annotations in the collection that match the - * provided criteria, i.e. - *
    - *
  • reference the same sequence datasequence
  • - *
  • have the same calcId (source of annotation)
  • - *
  • have the same label (type of annotation)
  • - *
- * - * @param datasequence - * @param calcId - * @param label - * @return - */ - Iterable findAnnotation(SequenceI datasequence, - String calcId, String label); } diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index f8fd3ee..17348c2 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -1308,28 +1308,4 @@ public class SequenceGroup implements AnnotatedCollectionI { return context; } - - @Override - public Iterable findAnnotation( - SequenceI datasequence, String calcId, String label) - { - List result = new ArrayList(); - for (AlignmentAnnotation ann : getAlignmentAnnotation()) - { - // 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; - } } -- 1.7.10.2