Last update: 2011-06-23

org.proteios.core
Class Precursor

java.lang.Object
  extended by org.proteios.core.BasicItem<PrecursorData>
      extended by org.proteios.core.Precursor
All Implemented Interfaces:
AccessControlled, Identifiable

public class Precursor
extends BasicItem<PrecursorData>

This class represent precursor items. A precursor item has information about the precursor in a 2-D mass spectrometry experiment.

Version:
2.0
Author:
Olle
Last modified
$Date: 2006-06-02 12:33:12Z $

Field Summary
static Item TYPE
          The type of item represented by this class.
 
Method Summary
 InstrumentConfiguration getActivation()
          Get the InstrumentConfiguration activation.
 Set<Annotatable> getAnnotatableParents()
          Always null.
 AnnotationSet getAnnotationSet()
           
static Precursor getById(DbControl dc, int id)
          Get a Precursor item when you know the id.
 int getChargeState()
          Get the chargeState
 Float getIntensity()
          Get the precursor intensity.
 InstrumentConfiguration getIonSelection()
          Get the InstrumentConfiguration ionSelection.
 Float getMassToChargeRatio()
          Get the mass to charge ratio.
 int getMsLevel()
          Get the msLevel
 PeakList getPeakList()
          Get the PeakList this precursor is created from.
static ItemQuery<Precursor> getQuery()
          Get a query that returns precursor items.
 int getSpectrumRef()
          Get the spectrumRef
 Item getType()
          Get the type of item represented by the object.
 boolean isAnnotated()
           
 boolean isUsed()
          Check that: no item has been created from this precursor
 void removeAnnotations()
           
 void setActivation(InstrumentConfiguration activation)
          Set the InstrumentConfiguration activation.
 void setChargeState(int chargeState)
          Set the chargeState.
 void setIntensity(Float intensity)
          Set the mass to charge ratio
 void setIonSelection(InstrumentConfiguration ionSelection)
          Set the InstrumentConfiguration ionSelection.
 void setMassToChargeRatio(Float massToChargeRatio)
          Set the mass to charge ratio
 void setMsLevel(int msLevel)
          Set the msLevel.
 void setPeakList(PeakList peakList)
          Set the PeakList this precursor is created from.
 void setSpectrumRef(int spectrumRef)
          Set the spectrumRef.
 
Methods inherited from class org.proteios.core.BasicItem
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final Item TYPE
The type of item represented by this class.

See Also:
Item.PROTEIOS_PRECURSOR, getType()
Method Detail

getById

public static Precursor getById(DbControl dc,
                                int id)
                         throws ItemNotFoundException,
                                BaseException
Get a Precursor item when you know the id.

Parameters:
dc - The DbControl which will be used for database access.
id - The id of the item to load
Returns:
The Precursor item
Throws:
ItemNotFoundException - If an item with the specified id is not found
BaseException - If there is another error

getQuery

public static ItemQuery<Precursor> getQuery()
Get a query that returns precursor items.

Returns:
An ItemQuery object.

getType

public Item getType()
Description copied from interface: Identifiable
Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.

Returns:
A value indicating the type of item

getAnnotatableParents

public Set<Annotatable> getAnnotatableParents()
                                       throws BaseException
Always null.

Throws:
BaseException

isUsed

public boolean isUsed()
               throws BaseException
Check that:

Specified by:
isUsed in class BasicItem<PrecursorData>
Returns:
TRUE if this item is used, FALSE otherwise
Throws:
BaseException

getActivation

public InstrumentConfiguration getActivation()
                                      throws BaseException
Get the InstrumentConfiguration activation.

Returns:
An InstrumentConfiguration object
Throws:
BaseException - If there is another error

setActivation

public void setActivation(InstrumentConfiguration activation)
                   throws InvalidDataException
Set the InstrumentConfiguration activation.

Parameters:
activation - The new InstrumentConfiguration item
Throws:
InvalidDataException - If activation is null
BaseException - If there is another error

getChargeState

public int getChargeState()
Get the chargeState

Returns:
the chargeState value

setChargeState

public void setChargeState(int chargeState)
Set the chargeState.

Parameters:
chargeState - The chargeState value

getIonSelection

public InstrumentConfiguration getIonSelection()
                                        throws BaseException
Get the InstrumentConfiguration ionSelection.

Returns:
An InstrumentConfiguration object
Throws:
BaseException - If there is another error

setIonSelection

public void setIonSelection(InstrumentConfiguration ionSelection)
                     throws InvalidDataException
Set the InstrumentConfiguration ionSelection.

Parameters:
ionSelection - The new InstrumentConfiguration item
Throws:
InvalidDataException - If ionSelection is null
BaseException - If there is another error

getMassToChargeRatio

public Float getMassToChargeRatio()
Get the mass to charge ratio.

Returns:
A Float holding the massToChargeRatio

setMassToChargeRatio

public void setMassToChargeRatio(Float massToChargeRatio)
                          throws InvalidDataException,
                                 BaseException
Set the mass to charge ratio

Parameters:
massToChargeRatio - The massToChargeRatio value
Throws:
InvalidDataException - If massToChargeRatio is below zero
BaseException

getIntensity

public Float getIntensity()
Get the precursor intensity.

Returns:
A Float holding the intensity

setIntensity

public void setIntensity(Float intensity)
                  throws InvalidDataException,
                         BaseException
Set the mass to charge ratio

Parameters:
intensity - The intensity value
Throws:
InvalidDataException - If intensity is below zero
BaseException

getMsLevel

public int getMsLevel()
Get the msLevel

Returns:
the msLevel value

setMsLevel

public void setMsLevel(int msLevel)
Set the msLevel.

Parameters:
msLevel - The msLevel value

getSpectrumRef

public int getSpectrumRef()
Get the spectrumRef

Returns:
the spectrumRef value

setSpectrumRef

public void setSpectrumRef(int spectrumRef)
Set the spectrumRef.

Parameters:
spectrumRef - The spectrumRef value

getPeakList

public PeakList getPeakList()
                     throws BaseException
Get the PeakList this precursor is created from.

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

setPeakList

public void setPeakList(PeakList peakList)
Set the PeakList this precursor is created from.

Parameters:
peakList - The new PeakList item
Throws:
BaseException - If there is another error

getAnnotationSet

public AnnotationSet getAnnotationSet()
                               throws PermissionDeniedException,
                                      BaseException
Throws:
PermissionDeniedException
BaseException

isAnnotated

public boolean isAnnotated()

removeAnnotations

public void removeAnnotations()
                       throws PermissionDeniedException,
                              BaseException
Throws:
PermissionDeniedException
BaseException

Last update: 2011-06-23