001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021
022package org.biojava.bio.symbol;
023
024/** A genetic code translation table representing a translation table in the 
025 * DDBJ/EMBL/GenBank Feature Table (appendix V).
026 *
027 * @author gwaldon
028 * @since 1.5
029 */
030//PENDING a GeneticCodeTable interface that includes start codons.
031public class SimpleGeneticCodeTable extends SimpleManyToOneTranslationTable {
032    
033    private int table_num;
034    private String description;
035    
036    /** Creates a new instance of SimpleGeneticCodeTable */
037    public SimpleGeneticCodeTable(FiniteAlphabet source, FiniteAlphabet target) {
038        super(source,target);
039    }
040    
041    public void setTableNumber(int num) {
042        table_num = num;
043    }
044   
045    /**
046     * @return the value for the feature qualifier table_num  
047     * found in the DDBJ/EMBL/GenBank Feature Table. The associated
048     * feature key is CDS.
049     */
050    public int getTableNumber() {
051        return table_num;
052    }
053               
054    public void setDescription(String description) {
055        this.description = description;
056    }
057    
058    /**
059     * @return A string descripting this table, normally the one found in
060     * the DDBJ/EMBL/GenBank Feature Table.
061     */
062    public String getDescription() {
063        if(description==null)
064            return("");
065        return description;
066    }
067}