SigPath

org.sigpath.task
Class TSearchMolecules

java.lang.Object
  extended by org.sigpath.task.DBTask
      extended by org.sigpath.task.TSearchMolecules
All Implemented Interfaces:
ITSearchTask, Task

public class TSearchMolecules
extends DBTask
implements ITSearchTask

Performs a molecule search based on search criteria, including: keyword, category, and organism.

Author:
Ethan Cerami

Field Summary
static String AC_TARGET
           
static String ALL_TARGET
           
static String SPID_TARGET
           
 
Fields inherited from class org.sigpath.task.DBTask
dbManager, embeddedTask, entityManager, errors, ftsm, progressListener, sigpathFactory, unitManager, userManager, xdebug
 
Constructor Summary
TSearchMolecules(String keyword, String category, String organism, int startIndex)
          Constructor
 
Method Summary
protected  void _execute()
          Perform Molecule Search
 List getCurrentList()
          Get List of Results
 FTSManagerMeasurements getFTSManagerMeasurements()
          Get Measurements of he last execution.
 Collection getRelatedKeywords()
          Get Related Keywords
 int getTotalNumResults()
          Get Total Number of Results
 void setRecordNumber(int recnum)
          Sets the maximum number of elements retrieved in one bunch.
 void setResults(ArrayList list)
          set List of Results
 void setStartIndex(int index)
          sets the start index.
 
Methods inherited from class org.sigpath.task.DBTask
close, delete, execute, getDbManager, getErrors, isEmbeddedTask, isTaskThrewException, reindex, resolve, setDbManager, setEmbeddedTask, setEmbeddedTask, setObtainTransactionsFrom, setProgressListener, setTaskThrewException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sigpath.task.Task
execute
 

Field Detail

SPID_TARGET

public static final String SPID_TARGET
See Also:
Constant Field Values

AC_TARGET

public static final String AC_TARGET
See Also:
Constant Field Values

ALL_TARGET

public static final String ALL_TARGET
See Also:
Constant Field Values
Constructor Detail

TSearchMolecules

public TSearchMolecules(String keyword,
                        String category,
                        String organism,
                        int startIndex)
Constructor

Parameters:
keyword - Search Keyword
category - Molecule Category, e.g. "small_molecules", "proteins", "complexes"
organism - Organism String, e.g. "Human", "all"
startIndex - startIndex for retrieved list of results
Method Detail

getFTSManagerMeasurements

public FTSManagerMeasurements getFTSManagerMeasurements()
Get Measurements of he last execution.

Returns:
filled FTSManagerMeasurements object

getCurrentList

public List getCurrentList()
Get List of Results

Specified by:
getCurrentList in interface ITSearchTask
Returns:
List of SigPathEntityBeans

setResults

public void setResults(ArrayList list)
set List of Results

Specified by:
setResults in interface ITSearchTask

getTotalNumResults

public int getTotalNumResults()
Get Total Number of Results

Specified by:
getTotalNumResults in interface ITSearchTask

getRelatedKeywords

public Collection getRelatedKeywords()
Get Related Keywords


setRecordNumber

public void setRecordNumber(int recnum)
Sets the maximum number of elements retrieved in one bunch. The default is the value stored in PagedCollection.RESULTS_PER_PAGE; Call this methode before execute().

Parameters:
recnum - the number of elements you want to retrieve

_execute

protected void _execute()
                 throws SigPathDatabaseException
Perform Molecule Search

Specified by:
_execute in class DBTask
Throws:
SigPathDatabaseException - error connecting to database

setStartIndex

public void setStartIndex(int index)
sets the start index.

Specified by:
setStartIndex in interface ITSearchTask
Parameters:
index - index less than getTotalNumResults and greater or equal to 0.

SigPath

Copyright © 2002-2005 Institute for Computational Biomedicine, All Rights Reserved.