Merge branch 'Release_2_8_1_Branch' into JAL-1372_referenceseq
[jalview.git] / src / jalview / datamodel / Alignment.java
index 35efe4f..9cd44c3 100755 (executable)
@@ -1493,6 +1493,39 @@ public class Alignment implements AlignmentI
      hasRNAStructure = true;
    }
  }
+
+ private SequenceI seqrep=null;
+
+ /**
+  * 
+  * @return the representative sequence for this group
+  */
+ public SequenceI getSeqrep()
+ {
+   return seqrep;
+ }
+
+ /**
+  * set the representative sequence for this group. Note - this affects the
+  * interpretation of the Hidereps attribute.
+  * 
+  * @param seqrep
+  *          the seqrep to set (null means no sequence representative)
+  */
+ public void setSeqrep(SequenceI seqrep)
+ {
+   this.seqrep = seqrep;
+ }
+
+ /**
+  * 
+  * @return true if group has a sequence representative
+  */
+ public boolean hasSeqrep()
+ {
+   return seqrep != null;
+ }
+
  @Override
 public int getEndRes()
 {
@@ -1512,4 +1545,5 @@ public AnnotatedCollectionI getContext()
 {
   return dataset;
 }
+
 }