001    package org.jaga.individualRepresentation.proteinLocation;
002    
003    import org.jaga.definitions.*;
004    
005    /**
006     * TODO: Complete these comments.
007     *
008     * <p><u>Project:</u> JAGA - Java API for Genetic Algorithms.</p>
009     *
010     * <p><u>Company:</u> University College London and JAGA.Org
011     *    (<a href="http://www.jaga.org" target="_blank">http://www.jaga.org</a>).
012     * </p>
013     *
014     * <p><u>Copyright:</u> (c) 2004 by G. Paperin.<br/>
015     *    This program is free software; you can redistribute it and/or modify
016     *    it under the terms of the GNU General Public License as published by
017     *    the Free Software Foundation, ONLY if you include a note of the original
018     *    author(s) in any redistributed/modified copy.<br/>
019     *    This program is distributed in the hope that it will be useful,
020     *    but WITHOUT ANY WARRANTY; without even the implied warranty of
021     *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
022     *    GNU General Public License for more details.<br/>
023     *    You should have received a copy of the GNU General Public License
024     *    along with this program; if not, write to the Free Software
025     *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026     *    or see http://www.gnu.org/licenses/gpl.html</p>
027     *
028     * @author Greg Paperin (greg@jaga.org)
029     *
030     * @version JAGA public release 1.0 beta
031     */
032    
033    public class ProteinLocationClassifier implements Individual {
034    
035            private PolypeptidePattern pattern = null;
036            private Fitness fitness = null;
037            private String name = "<untitled>";
038    
039    
040            private ProteinLocationClassifier() {
041                    throw new UnsupportedOperationException("Use ProteinLocationClassifier(PolypeptidePattern pattern) instead");
042            }
043    
044            public ProteinLocationClassifier(PolypeptidePattern pattern, String name) {
045                    this.pattern = pattern;
046                    this.name = name;
047            }
048    
049            public PolypeptidePattern getPattern() {
050                    return this.pattern;
051            }
052    
053            public void setPattern(PolypeptidePattern pattern) {
054                    this.pattern = pattern;
055            }
056    
057            public Fitness getFitness() {
058                    return this.fitness;
059            }
060    
061            public void setFitness(Fitness fitness) {
062                    this.fitness = fitness;
063            }
064    
065            public String toString() {
066                    StringBuffer s = new StringBuffer("Pattern=");
067                    s.append(pattern.toString());
068                    s.append(". Fitness=");
069                    s.append(fitness.toString());
070                    s.append(".");
071                    return s.toString();
072            }
073    
074            public String getName() {
075                    return name;
076            }
077    
078            public void setName(String name) {
079                    this.name = name;
080            }
081    
082    }