org.proteios.core
Class Modification<D extends ModificationData>
java.lang.Object
org.proteios.core.BasicItem<D>
org.proteios.core.OwnedItem<D>
org.proteios.core.SharedItem<D>
org.proteios.core.CommonItem<D>
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. |
| Methods inherited from class org.proteios.core.BasicItem |
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, toString |
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
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