Last update: 2011-06-23

org.proteios.core
Class SpectrumSearch

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

public class SpectrumSearch
extends AnnotatedItem<SpectrumSearchData>

This class represent spectrumsearch.

Version:
2.0
Author:
Fredrik
Last modified
$Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $

Field Summary
static int MAX_INPUTSPECTRUMFILENAME_LENGTH
          The maximum length of the inputSpectrumFileName string that can be stored in the database.
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 addDigestParameter(DigestParameter dp)
          Add a DigestParameter
 void addSearchDatabase(SearchDatabase db)
          Add a SearchDatabase
 void addSearchModification(SearchModification dp)
          Add a SearchModification
 void addSearchResult(SearchResult sr)
          Add a SearchResult and set the association back to this SpectrumSearch
 Date getAnalysisTime()
           
 Set<Annotatable> getAnnotatableParents()
          Always null.
 Set<DigestParameter> getDigestParameters()
           
 String getInputSpectrumFileName()
          Get the input filename of this SpectrumSearch.
 PeakListSet getPeakListSet()
          Get the PeakListSet this SpectrumSearch is associated with.
static ItemQuery<SpectrumSearch> getQuery()
          Get a query that returns spectrumsearchset items.
 File getResultFile()
          Get the result file that this spectrumsearch was generated from
 Set<SearchDatabase> getSearchDatabases()
           
 Software getSearchEngine()
          Get the earch engine Software this SpectrumSearch is associated with.
 Set<SearchModification> getSearchModifications()
           
 SortedSet<SearchResult> getSearchResults()
           
 Item getType()
          Get the type of item represented by the object.
 boolean isUsed()
          Check that: no item has been created from this peaklistset
 void setAnalysisTime(Date date)
           
 void setDigestParameters(Set<DigestParameter> digestParameters)
          Set the DigestParameter digestParameters set.
 void setInputSpectrumFileName(String inputSpectrumFileName)
          Set the inputSpectrumFileName for this SpectrumSearch item.
 void setPeakListSet(PeakListSet peakListSet)
          Set the PeakListSet this SpectrumSearch is associated with.
 void setResultFile(File resultFile)
          Set the result file
 void setSearchDatabases(Set<SearchDatabase> searchDatabases)
          Set the SearchDatabase searchDatabases set.
 void setSearchEngine(Software software)
          Set the search engine Software this SpectrumSearch is associated with.
 void setSearchModifications(Set<SearchModification> searchModifications)
          Set the SearchModification searchModifications set.
 void setSearchResults(SortedSet<SearchResult> searchResults)
          Set the SearchResult searchResults 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_SPECTRUMSEARCH, getType()

MAX_INPUTSPECTRUMFILENAME_LENGTH

public static final int MAX_INPUTSPECTRUMFILENAME_LENGTH
The maximum length of the inputSpectrumFileName string that can be stored in the database.

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

getQuery

public static ItemQuery<SpectrumSearch> getQuery()
Get a query that returns spectrumsearchset 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<SpectrumSearchData>
Returns:
TRUE if this item is used, FALSE otherwise
Throws:
BaseException

getPeakListSet

public PeakListSet getPeakListSet()
                           throws BaseException
Get the PeakListSet this SpectrumSearch is associated with.

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

setPeakListSet

public void setPeakListSet(PeakListSet peakListSet)
                    throws BaseException
Set the PeakListSet this SpectrumSearch is associated with.

Parameters:
peakListSet - The new PeakListSet item
Throws:
BaseException - If there is another error

getSearchEngine

public Software getSearchEngine()
                         throws BaseException
Get the earch engine Software this SpectrumSearch is associated with.

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

setSearchEngine

public void setSearchEngine(Software software)
                     throws BaseException
Set the search engine Software this SpectrumSearch is associated with.

Parameters:
software - The new Software item
Throws:
BaseException - If there is another error

addDigestParameter

public void addDigestParameter(DigestParameter dp)
Add a DigestParameter

Parameters:
dp - The DigestParameter to add to the Set

getDigestParameters

public Set<DigestParameter> getDigestParameters()
                                         throws ItemNotFoundException,
                                                BaseException
Returns:
Returns the digestParameters.
Throws:
ItemNotFoundException
BaseException

setDigestParameters

public void setDigestParameters(Set<DigestParameter> digestParameters)
Set the DigestParameter digestParameters set.

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

getSearchDatabases

public Set<SearchDatabase> getSearchDatabases()
                                       throws ItemNotFoundException,
                                              BaseException
Returns:
Returns the searchDatabases.
Throws:
ItemNotFoundException
BaseException

setSearchDatabases

public void setSearchDatabases(Set<SearchDatabase> searchDatabases)
Set the SearchDatabase searchDatabases set.

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

addSearchResult

public void addSearchResult(SearchResult sr)
                     throws InvalidDataException
Add a SearchResult and set the association back to this SpectrumSearch

Parameters:
sr - The Search Result to add to the SortedSet
Throws:
InvalidDataException - if the search result could not be added (probable reason=duplicate indexes)

addSearchDatabase

public void addSearchDatabase(SearchDatabase db)
Add a SearchDatabase

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

getSearchResults

public SortedSet<SearchResult> getSearchResults()
                                         throws ItemNotFoundException,
                                                BaseException
Returns:
Returns the searchResults.
Throws:
ItemNotFoundException
BaseException

setSearchResults

public void setSearchResults(SortedSet<SearchResult> searchResults)
Set the SearchResult searchResults set.

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

getAnalysisTime

public Date getAnalysisTime()
Returns:
Returns the analysis date.

setAnalysisTime

public void setAnalysisTime(Date date)
Parameters:
date - The analysis time.

getResultFile

public File getResultFile()
Get the result file that this spectrumsearch was generated from

Returns:
the File

setResultFile

public void setResultFile(File resultFile)
Set the result file

Parameters:
resultFile - The results File this spectrumSearch was generated from

getInputSpectrumFileName

public String getInputSpectrumFileName()
Get the input filename of this SpectrumSearch.

Returns:
the filename

setInputSpectrumFileName

public void setInputSpectrumFileName(String inputSpectrumFileName)
                              throws InvalidDataException
Set the inputSpectrumFileName for this SpectrumSearch item. The value may be null but must not be longer than the value specified by the MAX_INPUTSPECTRUMFILENAME_LENGTH constant.

Parameters:
inputSpectrumFileName - The new inputSpectrumFileName for this item
Throws:
InvalidDataException - If the inputSpectrumFileName is longer than MAX_INPUTSPECTRUMFILENAME_LENGTH

addSearchModification

public void addSearchModification(SearchModification dp)
Add a SearchModification

Parameters:
dp - The SearchModification to add to the Set

getSearchModifications

public Set<SearchModification> getSearchModifications()
                                               throws ItemNotFoundException,
                                                      BaseException
Returns:
Returns the searchModifications.
Throws:
ItemNotFoundException
BaseException

setSearchModifications

public void setSearchModifications(Set<SearchModification> searchModifications)
Set the SearchModification searchModifications set.

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

Last update: 2011-06-23