001/*
002 $Id: ModificationData.java 3207 2009-04-09 06:48:11Z gregory $
003
004 Copyright (C) 2007 Fredrik Levander, Gregory Vincic
005
006 This file is part of Proteios.
007 Available at http://www.proteios.org/
008
009 Proteios is free software; you can redistribute it and/or modify it
010 under the terms of the GNU General Public License as published by
011 the Free Software Foundation; either version 2 of the License, or
012 (at your option) any later version.
013
014 Proteios is distributed in the hope that it will be useful, but
015 WITHOUT ANY WARRANTY; without even the implied warranty of
016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017 General Public License for more details.
018
019 You should have received a copy of the GNU General Public License
020 along with this program; if not, write to the Free Software
021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
022 02111-1307, USA.
023 */
024package org.proteios.core.data;
025
026/**
027 * This class is the root class for modifications.
028 * 
029 * @author Fredrik
030 * @version 2.0
031 * @see org.proteios.core.Modification
032 * @hibernate.class table="`Modifications`" lazy="false" abstract="true"
033 *                  discriminator-value="-1"
034 * @hibernate.discriminator column="`discriminator`" type="int"
035 */
036public abstract class ModificationData
037                extends CommonData
038{
039        public ModificationData()
040        {}
041
042        private boolean substitutionModification = false;
043
044
045        /**
046         * @return Returns the substitutionModififcation flag
047         * @hibernate.property column="`substitutionModification`"
048         */
049        public boolean isSubstitutionModification()
050        {
051                return substitutionModification;
052        }
053
054
055        public void setSubstitutionModification(boolean substitutionModification)
056        {
057                this.substitutionModification = substitutionModification;
058        }
059        
060        private int position;
061
062
063        /**
064         * @return Returns the position.
065         * @hibernate.property column="`position`"
066         */
067        public int getPosition()
068        {
069                return position;
070        }
071
072
073        /**
074         * @param position The position to set.
075         */
076        public void setPosition(int position)
077        {
078                this.position = position;
079        }
080
081        public float averageMass;
082
083
084        /**
085         * @return Returns the average mass.
086         * @hibernate.property column="`averageMass`"
087         */
088        public float getAverageMass()
089        {
090                return averageMass;
091        }
092
093
094        /**
095         * @param averageMass The averageMass to set.
096         */
097        public void setAverageMass(float averageMass)
098        {
099                this.averageMass = averageMass;
100        }
101
102        public float averageDeltaMass;
103
104
105        /**
106         * @return Returns the average delta mass.
107         * @hibernate.property column="`averageDeltaMass`"
108         */
109        public float getAverageDeltaMass()
110        {
111                return averageDeltaMass;
112        }
113
114
115        /**
116         * @param averageDeltaMass The averageDeltaMass to set.
117         */
118        public void setAverageDeltaMass(float averageDeltaMass)
119        {
120                this.averageDeltaMass = averageDeltaMass;
121        }
122
123        public double monoisotopicMass;
124
125
126        /**
127         * @return Returns the monoisotopic mass.
128         * @hibernate.property column="`monoisotopicMass`"
129         */
130        public double getMonoisotopicMass()
131        {
132                return monoisotopicMass;
133        }
134
135
136        /**
137         * @param monoisotopicMass The monoisotopicMass to set.
138         */
139        public void setMonoisotopicMass(double monoisotopicMass)
140        {
141                this.monoisotopicMass = monoisotopicMass;
142        }
143
144        public double monoisotopicDeltaMass;
145
146
147        /**
148         * @return Returns the monoisotopic delta mass.
149         * @hibernate.property column="`monoisotopicDeltaMass`"
150         */
151        public double getMonoisotopicDeltaMass()
152        {
153                return monoisotopicDeltaMass;
154        }
155
156
157        /**
158         * @param monoisotopicDeltaMass The monoisotopicDeltaMass to set.
159         */
160        public void setMonoisotopicDeltaMass(double monoisotopicDeltaMass)
161        {
162                this.monoisotopicDeltaMass = monoisotopicDeltaMass;
163        }
164
165        /**
166         * Modification chemical differential formula
167         */
168        public static final int MAX_DIFF_FORMULA_LENGTH = 255;
169        
170        private String diffFormula;
171
172
173        /**
174         * Get the differential formula
175         * 
176         * @hibernate.property column="`diffFormula`" type="string" length="255"
177         *                     not-null="false"
178         */
179        public String getDiffFormula()
180        {
181                return diffFormula;
182        }
183
184
185        public void setDiffFormula(String diffFormula)
186        {
187                this.diffFormula = diffFormula;
188        }
189        
190        /**
191         * Modification Controlled vocabulary ID
192         */
193        public static final int MAX_CVID_LENGTH = 255;
194        
195        private String cvId;
196
197
198        /**
199         * Get the CV ID
200         * 
201         * @hibernate.property column="`cvId`" type="string" length="255"
202         *                     not-null="false"
203         */
204        public String getCvId()
205        {
206                return cvId;
207        }
208
209
210        public void setCvId(String cvId)
211        {
212                this.cvId = cvId;
213        }
214}