uk.ac.cisban.rod.data
Class ImageManager

java.lang.Object
  extended by uk.ac.cisban.rod.data.AbstractDataTypeManager
      extended by uk.ac.cisban.rod.data.ImageManager

public class ImageManager
extends AbstractDataTypeManager

Manages the parsing and saving of Images.

Since:
26-Nov-2008 4:13:47 PM
Author:
Morgan Taschuk

Field Summary
 
Fields inherited from class uk.ac.cisban.rod.data.AbstractDataTypeManager
currentTasks, listeners
 
Constructor Summary
ImageManager()
          Main constructor.
 
Method Summary
 boolean attemptToLoadImageLog(java.lang.Long actionAppId)
          Check if there are image log results for the current experiment.
 java.util.List<CompleteQueryResult> getImaging()
          Get the pertinent information about loaded image logs, if it exists.
 java.util.Map<java.lang.Long,java.util.List<Image>> getImagingBrief()
           
 java.util.List<Image> getImagingBrief(java.lang.Long appId)
          Get the pertinent information about loaded image logs, if it exists.
 java.util.List<java.lang.String> getNonMappedPlates()
           
 boolean hasPreviousMappings(long actionApplicationId)
           
 java.lang.Boolean isLoaded(long applicationAppId)
          Checks if there are mappings in the DataManager for the given ActionApplication.
 void listen(java.beans.PropertyChangeListener listener)
          If there is a running SwingWorker, listen to it.
 javax.swing.SwingWorker saveImageLog(java.io.File file, java.lang.Long actionApplicationId)
          Returns a StateSwingWorker that can save an image log into the current experiment.
 
Methods inherited from class uk.ac.cisban.rod.data.AbstractDataTypeManager
addChangeListener, cancelCurrentTasks, hasCurrentTask, hasCurrentTask, removeChangeListener, setLoaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageManager

public ImageManager()
Main constructor.

Method Detail

getNonMappedPlates

public java.util.List<java.lang.String> getNonMappedPlates()
Returns:

getImagingBrief

public java.util.Map<java.lang.Long,java.util.List<Image>> getImagingBrief()
Returns:

isLoaded

public java.lang.Boolean isLoaded(long applicationAppId)
Description copied from class: AbstractDataTypeManager
Checks if there are mappings in the DataManager for the given ActionApplication.

Overrides:
isLoaded in class AbstractDataTypeManager
Parameters:
applicationAppId - the DB id
Returns:

getImagingBrief

public java.util.List<Image> getImagingBrief(java.lang.Long appId)
Get the pertinent information about loaded image logs, if it exists.

Parameters:
appId -
Returns:
a list of the CompleteQueryResult defining an image log, null if none

getImaging

public java.util.List<CompleteQueryResult> getImaging()
Get the pertinent information about loaded image logs, if it exists.

Returns:
a list of the CompleteQueryResult defining an image log, null if none

saveImageLog

public javax.swing.SwingWorker saveImageLog(java.io.File file,
                                            java.lang.Long actionApplicationId)
Returns a StateSwingWorker that can save an image log into the current experiment. The StateSwingWorker must be executed to start the saving.

Parameters:
file - the file with the image log data
actionApplicationId -
Returns:
a thread that will load the image log data upon execution

attemptToLoadImageLog

public boolean attemptToLoadImageLog(java.lang.Long actionAppId)
Check if there are image log results for the current experiment. If there are, load them. Fires a ChangeEvent in DataManager if loading is successful.

Parameters:
actionAppId -
Returns:

hasPreviousMappings

public boolean hasPreviousMappings(long actionApplicationId)
Parameters:
actionApplicationId -
Returns:

listen

public void listen(java.beans.PropertyChangeListener listener)
            throws java.lang.InterruptedException
If there is a running SwingWorker, listen to it.

Parameters:
listener - a PropertyChangeListener that is interested in things happening in this class.
Throws:
java.lang.InterruptedException - if the listener cannot be added


Copyright © 2010. All Rights Reserved.