JAL-2349 reusable contact map holder for SequenceI and AnnotatedCollectionI
[jalview.git] / src / jalview / datamodel / SequenceI.java
index 7c3eb41..34dbab7 100755 (executable)
  */
 package jalview.datamodel;
 
-import jalview.datamodel.Sequence.DBModList;
-import jalview.datamodel.features.SequenceFeaturesI;
-import jalview.util.MapList;
-import jalview.ws.params.InvalidArgumentException;
-
 import java.util.BitSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
 
 import fr.orsay.lri.varna.models.rna.RNA;
+import jalview.datamodel.Sequence.DBModList;
+import jalview.datamodel.features.SequenceFeaturesI;
+import jalview.util.MapList;
+import jalview.ws.params.InvalidArgumentException;
 
 /**
  * Methods for manipulating a sequence, its metadata and related annotation in
@@ -39,7 +38,7 @@ import fr.orsay.lri.varna.models.rna.RNA;
  * @author $author$
  * @version $Revision$
  */
-public interface SequenceI extends ASequenceI
+public interface SequenceI extends ASequenceI, ContactMapHolderI
 {
   /**
    * Set the display name for the sequence
@@ -357,12 +356,13 @@ public interface SequenceI extends ASequenceI
   /**
    * set the array of Database references for the sequence.
    * 
-   * BH 2019.02.04 changes param to DBModlist 
+   * BH 2019.02.04 changes param to DBModlist
    * 
    * @param dbs
    * @deprecated - use is discouraged since side-effects may occur if DBRefEntry
    *             set are not normalised.
-   * @throws InvalidArgumentException if the is not one created by Sequence itself
+   * @throws InvalidArgumentException
+   *           if the is not one created by Sequence itself
    */
   @Deprecated
   public void setDBRefs(DBModList<DBRefEntry> dbs);
@@ -447,8 +447,8 @@ public interface SequenceI extends ASequenceI
 
   /**
    * Returns a (possibly empty) list of any annotations that match on given
-   * calcId (source), label (type) and description (observation instance).
-   * Null values do not match.
+   * calcId (source), label (type) and description (observation instance). Null
+   * values do not match.
    * 
    * @param calcId
    * @param label
@@ -456,6 +456,7 @@ public interface SequenceI extends ASequenceI
    */
   public List<AlignmentAnnotation> getAlignmentAnnotations(String calcId,
           String label, String description);
+
   /**
    * create a new dataset sequence (if necessary) for this sequence and sets
    * this sequence to refer to it. This call will move any features or
@@ -530,7 +531,8 @@ public interface SequenceI extends ASequenceI
    *          optional feature types to restrict results to
    * @return
    */
-  List<SequenceFeature> findFeatures(int fromCol, int toCol, String... types);
+  List<SequenceFeature> findFeatures(int fromCol, int toCol,
+          String... types);
 
   /**
    * Method to call to indicate that the sequence (characters or alignment/gaps)
@@ -538,7 +540,7 @@ public interface SequenceI extends ASequenceI
    * positions to be invalidated.
    */
   void sequenceChanged();
-  
+
   /**
    * 
    * @return BitSet corresponding to index [0,length) where Comparison.isGap()
@@ -570,9 +572,8 @@ public interface SequenceI extends ASequenceI
    * @param chromosomeId
    * @param map
    */
-  void setGeneLoci(String speciesId, String assemblyId,
-          String chromosomeId, MapList map);
-
+  void setGeneLoci(String speciesId, String assemblyId, String chromosomeId,
+          MapList map);
 
   /**
    * Returns the sequence string constructed from the substrings of a sequence
@@ -595,6 +596,4 @@ public interface SequenceI extends ASequenceI
    */
   public int firstResidueOutsideIterator(Iterator<int[]> it);
 
-
 }
-