/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
- *
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
+ * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
/**
* Adds a new AlignmentAnnotation to this alignment
+ * @note Care should be taken to ensure that annotation is at
+ * least as wide as the longest sequence in the alignment
+ * for rendering purposes.
*/
public void addAnnotation(AlignmentAnnotation aa);
/**
public void setAnnotationIndex(AlignmentAnnotation aa, int index);
/**
- * Deletes a specific AlignmentAnnotation from the alignment.
- *
+ * Deletes a specific AlignmentAnnotation from the alignment,
+ * and removes its reference from any SequenceI object's annotation
+ * if and only if aa is contained within the alignment's annotation
+ * vector. Otherwise, it will do nothing.
+ *
* @param aa the annotation to delete
+ * @return true if annotation was deleted from this alignment.
*/
- public void deleteAnnotation(AlignmentAnnotation aa);
+ public boolean deleteAnnotation(AlignmentAnnotation aa);
/**
* Get the annotation associated with this alignment
/**
* Set the associated dataset for the alignment, or create one.
- * @param dataset The dataset alignment or null to construct one.
+ * @param dataset The dataset alignment or null to construct one.
*/
public void setDataset(Alignment dataset);
* @return CigarArray
*/
public CigarArray getCompactAlignment();
+
+ /**
+ * Set an arbitrary key value pair for an alignment.
+ * Note: both key and value objects should return a
+ * meaningful, human readable response to .toString()
+ * @param key
+ * @param value
+ */
+ public void setProperty(Object key, Object value);
+ /**
+ * Get a named property from the alignment.
+ * @param key
+ * @return value of property
+ */
+ public Object getProperty(Object key);
+ /**
+ * Get the property hashtable.
+ * @return hashtable of alignment properties (or null if none are defined)
+ */
+ public Hashtable getProperties();
+
+ /**
+ * add a reference to a frame of aligned codons for this alignment
+ * @param codons
+ */
+ public void addCodonFrame(AlignedCodonFrame codons);
+ /**
+ * remove a particular codon frame reference from this alignment
+ * @param codons
+ * @return true if codon frame was removed.
+ */
+ public boolean removeCodonFrame(AlignedCodonFrame codons);
+ /**
+ * get all codon frames associated with this alignment
+ * @return
+ */
+ public AlignedCodonFrame[] getCodonFrames();
+ /**
+ * get a particular codon frame
+ * @param index
+ * @return
+ */
+ public AlignedCodonFrame getCodonFrame(int index);
+ /**
+ * get codon frames involving sequenceI
+ */
+ public AlignedCodonFrame[] getCodonFrame(SequenceI seq);
+ /**
+ * find sequence with given name in alignment
+ * @param token name to find
+ * @param b true implies that case insensitive matching will <em>also</em> be tried
+ * @return matched sequence or null
+ */
+ public SequenceI findName(String token, boolean b);
+ /**
+ * find next sequence with given name in alignment starting after a given sequence
+ * @param startAfter the sequence after which the search will be started (usually the result of the last call to findName)
+ * @param token name to find
+ * @param b true implies that case insensitive matching will <em>also</em> be tried
+ * @return matched sequence or null
+ */
+ public SequenceI findName(SequenceI startAfter, String token, boolean b);
+
}