|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.cisban.rod.data.DataManager
public class DataManager
Handles all of the data for a particular experiment by juggling submanagers that actually perform all data tasks.
Field Summary | |
---|---|
static boolean |
DEBUG
Sets whether or not to debug the whole program. |
protected java.util.Map<java.lang.Long,java.util.Collection<LogEventMapping>> |
mappings
A map of ActionApplication ids to the corresponding data loaded for the
current experiment. |
protected java.util.SortedMap<ActionCV,java.util.List<ActionCV>> |
protocol
A map of top-level ActionCV s to the ActionCVs that expect logs. |
protected java.util.SortedMap<ActionApplication,java.util.List<ActionApplication>> |
protocolApplication
A map of the top-level ActionApplication s to the ActionApplications that expect logs. |
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Adds a ChangeListener to listen for the completion of loading of the experiment, inoculation, spot or image logs. |
void |
addMapping(java.lang.Long id,
java.util.Collection<LogEventMapping> list)
Creates a mapping from ActionApplication DB id to the corresponding data
loaded for that ActionApplication . |
boolean |
clearExperiment()
Sets this instance of DataManager to null, incites the creation of a new DataManager, and fires a ChangeEvent to let all interested parties know. |
ExperimentManager |
getExperimentManager()
Allows access to the experiment manager. |
ImageManager |
getImageManager()
Allows access to the image manager. |
InoculationManager |
getInocManager()
Allows access to the inoculation manager. |
static DataManager |
getInstance()
Return the only active instance of DataManager with all of the loaded data. |
java.util.Map<java.lang.Long,java.util.Collection<LogEventMapping>> |
getMappings()
Returns a map of ActionApplication ids to the corresponding data loaded for the
current experiment. |
PlateManager |
getPlateManager()
Allows access to the plate manager. |
ActionApplication |
getPreviousApplication(java.lang.Long actionAppId)
Returns the ActionApplication before the given actionAppId for purposes of checking for completion, etc. |
java.util.SortedMap<ActionCV,java.util.List<ActionCV>> |
getProtocol()
Returns a map of top-level ActionCV s to the ActionCVs that expect logs. |
java.util.SortedMap<ActionApplication,java.util.List<ActionApplication>> |
getProtocolApplication()
Returns a map of the top-level ActionApplication s to the
ActionApplications that expect logs. |
SpotManager |
getSpotManager()
Allows access to the spot manager. |
void |
listenToImageManager(java.beans.PropertyChangeListener listener)
Forwards the given listener on to the ImageManager . |
java.util.List<ActionCV> |
locateLoggable(ActionCV curr)
For a top-level ActionCV , finds the ActionCV s further down
in the hierarchy that expect LogEvent s. |
java.util.List<ActionApplication> |
locateLogged(ActionApplication curr)
From a top-level ActionApplication , finds the ActionApplication s
further down in the hierarchy that have LogEvent s attached. |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Removes a ChangeListener to listen for the completion of loading of the experiment, inoculation, spot or image logs. |
void |
stateChanged(javax.swing.event.ChangeEvent e)
Fires a change event to registered listeners of DataManager based upon the completion of loading of the experiment, inoculation, spot or image logs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
protected java.util.SortedMap<ActionCV,java.util.List<ActionCV>> protocol
ActionCV
s to the ActionCVs that expect logs.
protected java.util.SortedMap<ActionApplication,java.util.List<ActionApplication>> protocolApplication
ActionApplication
s to the ActionApplications that expect logs.
protected java.util.Map<java.lang.Long,java.util.Collection<LogEventMapping>> mappings
ActionApplication
ids to the corresponding data loaded for the
current experiment.
Method Detail |
---|
public static DataManager getInstance()
public ExperimentManager getExperimentManager()
public ImageManager getImageManager()
public InoculationManager getInocManager()
public PlateManager getPlateManager()
public SpotManager getSpotManager()
public void addMapping(java.lang.Long id, java.util.Collection<LogEventMapping> list)
ActionApplication
DB id to the corresponding data
loaded for that ActionApplication
.
id
- the DB id of the ActionApplication
list
- Collection of data associated with that ActionApplicationpublic boolean clearExperiment() throws java.lang.Exception
java.lang.Exception
public ActionApplication getPreviousApplication(java.lang.Long actionAppId)
actionAppId
-
public java.util.List<ActionCV> locateLoggable(ActionCV curr)
ActionCV
, finds the ActionCV
s further down
in the hierarchy that expect LogEvent
s.
curr
-
public java.util.List<ActionApplication> locateLogged(ActionApplication curr)
ActionApplication
, finds the ActionApplication
s
further down in the hierarchy that have LogEvent
s attached.
curr
-
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
e
- public java.util.SortedMap<ActionCV,java.util.List<ActionCV>> getProtocol()
ActionCV
s to the ActionCVs that expect logs.
public java.util.SortedMap<ActionApplication,java.util.List<ActionApplication>> getProtocolApplication()
ActionApplication
s to the
ActionApplications that expect logs.
public void addChangeListener(javax.swing.event.ChangeListener listener)
listener
- listener interested in the completion of loading of datapublic void removeChangeListener(javax.swing.event.ChangeListener listener)
listener
- the listener no longer interestedpublic void listenToImageManager(java.beans.PropertyChangeListener listener) throws java.lang.InterruptedException
ImageManager
.
listener
-
java.lang.InterruptedException
public java.util.Map<java.lang.Long,java.util.Collection<LogEventMapping>> getMappings()
ActionApplication
ids to the corresponding data loaded for the
current experiment.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |