Last update: 2011-06-23

org.proteios.core
Class Modification<D extends ModificationData>

java.lang.Object
  extended by org.proteios.core.BasicItem<D>
      extended by org.proteios.core.OwnedItem<D>
          extended by org.proteios.core.SharedItem<D>
              extended by org.proteios.core.CommonItem<D>
                  extended by org.proteios.core.Modification<D>
All Implemented Interfaces:
AccessControlled, Identifiable, Nameable, Ownable, Removable, Shareable
Direct Known Subclasses:
ObservedModification, SearchModification

public abstract class Modification<D extends ModificationData>
extends CommonItem<D>

This is the base class for for the two types of Modifications: ObservedModification and SearchModification.

Version:
2.0
Author:
Fredrik

Field Summary
static int MAX_CVID_LENGTH
          The maximum length of the CV ID that can be saved in the database.
static int MAX_DIFF_FORMULA_LENGTH
          The maximum length of the formula that can be stored in the database.
 
Fields inherited from interface org.proteios.core.Nameable
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
 
Method Summary
 float getAverageDeltaMass()
           
 float getAverageMass()
           
 String getCvId()
          Get the controlled vocabulary ID of the modification.
 String getDiffFormula()
          Get the differential chemical formula of the modification.
 double getMonoisotopicDeltaMass()
           
 double getMonoisotopicMass()
           
 int getPosition()
           
 boolean isSubstitutionModification()
           
 void setAverageDeltaMass(float averageDeltaMass)
           
 void setAverageMass(float averageMass)
           
 void setCvId(String cvId)
          Set the CV ID of the Modification.
 void setDiffFormula(String diffFormula)
          Set the differential chemical formula of the Modification.
 void setMonoisotopicDeltaMass(double monoisotopicDeltaMass)
           
 void setMonoisotopicMass(double monoisotopicMass)
           
 void setPosition(int position)
           
 void setSubstitutionModification(boolean substitutionModification)
           
 
Methods inherited from class org.proteios.core.CommonItem
getDescription, getName, isRemoved, setDescription, setName, setRemoved
 
Methods inherited from class org.proteios.core.SharedItem
getItemKey, getProjectKey, isShared, setItemKey, setProjectKey
 
Methods inherited from class org.proteios.core.OwnedItem
getOwner, setOwner
 
Methods inherited from class org.proteios.core.BasicItem
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.proteios.core.Identifiable
getId, getType, getVersion
 
Methods inherited from interface org.proteios.core.AccessControlled
checkPermission, hasPermission
 
Methods inherited from interface org.proteios.core.Ownable
getOwner, setOwner
 

Field Detail

MAX_DIFF_FORMULA_LENGTH

public static final int MAX_DIFF_FORMULA_LENGTH
The maximum length of the formula that can be stored in the database.

See Also:
setDiffFormula(String), Constant Field Values

MAX_CVID_LENGTH

public static final int MAX_CVID_LENGTH
The maximum length of the CV ID that can be saved in the database.

See Also:
Constant Field Values
Method Detail

isSubstitutionModification

public boolean isSubstitutionModification()
Returns:
Returns the substitutionModififcation flag

setSubstitutionModification

public void setSubstitutionModification(boolean substitutionModification)
Parameters:
substitutionModification - Whether the modification is an amino acid substitution.

getPosition

public int getPosition()
Returns:
Returns the position index.

setPosition

public void setPosition(int position)
Parameters:
position - The position index to set.

getAverageMass

public float getAverageMass()
Returns:
Returns the average mass.

setAverageMass

public void setAverageMass(float averageMass)
Parameters:
averageMass - The averageMass index to set.

getAverageDeltaMass

public float getAverageDeltaMass()
Returns:
Returns the average delta mass.

setAverageDeltaMass

public void setAverageDeltaMass(float averageDeltaMass)
Parameters:
averageDeltaMass - The averageDeltaMass index to set.

getMonoisotopicMass

public double getMonoisotopicMass()
Returns:
Returns the monoisotopic mass.

setMonoisotopicMass

public void setMonoisotopicMass(double monoisotopicMass)
Parameters:
monoisotopicMass - The monoisotopicMass index to set.

getMonoisotopicDeltaMass

public double getMonoisotopicDeltaMass()
Returns:
Returns the monoisotopic delta mass.

setMonoisotopicDeltaMass

public void setMonoisotopicDeltaMass(double monoisotopicDeltaMass)
Parameters:
monoisotopicDeltaMass - The monoisotopicDeltaMass index to set.

getDiffFormula

public String getDiffFormula()
Get the differential chemical formula of the modification.

Returns:
The formula for the modification

setDiffFormula

public void setDiffFormula(String diffFormula)
                    throws PermissionDeniedException,
                           InvalidDataException
Set the differential chemical formula of the Modification. The value may be null but must not be longer than the value specified by the MAX_DIFF_FORMULA_LENGTH constant.

Parameters:
diffFormula - String The new value for the formula
Throws:
PermissionDeniedException - If the logged in user doesn't have write permission
InvalidDataException - If the string is too long

getCvId

public String getCvId()
Get the controlled vocabulary ID of the modification.

Returns:
The CV ID for the modification

setCvId

public void setCvId(String cvId)
             throws PermissionDeniedException,
                    InvalidDataException
Set the CV ID of the Modification. The value may be null but must not be longer than the value specified by the MAX_CVID_LENGTH constant.

Parameters:
cvId - The new CV ID
Throws:
PermissionDeniedException - If the logged in user doesn't have write permission
InvalidDataException - If the string is too long

Last update: 2011-06-23