public class ImportLibrary extends Object implements IObservable
OMEROMetadataStoreClient
and
FormatReader
instances. This library was factored out of
ImportHandler to support ImportFixtureFormatReader
,
OMEROMetadataStoreClient
,
ImportFixture
,
IObservable
,
IObserver
Modifier and Type | Class and Description |
---|---|
class |
ImportLibrary.ImportCallback |
Constructor and Description |
---|
ImportLibrary(OMEROMetadataStoreClient client,
OMEROWrapper reader)
The default implementation of
FileTransfer performs a
no-op and therefore need not have
FileTransfer#afterTransfer(int, File[]) as with the
ImportLibrary(OMEROMetadataStoreClient, OMEROWrapper, FileTransfer)
constructor. |
ImportLibrary(OMEROMetadataStoreClient client,
OMEROWrapper reader,
FileTransfer transfer)
The library will not close the client instance.
|
ImportLibrary(OMEROMetadataStoreClient client,
OMEROWrapper reader,
FileTransfer transfer,
int minutesToWait) |
ImportLibrary(OMEROMetadataStoreClient client,
OMEROWrapper reader,
FileTransfer transfer,
List<FileExclusion> exclusions,
int minutesToWait) |
Modifier and Type | Method and Description |
---|---|
boolean |
addObserver(IObserver object)
Add observer for notification
|
void |
clear() |
ImportLibrary.ImportCallback |
createCallback(omero.grid.ImportProcessPrx proc,
omero.cmd.HandlePrx handle,
ImportContainer container) |
omero.grid.ImportProcessPrx |
createImport(ImportContainer container)
Provide initial configuration to the server in order to create the
ImportProcessPrx which will manage state server-side. |
List<String> |
deleteFilesFromRepository(ImportContainer container)
Delete files from the managed repository.
|
boolean |
deleteObserver(IObserver object)
Delete observer
|
boolean |
importCandidates(ImportConfig config,
ImportCandidates candidates)
Primary user method for importing a number
|
List<omero.model.Pixels> |
importImage(ImportContainer container,
int index,
int numDone,
int total)
Perform an image import uploading files if necessary.
|
omero.model.OriginalFile |
loadOriginalFile(omero.api.RawFileStorePrx uploader)
Use
RawFileStorePrx.getFileId() in order to load the
OriginalFile that the service argument is acting on. |
omero.grid.ManagedRepositoryPrx |
lookupManagedRepository()
Retrieves the first managed repository from the list of current active
repositories.
|
void |
notifyObservers(ImportEvent event)
Notify observers of event
|
String |
uploadFile(omero.grid.ImportProcessPrx proc,
String[] srcFiles,
int index,
ChecksumProviderFactory cpf,
TimeEstimator estimator,
byte[] buf) |
String |
uploadFile(omero.grid.ImportProcessPrx proc,
String[] srcFiles,
int index,
TimeEstimator estimator) |
List<String> |
uploadFilesToRepository(String[] srcFiles,
omero.grid.ImportProcessPrx proc)
Upload files to the managed repository.
|
public ImportLibrary(OMEROMetadataStoreClient client, OMEROWrapper reader)
FileTransfer
performs a
no-op and therefore need not have
FileTransfer#afterTransfer(int, File[])
as with the
ImportLibrary(OMEROMetadataStoreClient, OMEROWrapper, FileTransfer)
constructor.client
- reader
- public ImportLibrary(OMEROMetadataStoreClient client, OMEROWrapper reader, FileTransfer transfer)
FileTransfer#afterTransfer(int, File[])
falls to invokers of this
method.store
- not nullreader
- not nullpublic ImportLibrary(OMEROMetadataStoreClient client, OMEROWrapper reader, FileTransfer transfer, int minutesToWait)
public ImportLibrary(OMEROMetadataStoreClient client, OMEROWrapper reader, FileTransfer transfer, List<FileExclusion> exclusions, int minutesToWait)
public boolean addObserver(IObserver object)
IObservable
addObserver
in interface IObservable
object
- - observer objectpublic boolean deleteObserver(IObserver object)
IObservable
deleteObserver
in interface IObservable
object
- - observer to deletepublic void notifyObservers(ImportEvent event)
IObservable
notifyObservers
in interface IObservable
event
- - event that happenedpublic boolean importCandidates(ImportConfig config, ImportCandidates candidates)
config
- The configuration information.candidates
- Hosts information about the files to import.public List<String> deleteFilesFromRepository(ImportContainer container) throws omero.ServerError
container
- The current import container containing usedFiles to be
deleted.omero.ServerError
public omero.grid.ImportProcessPrx createImport(ImportContainer container) throws omero.ServerError, IOException
ImportProcessPrx
which will manage state server-side.IOException
- if the used files' absolute path could not be foundomero.ServerError
public List<String> uploadFilesToRepository(String[] srcFiles, omero.grid.ImportProcessPrx proc)
container
- The current import container we're to handle.public String uploadFile(omero.grid.ImportProcessPrx proc, String[] srcFiles, int index, TimeEstimator estimator) throws omero.ServerError, IOException
omero.ServerError
IOException
public String uploadFile(omero.grid.ImportProcessPrx proc, String[] srcFiles, int index, ChecksumProviderFactory cpf, TimeEstimator estimator, byte[] buf) throws omero.ServerError, IOException
omero.ServerError
IOException
public List<omero.model.Pixels> importImage(ImportContainer container, int index, int numDone, int total) throws loci.formats.FormatException, IOException, Throwable
container
- The import container which houses all the configuration
values and target for the import.index
- Index of the import in a set. 0
is safe if
this is a singular import.numDone
- Number of imports completed in a set. 0
is
safe if this is a singular import.total
- Total number of imports in a set. 1
is safe
if this is a singular import.loci.formats.FormatException
- If there is a Bio-Formats image file format
error during import.IOException
- If there is an I/O error.omero.ServerError
- If there is an error communicating with the OMERO
server we're importing into.Throwable
public ImportLibrary.ImportCallback createCallback(omero.grid.ImportProcessPrx proc, omero.cmd.HandlePrx handle, ImportContainer container) throws omero.ServerError
omero.ServerError
public omero.grid.ManagedRepositoryPrx lookupManagedRepository()
public void clear()
public omero.model.OriginalFile loadOriginalFile(omero.api.RawFileStorePrx uploader) throws omero.ServerError
RawFileStorePrx.getFileId()
in order to load the
OriginalFile
that the service argument is acting on.uploader
- not nullomero.ServerError
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.