edu.mssm.crover.webservices.rbde
Class MutantSubServiceState

java.lang.Object
  |
  +--edu.mssm.crover.webservices.rbde.MutantSubServiceState

public class MutantSubServiceState
extends java.lang.Object

Holds the mutant sub-service state. This class holds several data that the mutant subservice relies upon. This class is not serialized because the nature of this data is transient: a new state object is initialized each time the user logs in the service.


Field Summary
static int CHOOSE_SERVER
          The server has not been chosen: have the user choose it.
 boolean filter_cumulative
           
 boolean filter_exact_cumulative
           
static int INVALID_INTERACTION_STATE
          This state is invalid.
static int QUERY_DISPLAY
          There is a server: query and display for this ac/db.
 
Constructor Summary
MutantSubServiceState()
           
 
Method Summary
 void clearSelection()
          Clears the selection.
 java.lang.String getAccessionCode()
           
 Mutant getCachedMutant(java.lang.String mutantID)
          Obtain the mutant that match this mutantID from the cache.
 short getCumulativeFilter()
           
 java.lang.String getDatabank()
           
 boolean getFilterCumulative()
           
 boolean getFilterExactCumulative()
           
 boolean getFilterPure()
           
 int getInteractionState()
           
 short getPureFilter()
           
 java.util.Iterator getSelectedMutants()
          Give read-access to the set of selected mutants.
 java.lang.String getServer()
           
 void selectAllFilteredMutants()
          Select all the mutants which are in the cache.
 void selectMutant(Mutant mutant)
          Add the mutant that correspond to this mutant-id to the list of selected mutants.
 void selectMutant(java.lang.String mutantID)
          Add the mutant that correspond to this mutant-id to the list of selected mutants.
 void setAccessionCode(java.lang.String _ac)
           
 void setCumulativeFilter(short _cumulative)
           
 void setDatabank(java.lang.String _db)
           
 void setFilterCumulative(boolean _filter_cumulative)
           
 void setFilterExactCumulative(boolean _filter_exact_cumulative)
           
 void setFilterPure(boolean _filter_pure)
           
 void setLastMutantQueryResult(Mutant[] mutants)
          Cache the result of the last mutant query in the session.
 void setPureFilter(short _pure)
           
 void setServer(java.lang.String _server)
           
 void unselectAllFilteredMutants()
          Unselect all the mutants which are in the cache.
 void unselectMutant(Mutant mutant)
          Removes the mutant that correspond to this mutant-id from the list of selected mutants.
 void unselectMutant(java.lang.String mutantID)
          Removes the mutant that correspond to this mutant-id from the list of selected mutants.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filter_exact_cumulative

public boolean filter_exact_cumulative

filter_cumulative

public boolean filter_cumulative

CHOOSE_SERVER

public static final int CHOOSE_SERVER
The server has not been chosen: have the user choose it.

See Also:
Constant Field Values

QUERY_DISPLAY

public static final int QUERY_DISPLAY
There is a server: query and display for this ac/db.

See Also:
Constant Field Values

INVALID_INTERACTION_STATE

public static final int INVALID_INTERACTION_STATE
This state is invalid. This should not happen.

See Also:
Constant Field Values
Constructor Detail

MutantSubServiceState

public MutantSubServiceState()
Method Detail

setServer

public void setServer(java.lang.String _server)

getServer

public java.lang.String getServer()

setAccessionCode

public void setAccessionCode(java.lang.String _ac)

getAccessionCode

public java.lang.String getAccessionCode()

setDatabank

public void setDatabank(java.lang.String _db)

getDatabank

public java.lang.String getDatabank()

setPureFilter

public void setPureFilter(short _pure)

getPureFilter

public short getPureFilter()

setCumulativeFilter

public void setCumulativeFilter(short _cumulative)

getCumulativeFilter

public short getCumulativeFilter()

setFilterPure

public void setFilterPure(boolean _filter_pure)

getFilterPure

public boolean getFilterPure()

setFilterCumulative

public void setFilterCumulative(boolean _filter_cumulative)

getFilterCumulative

public boolean getFilterCumulative()

setFilterExactCumulative

public void setFilterExactCumulative(boolean _filter_exact_cumulative)

getFilterExactCumulative

public boolean getFilterExactCumulative()

getInteractionState

public int getInteractionState()

selectMutant

public void selectMutant(java.lang.String mutantID)
Add the mutant that correspond to this mutant-id to the list of selected mutants.


selectMutant

public void selectMutant(Mutant mutant)
Add the mutant that correspond to this mutant-id to the list of selected mutants.


selectAllFilteredMutants

public void selectAllFilteredMutants()
Select all the mutants which are in the cache.


unselectAllFilteredMutants

public void unselectAllFilteredMutants()
Unselect all the mutants which are in the cache.


clearSelection

public void clearSelection()
Clears the selection. Remove all the mutants from the selected set.


unselectMutant

public void unselectMutant(java.lang.String mutantID)
Removes the mutant that correspond to this mutant-id from the list of selected mutants.


unselectMutant

public void unselectMutant(Mutant mutant)
Removes the mutant that correspond to this mutant-id from the list of selected mutants.


getSelectedMutants

public java.util.Iterator getSelectedMutants()
Give read-access to the set of selected mutants.

Returns:
an iterator over Mutant instances.

setLastMutantQueryResult

public void setLastMutantQueryResult(Mutant[] mutants)
Cache the result of the last mutant query in the session. This is intended to allow two servlets, one that make the query of mutants, and the second that need to perform some processing on one mutant, or a group of them, to exchange only mutation-ids of the mutants, not a reference to an object.


getCachedMutant

public Mutant getCachedMutant(java.lang.String mutantID)
Obtain the mutant that match this mutantID from the cache. The result is transient because it should be obtained from the mutation server instead of being retrieved from a session. It makes no sense to store persistently an information that will not be uptodate very soon.



Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.