public class ImportCallback extends Object implements IObserver
Modifier and Type | Field and Description |
---|---|
static String |
CANCELLABLE_IMPORT_PROPERTY
Bound property indicating that the status has changed.
|
static String |
CONTAINER_FROM_FOLDER_PROPERTY
Bound property indicating that the container corresponding to the
folder has been created.
|
static String |
DEBUG_TEXT_PROPERTY
Bound property indicating that the debug text has been sent.
|
static String |
DUPLICATE
The text displayed when the file is already selected.
|
static String |
FILE_IMPORT_STARTED_PROPERTY
Bound property indicating that the import of the file has started.
|
static String |
FILE_RESET_PROPERTY
Bound property indicating that the file has to be reset
This should be invoked if the log file for example has been selected.
|
static String |
FILES_SET_PROPERTY
Bound property indicating that children files have been set.
|
static String |
IMPORT_DONE_PROPERTY
Bound property indicating that the import is done.
|
static String |
NO_CONTAINER_PROPERTY
Bound property indicating that the original container has been reset.
|
static String |
PROCESSING_ERROR_PROPERTY
Bound property indicating that the scanning has started.
|
static String |
SCANNING_PROPERTY
Bound property indicating that the scanning has started.
|
static String |
SCANNING_TEXT
The text indicating the scanning steps.
|
static String |
UPLOAD_DONE_PROPERTY
Bound property indicating that the upload is done.
|
Constructor and Description |
---|
ImportCallback()
Creates a new instance.
|
ImportCallback(File sourceFile)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
boolean |
didUploadStart()
Returns
true if the upload ever started, false
otherwise. |
void |
firePropertyChange(String prop,
Object oldValue,
Object newValue) |
String[] |
getChecksumFiles()
Returns the source files that have checksum values or
null
if no event stored. |
List<String> |
getChecksums()
Returns the source files that have checksum values or
null
if no event stored. |
String |
getErrorText()
Returns the text if an error occurred.
|
ImportException |
getException() |
Map<Integer,String> |
getFailingChecksums()
Returns the checksum values or
null if no event stored. |
FilesetData |
getFileset()
Returns the file set associated to the import.
|
long |
getFileSize()
Returns the size of the upload.
|
ImportContainer |
getImportContainer()
Returns the container.
|
Object |
getImportResult()
Returns the result of the import either a collection of
PixelsData or an exception. |
long |
getLogFileID()
Returns the ID associated to the log file.
|
int |
getNumberOfImportedFiles()
Returns the number of pixels objects created or
0 . |
int |
getSeriesCount()
Returns the number of series.
|
int |
getStep() |
boolean |
hasChecksum()
Returns
true if the checksums have been calculated,
false otherwise. |
boolean |
isCancellable()
Returns
true if the import can be cancelled,
false otherwise. |
boolean |
isFinished() |
boolean |
isHCS()
Returns
true if it is a HCS file, false
otherwise. |
boolean |
isMarkedAsCancel()
Returns
true if the import is marked as cancel,
false otherwise. |
boolean |
isMarkedAsDuplicate()
Returns
true if the import is marked as duplicate,
false otherwise. |
void |
markedAsCancel()
Marks the import has cancelled.
|
void |
markedAsDuplicate()
Marks the import has duplicate.
|
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
resetFile(File file)
Replaces the initial file by the specified one.
|
void |
setCallback(Object cmd)
Sets the callback.
|
void |
setContainerFromFolder(DataObject container)
Sets the container corresponding to the folder.
|
void |
setFiles(Map<File,ImportCallback> files)
Fires a property indicating to import the files.
|
void |
setFilesetData(FilesetData fileset)
Sets the file set when the upload is complete.
|
void |
setImportContainer(ImportContainer ic)
Sets the import container.
|
void |
setNoContainer()
Indicates that the original container has been reset.
|
void |
setUsedFiles(String[] usedFiles)
Sets the collection of files to import.
|
void |
update(IObservable observable,
ImportEvent event)
Displays the status of an on-going import.
|
public static final String DUPLICATE
public static final String SCANNING_TEXT
public static final String NO_CONTAINER_PROPERTY
public static final String FILES_SET_PROPERTY
public static final String FILE_RESET_PROPERTY
public static final String FILE_IMPORT_STARTED_PROPERTY
public static final String CONTAINER_FROM_FOLDER_PROPERTY
public static final String CANCELLABLE_IMPORT_PROPERTY
public static final String DEBUG_TEXT_PROPERTY
public static final String IMPORT_DONE_PROPERTY
public static final String UPLOAD_DONE_PROPERTY
public static final String SCANNING_PROPERTY
public static final String PROCESSING_ERROR_PROPERTY
public ImportCallback()
public ImportCallback(File sourceFile)
sourceFile
- The file associated to that label.public ImportException getException()
public int getStep()
public boolean isFinished()
public void setFilesetData(FilesetData fileset)
fileset
- The value to set.public boolean isHCS()
true
if it is a HCS file, false
otherwise.public FilesetData getFileset()
public void setUsedFiles(String[] usedFiles)
usedFiles
- The value to set.public void setCallback(Object cmd)
cmd
- The object to handle.public void markedAsCancel()
public boolean isMarkedAsCancel()
true
if the import is marked as cancel,
false
otherwise.public void markedAsDuplicate()
public boolean isMarkedAsDuplicate()
true
if the import is marked as duplicate,
false
otherwise.public String getErrorText()
public List<String> getChecksums()
null
if no event stored.public Map<Integer,String> getFailingChecksums()
null
if no event stored.public String[] getChecksumFiles()
null
if no event stored.public boolean hasChecksum()
true
if the checksums have been calculated,
false
otherwise.public void setFiles(Map<File,ImportCallback> files)
files
- The file to handle.public void setNoContainer()
public void setContainerFromFolder(DataObject container)
container
- The container to set.public void resetFile(File file)
.log
.file
- The new file.public int getSeriesCount()
public boolean isCancellable()
true
if the import can be cancelled,
false
otherwise.public Object getImportResult()
PixelsData
or an exception.public int getNumberOfImportedFiles()
0
.public long getFileSize()
public long getLogFileID()
public boolean didUploadStart()
true
if the upload ever started, false
otherwise.public ImportContainer getImportContainer()
public void setImportContainer(ImportContainer ic)
ic
- The value to set.public void update(IObservable observable, ImportEvent event)
update
in interface IObserver
IObserver.update(IObservable, ImportEvent)
public void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
Version: 5.2.1-ice35-b15
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.