Last update: 2011-06-23

org.proteios.core
Class PolyPeptide<D extends PolyPeptideData>

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.AnnotatedItem<D>
                      extended by org.proteios.core.PolyPeptide<D>
All Implemented Interfaces:
AccessControlled, Annotatable, Identifiable, Nameable, Ownable, Removable, Shareable
Direct Known Subclasses:
Peptide, Protein

public abstract class PolyPeptide<D extends PolyPeptideData>
extends AnnotatedItem<D>

This is the base class for for the two types of polypeptide: Protein and Peptide.

Version:
2.0
Author:
Fredrik

Field Summary
static int MAX_ACCESSION_NUMBER_LENGTH
          The maximum length of the accessionNumber that can be stored in the database.
static int MAX_LSID_LENGTH
          The maximum length of the lsid that can be stored in the database.
static int MAX_SEQUENCE_LENGTH
          The maximum length of the sequence that can be stored in the database.
 
Fields inherited from interface org.proteios.core.Nameable
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
 
Method Summary
 void addObservedModification(ObservedModification modification)
          Add a Modification
 String getAccessionNumber()
          Get the accessionNumber of the polypeptide.
 String getLsid()
          Get the lsid of the polypeptide.
 Set<ObservedModification> getObservedModifications()
           
 SearchResult getSearchResult()
          Get the SearchResult this PolyPeptide is associated with.
 String getSequence()
          Get the sequence of the polypeptide.
 void setAccessionNumber(String accessionNumber)
          Set the accession number of the polypeptide.
 void setLsid(String lsid)
          Set the LSID of the polypeptide.
 void setObservedModifications(Set<ObservedModification> modifications)
          Set the ObservedModification modifications set.
 void setSearchResult(SearchResult searchResult)
          Set the SearchResult this PolyPeptide is associated with.
 void setSequence(String sequence)
          Set the sequecne of the PolyPeptide.
 
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_SEQUENCE_LENGTH

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

See Also:
setSequence(String), Constant Field Values

MAX_LSID_LENGTH

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

See Also:
setLsid(String), Constant Field Values

MAX_ACCESSION_NUMBER_LENGTH

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

See Also:
setAccessionNumber(String), Constant Field Values
Method Detail

getSequence

public String getSequence()
Get the sequence of the polypeptide.

Returns:
The sequence for the polypeptide

setSequence

public void setSequence(String sequence)
                 throws PermissionDeniedException,
                        InvalidDataException
Set the sequecne of the PolyPeptide. The value may be null but must not be longer than the value specified by the MAX_SEQUENCE_LENGTH constant.

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

getLsid

public String getLsid()
Get the lsid of the polypeptide.

Returns:
The lsid for the polypeptide

setLsid

public void setLsid(String lsid)
             throws PermissionDeniedException,
                    InvalidDataException
Set the LSID of the polypeptide. The value may be null but must not be longer than the value specified by the MAX_LSID_LENGTH constant.

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

getAccessionNumber

public String getAccessionNumber()
Get the accessionNumber of the polypeptide.

Returns:
The accessionNumber for the polypeptide

setAccessionNumber

public void setAccessionNumber(String accessionNumber)
                        throws PermissionDeniedException,
                               InvalidDataException
Set the accession number of the polypeptide. The value may be null but must not be longer than the value specified by the MAX_ACCESSION_NUMBER_LENGTH constant.

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

getSearchResult

public SearchResult getSearchResult()
                             throws BaseException
Get the SearchResult this PolyPeptide is associated with.

Returns:
The SearchResult item or null if not known
Throws:
BaseException - If there is another error

setSearchResult

public void setSearchResult(SearchResult searchResult)
                     throws BaseException
Set the SearchResult this PolyPeptide is associated with.

Parameters:
searchResult - The new SearchResult item
Throws:
BaseException - If there is another error

getObservedModifications

public Set<ObservedModification> getObservedModifications()
                                                   throws ItemNotFoundException,
                                                          BaseException
Returns:
Returns the modifications.
Throws:
ItemNotFoundException
BaseException

setObservedModifications

public void setObservedModifications(Set<ObservedModification> modifications)
Set the ObservedModification modifications set.

Parameters:
modifications - The new Set item.
Throws:
InvalidDataException - If dataProcessingStep is null
BaseException - If there is another error

addObservedModification

public void addObservedModification(ObservedModification modification)
Add a Modification

Parameters:
modification - The Search Database to add to the Set

Last update: 2011-06-23