Last update: 2011-06-23

org.proteios.core
Class PeakListSet

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<PeakListSetData>
                      extended by org.proteios.core.PeakListSet
All Implemented Interfaces:
AccessControlled, Annotatable, Identifiable, Nameable, Ownable, Removable, Shareable

public class PeakListSet
extends AnnotatedItem<PeakListSetData>

This class represent peaklistset items. A peaklistset has information about the peak lists in an experiment.

Version:
2.0
Author:
Olle
Last modified
$Date: 2006-05-31 12:33:12Z $

Field Summary
static Item TYPE
          The type of item represented by this class.
 
Fields inherited from interface org.proteios.core.Nameable
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
 
Method Summary
 void addDataProcessingStep(DataProcessingStep dp)
          Add a DataProcessingStep
 void addPeakList(PeakList peakList)
           
 List<HardwareConfiguration> getAnalyzers()
          Get the HardwareConfiguration analyzers list.
 Set<Annotatable> getAnnotatableParents()
          Always null.
static PeakListSet getById(DbControl dc, int id)
          Get a PeakListSet item when you know the id.
 List<DataProcessingStep> getDataProcessingStepList()
          Get the DataProcessingStep dataProcessingStepList.
 HardwareConfiguration getDetector()
          Get the HardwareConfiguration detector.
 Hardware getInstrument()
          Get the Hardware instrument.
 HardwareConfiguration getIonisationSource()
          Get the HardwareConfiguration ionisationSource.
 InstrumentConfiguration getOtherInstrumentInfo()
          Get the InstrumentConfiguration otherInstrumentInfo.
 List<PeakList> getPeakListArrayList()
          Get the PeakList peakListArrayList.
 ItemQuery<PeakList> getPeakListsQuery()
          Get a query that returns all PeakList items created from this peaklistset.
