/*
 * $Id: InducedMutation.java,v 1.13 2006-04-17 19:13:46 pandyas Exp $
 *
 * $Log: not supported by cvs2svn $
 */
package gov.nih.nci.camod.domain;

import java.util.*;

public class InducedMutation extends EngineeredGene
{
    private static final long serialVersionUID = 3259235453799404851L;

    private String geneId;
    private String description;
    private Set<GeneticAlteration> geneticAlterationCollection = new TreeSet<GeneticAlteration>();
    private EnvironmentalFactor environmentalFactor;

    /**
     * @return Returns the geneticAlterationCollection.
     */
    public Set<GeneticAlteration> getGeneticAlterationCollection()
    {
        return geneticAlterationCollection;
    }

    /**
     * @param geneticAlterationCollection
     *            The geneticAlterationCollection to set.
     */
    public void setGeneticAlterationCollection(Set<GeneticAlteration> geneticAlterationCollection)
    {
        this.geneticAlterationCollection = geneticAlterationCollection;
    }

    /**
     * @param geneticAlteration
     *            The geneticAlteration to add.
     */
    public void addGeneticAlteration(GeneticAlteration geneticAlteration)
    {
        geneticAlterationCollection.add(geneticAlteration);
    }

    /**
     * @return Returns the environmentalFactor.
     */
    public EnvironmentalFactor getEnvironmentalFactor() {
        return environmentalFactor;
    }

    /**
     * @param environmentalFactor
     *            The environmentalFactor to set.
     */
    public void setEnvironmentalFactor(EnvironmentalFactor environmentalFactor) {
        this.environmentalFactor = environmentalFactor;
    }

    /* old code
     * this is not how we should do this and we should clean this up later
    public EnvironmentalFactor getEnvironmentalFactor()
    {
        if (environmentalFactorCollection.size() > 0)
            return (EnvironmentalFactor) environmentalFactorCollection.get(0);
        else
            return null;
    }
    */
    
    /*
     * @param geneticAlteration
     *            The geneticAlteration to add.
     
    public void addEnvironmentalFactor(EnvironmentalFactor environmentalFactor)
    {
        environmentalFactorCollection.add(environmentalFactor);
    }
    */
    
    /**
     * @return Returns the description.
     */
    public String getDescription()
    {
        return description;
    }

    /**
     * @param description
     *            The description to set.
     */
    public void setDescription(String description)
    {
        this.description = description;
    }

    /**
     * @return Returns the geneId.
     */
    public String getGeneId()
    {
        return geneId;
    }

    /**
     * @param geneId
     *            The geneId to set.
     */
    public void setGeneId(String geneId)
    {
        this.geneId = geneId;
    }

    /**
     * @see java.lang.Object#toString()
     */
    public String toString()
    {
        String result = super.toString() + " - ";
        result += this.getGeneId() + " - " + this.getDescription();
        return result;
    }

    public boolean equals(Object o)
    {
        if (!super.equals(o))
            return false;
        if (!(this.getClass().isInstance(o)))
            return false;
        return true;
    }

}

@@ -30,17 +30,17 @@
 va,v 1.1
-3
+4
  2006-04
@@ -45,26 +45,27 @@
 04-1
-7 19:13:46 pandyas
+9 15:05:46 georgeda
  Exp
@@ -106,16 +106,114 @@
 s2svn $%0A
+ * Revision 1.13  2006/04/17 19:13:46  pandyas%0A * caMod 2.1 OM changes and added log/id header%0A *%0A
  */%0Apack
@@ -1753,607 +1753,8 @@
    %7D
-%0A%0A    /* old code%0A     * this is not how we should do this and we should clean this up later%0A    public EnvironmentalFactor getEnvironmentalFactor()%0A    %7B%0A        if (environmentalFactorCollection.size() %3E 0)%0A            return (EnvironmentalFactor) environmentalFactorCollection.get(0);%0A        else%0A            return null;%0A    %7D%0A    */%0A    %0A    /*%0A     * @param geneticAlteration%0A     *            The geneticAlteration to add.%0A     %0A    public void addEnvironmentalFactor(EnvironmentalFactor environmentalFactor)%0A    %7B%0A        environmentalFactorCollection.add(environmentalFactor);%0A    %7D%0A    */
 %0A   

remove old code