+ public Hashtable getProperties()
+ {
+ return alignmentProperties;
+ }
+ AlignedCodonFrame[] codonFrameList=null;
+ /* (non-Javadoc)
+ * @see jalview.datamodel.AlignmentI#addCodonFrame(jalview.datamodel.AlignedCodonFrame)
+ */
+ public void addCodonFrame(AlignedCodonFrame codons)
+ {
+ if (codons==null)
+ return;
+ if (codonFrameList==null)
+ {
+ codonFrameList = new AlignedCodonFrame[] { codons };
+ return;
+ }
+ AlignedCodonFrame[] t = new AlignedCodonFrame[codonFrameList.length+1];
+ System.arraycopy(codonFrameList, 0, t, 0, codonFrameList.length);
+ t[codonFrameList.length] = codons;
+ codonFrameList = t;
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.datamodel.AlignmentI#getCodonFrame(int)
+ */
+ public AlignedCodonFrame getCodonFrame(int index)
+ {
+ return codonFrameList[index];
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.datamodel.AlignmentI#getCodonFrame(jalview.datamodel.SequenceI)
+ */
+ public AlignedCodonFrame[] getCodonFrame(SequenceI seq)
+ {
+ if (seq==null || codonFrameList==null)
+ return null;
+ Vector cframes=new Vector();
+ for (int f=0;f<codonFrameList.length; f++)
+ {
+ if (codonFrameList[f].involvesSequence(seq))
+ cframes.addElement(codonFrameList[f]);
+ }
+ if (cframes.size()==0)
+ return null;
+ AlignedCodonFrame[] cfr = new AlignedCodonFrame[cframes.size()];
+ cframes.copyInto(cfr);
+ return cfr;
+ }