static ItemQuery<PeakListSet> getQuery()
          Get a query that returns peaklistset items.
 Sample getSample()
          Get the Sample /** Get the Sample
 File getSourceFile()
          Get the File sourceFile.
 Set<SpectrumSearch> getSpectrumSearches()
           
 Item getType()
          Get the type of item represented by the object.
 boolean isUsed()
          Check if this item is used by some other item.
 void setAnalyzers(List<HardwareConfiguration> analyzers)
          Set the HardwareConfiguration analyzers.
 void setDataProcessingStepList(List<DataProcessingStep> dataProcessingStepList)
          Set the DataProcessingStep dataProcessingStepList.
 void setDetector(HardwareConfiguration detector)
          Set the HardwareConfiguration detector.
 void setInstrument(Hardware instrument)
          Set the Hardware instrument.
 void setIonisationSource(HardwareConfiguration ionisationSource)
          Set the HardwareConfiguration ionisationSource.
 void setOtherInstrumentInfo(InstrumentConfiguration otherInstrumentInfo)
          Set the InstrumentConfiguration otherInstrumentInfo.
 void setPeakListArrayList(List<PeakList> peakListArrayList)
          Set the PeakList peakListArrayList.
 void setSample(Sample sample)
          Set the Sample
 void setSourceFile(File sourceFile)
          Set the File sourceFile.
 void setSpectrumSearches(Set<SpectrumSearch> spectrumSearches)
          Set the SpectrumSearch spectrumSearches set.
 
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, 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, getVersion
 
Methods inherited from interface org.proteios.core.AccessControlled
checkPermission, hasPermission
 
Methods inherited from interface org.proteios.core.Ownable
getOwner, setOwner
 

Field Detail

TYPE

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

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

getById

public static PeakListSet getById(DbControl dc,
                                  int id)
                           throws ItemNotFoundException,
                                  BaseException
Get a PeakListSet 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 PeakListSet item
Throws:
ItemNotFoundException - If an item with the specified id is not found
BaseException - If there is another error

getQuery

public static ItemQuery<PeakListSet> getQuery()
Get a query that returns peaklistset 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

getPeakListsQuery

public ItemQuery<PeakList> getPeakListsQuery()
Get a query that returns all PeakList items created from this peaklistset.

Returns:
An ItemQuery object

getSample

public Sample getSample()
                 throws BaseException
Get the Sample /** Get the Sample

Returns:
A Sample object
Throws:
BaseException - If there is another error

setSample

public void setSample(Sample sample)
               throws InvalidDataException
Set the Sample

Parameters:
sample - The new Sample item
Throws:
InvalidDataException - If the sample is null
BaseException - If there is another error

getOtherInstrumentInfo

public InstrumentConfiguration getOtherInstrumentInfo()
                                               throws BaseException
Get the InstrumentConfiguration otherInstrumentInfo.

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

setOtherInstrumentInfo

public void setOtherInstrumentInfo(InstrumentConfiguration otherInstrumentInfo)
                            throws InvalidDataException
Set the InstrumentConfiguration otherInstrumentInfo.

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

getAnalyzers

public List<HardwareConfiguration> getAnalyzers()
                                         throws ItemNotFoundException,
                                                BaseException
Get the HardwareConfiguration analyzers list.

Returns:
A HardwareConfiguration object
Throws:
BaseException - If there is another error
ItemNotFoundException

setAnalyzers

public void setAnalyzers(List<HardwareConfiguration> analyzers)
                  throws InvalidDataException
Set the HardwareConfiguration analyzers.

Parameters:
analyzers - The new HardwareConfiguration list item
Throws:
InvalidDataException - If analyzers hardware not equal to instrument hardware
BaseException - If there is another error

getDetector

public HardwareConfiguration getDetector()
                                  throws BaseException
Get the HardwareConfiguration detector.

Returns:
A HardwareConfiguration object
Throws:
BaseException - If there is another error

setDetector

public void setDetector(HardwareConfiguration detector)
                 throws InvalidDataException
Set the HardwareConfiguration detector.

Parameters:
detector - The new HardwareConfiguration item
Throws:
InvalidDataException - If detector hardware not equal to instrument hardware
BaseException - If there is another error

getInstrument

public Hardware getInstrument()
                       throws BaseException
Get the Hardware instrument.

Returns:
A Hardware object
Throws:
BaseException - If there is another error

setInstrument

public void setInstrument(Hardware instrument)
                   throws InvalidDataException
Set the Hardware instrument.

Parameters:
instrument - The new Hardware item
Throws:
InvalidDataException - If instrument is null
BaseException - If there is another error

getIonisationSource

public HardwareConfiguration getIonisationSource()
                                          throws BaseException
Get the HardwareConfiguration ionisationSource.

Returns:
A HardwareConfiguration object
Throws:
BaseException - If there is another error

setIonisationSource

public void setIonisationSource(HardwareConfiguration ionisationSource)
                         throws InvalidDataException
Set the HardwareConfiguration ionisationSource.

Parameters:
ionisationSource - The new HardwareConfiguration item
Throws:
InvalidDataException - If ionisationSource hardware not equal to instrument hardware
BaseException - If there is another error

getSourceFile

public File getSourceFile()
                   throws BaseException
Get the File sourceFile.

Returns:
A File object
Throws:
BaseException - If there is another error

setSourceFile

public void setSourceFile(File sourceFile)
                   throws InvalidDataException
Set the File sourceFile.

Parameters:
sourceFile - The new File item
Throws:
InvalidDataException - If sourceFile is null
BaseException - If there is another error

getDataProcessingStepList

public List<DataProcessingStep> getDataProcessingStepList()
                                                   throws ItemNotFoundException,
                                                          BaseException
Get the DataProcessingStep dataProcessingStepList.

Returns:
A DataProcessingStep list object
Throws:
BaseException - If there is another error
ItemNotFoundException

setDataProcessingStepList

public void setDataProcessingStepList(List<DataProcessingStep> dataProcessingStepList)
                               throws InvalidDataException
Set the DataProcessingStep dataProcessingStepList.

Parameters:
dataProcessingStepList - The new DataProcessingStep list item
Throws:
BaseException - If there is another error
InvalidDataException

addDataProcessingStep

public void addDataProcessingStep(DataProcessingStep dp)
Add a DataProcessingStep

Parameters:
dp - The DataProcessingStep to add to the List

getSpectrumSearches

public Set<SpectrumSearch> getSpectrumSearches()
                                        throws ItemNotFoundException,
                                               BaseException
Returns:
Returns the spectrumSearches.
Throws:
ItemNotFoundException
BaseException

setSpectrumSearches

public void setSpectrumSearches(Set<SpectrumSearch> spectrumSearches)
Set the SpectrumSearch spectrumSearches set.

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

getPeakListArrayList

public List<PeakList> getPeakListArrayList()
                                    throws ItemNotFoundException,
                                           BaseException
Get the PeakList peakListArrayList. It is a set in the database, but will be returned as a sorted list in ascending spectrumId order

Returns:
A PeakList list object
Throws:
BaseException - If there is another error
ItemNotFoundException

setPeakListArrayList

public void setPeakListArrayList(List<PeakList> peakListArrayList)
                          throws InvalidDataException
Set the PeakList peakListArrayList. Observe that it is a set in the database

Parameters:
peakListArrayList - The new PeakList list item
Throws:
BaseException - If there is another error
InvalidDataException

addPeakList

public void addPeakList(PeakList peakList)

isUsed

public boolean isUsed()
               throws BaseException
Description copied from class: BasicItem
Check if this item is used by some other item. With used we mean that another item is linking to this item in way that prevents this item from beeing deleted. Ie. if we tried to delete an item that is used, we would get a foreign key violation error from the database.

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

Last update: 2011-06-23