+
+ @Override
+ /**
+ * returns a new array with all annotation involving this group
+ */
+ public AlignmentAnnotation[] getAlignmentAnnotation()
+ {
+ // TODO add in other methods like 'getAlignmentAnnotation(String label), etc'
+ ArrayList<AlignmentAnnotation> annot = new ArrayList<AlignmentAnnotation>();
+ for (SequenceI seq:(Vector<SequenceI>)sequences)
+ {
+ for (AlignmentAnnotation al: seq.getAnnotation())
+ {
+ if (al.groupRef==this)
+ {
+ annot.add(al);
+ }
+ }
+ }
+ if (consensus!=null)
+ {
+ annot.add(consensus);
+ }
+ if (conservation!=null)
+ {
+ annot.add(conservation);
+ }
+ return annot.toArray(new AlignmentAnnotation[0]);
+ }