javadoc and operator for editing AlignmentAnnotation to remove hidden columns
[jalview.git] / src / jalview / datamodel / SequenceI.java
index 731b646..2311d49 100755 (executable)
@@ -29,78 +29,70 @@ import java.util.*;
 public interface SequenceI
 {
   /**
-   * DOCUMENT ME!
+   * Set the display name for the sequence
    *
-   * @param name DOCUMENT ME!
+   * @param name 
    */
   public void setName(String name);
 
   /**
-   * DOCUMENT ME!
-   *
-   * @return DOCUMENT ME!
+   * Get the display name
    */
   public String getName();
 
   /**
-   * DOCUMENT ME!
+   * Set start position of first non-gapped symbol in sequence
    *
-   * @param start DOCUMENT ME!
+   * @param start new start position
    */
   public void setStart(int start);
 
   /**
-   * DOCUMENT ME!
-   *
-   * @return DOCUMENT ME!
+   * get start position of first non-gapped residue in sequence
+   * @return 
    */
   public int getStart();
 
   /**
-   * DOCUMENT ME!
-   *
-   * @return DOCUMENT ME!
+   * get the displayed id of the sequence
+   * @return true means the id will be returned in the form DisplayName/Start-End
    */
   public String getDisplayId(boolean jvsuffix);
 
   /**
-   * DOCUMENT ME!
-   *
-   * @param end DOCUMENT ME!
+   * set end position for last residue in sequence
+   * @param end 
    */
   public void setEnd(int end);
 
   /**
-   * DOCUMENT ME!
+   * get end position for last residue in sequence
+   * getEnd()>getStart() unless sequence only consists of gap characters
    *
-   * @return DOCUMENT ME!
+   * @return 
    */
   public int getEnd();
 
   /**
-   * DOCUMENT ME!
-   *
-   * @return DOCUMENT ME!
+   * @return length of sequence including gaps
+
    */
   public int getLength();
 
   /**
-   * DOCUMENT ME!
+   * Replace the sequence with the given string
    *
-   * @param sequence DOCUMENT ME!
+   * @param sequence new sequence string
    */
   public void setSequence(String sequence);
 
   /**
-   * DOCUMENT ME!
-   *
-   * @return DOCUMENT ME!
+   * @return sequence as string
    */
   public String getSequenceAsString();
 
   /**
-   * DOCUMENT ME!
-   *
+   * get a range on the seuqence as a string
    * @param start DOCUMENT ME!
    * @param end DOCUMENT ME!
    *
@@ -116,12 +108,12 @@ public interface SequenceI
   public char[] getSequence();
 
   /**
-   * DOCUMENT ME!
+   * get stretch of sequence characters in an array
    *
-   * @param start DOCUMENT ME!
-   * @param end DOCUMENT ME!
+   * @param start absolute index into getSequence()
+   * @param end exclusive index of last position in segment to be returned.
    *
-   * @return DOCUMENT ME!
+   * @return char[max(0,end-start)];
    */
   public char[] getSequence(int start, int end);
 
@@ -235,6 +227,11 @@ public interface SequenceI
   public Vector getPDBId();
 
   public void addPDBId(PDBEntry entry);
+  /**
+   * update the list of PDBEntrys to include any DBRefEntrys citing structural databases 
+   * @return true if PDBEntry list was modified
+   */
+  public boolean updatePDBIds();
 
   public String getVamsasId();
 
@@ -244,6 +241,12 @@ public interface SequenceI
 
   public DBRefEntry[] getDBRef();
 
+  /**
+   * add the given entry to the list of DBRefs for this sequence, 
+   * or replace a similar one if entry contains a map object 
+   * and the existing one doesnt. 
+   * @param entry
+   */
   public void addDBRef(DBRefEntry entry);
 
   public void addSequenceFeature(SequenceFeature sf);
@@ -276,5 +279,12 @@ public interface SequenceI
    * @return null or array of annotations.
    */
   public AlignmentAnnotation[] getAnnotation(String label);
+  /**
+   * 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 references on the sequence onto the dataset.
+   * @return dataset sequence for this sequence
+   */
+  public SequenceI createDatasetSequence();
 
 }