public class ImportLibrary extends java.lang.Object implements IObservable
OMEROMetadataStoreClient
and
FormatReader
instances. This library was factored out of
ImportHandler to support ImportFixtureFormatReader
,
OMEROMetadataStoreClient
,
ImportFixture
,
IObservable
,
IObserver
修飾子とタイプ | クラスと説明 |
---|---|
class |
ImportLibrary.ImportCallback |
コンストラクタと説明 |
---|
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) |
修飾子とタイプ | メソッドと説明 |
---|---|
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. |
java.util.List<java.lang.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
|
java.util.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
|
java.lang.String |
uploadFile(omero.grid.ImportProcessPrx proc,
java.lang.String[] srcFiles,
int index,
ome.util.checksum.ChecksumProviderFactory cpf,
TimeEstimator estimator,
byte[] buf) |
java.lang.String |
uploadFile(omero.grid.ImportProcessPrx proc,
java.lang.String[] srcFiles,
int index,
TimeEstimator estimator) |
java.util.List<java.lang.String> |
uploadFilesToRepository(java.lang.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 boolean addObserver(IObserver object)
IObservable
addObserver
インタフェース内 IObservable
object
- - observer objectpublic boolean deleteObserver(IObserver object)
IObservable
deleteObserver
インタフェース内 IObservable
object
- - observer to deletepublic void notifyObservers(ImportEvent event)
IObservable
notifyObservers
インタフェース内 IObservable
event
- - event that happenedpublic boolean importCandidates(ImportConfig config, ImportCandidates candidates)
config
- The configuration information.candidates
- Hosts information about the files to import.public java.util.List<java.lang.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, java.io.IOException
ImportProcessPrx
which will manage state server-side.java.io.IOException
- if the used files' absolute path could not be foundomero.ServerError
public java.util.List<java.lang.String> uploadFilesToRepository(java.lang.String[] srcFiles, omero.grid.ImportProcessPrx proc)
container
- The current import container we're to handle.public java.lang.String uploadFile(omero.grid.ImportProcessPrx proc, java.lang.String[] srcFiles, int index, TimeEstimator estimator) throws omero.ServerError, java.io.IOException
omero.ServerError
java.io.IOException
public java.lang.String uploadFile(omero.grid.ImportProcessPrx proc, java.lang.String[] srcFiles, int index, ome.util.checksum.ChecksumProviderFactory cpf, TimeEstimator estimator, byte[] buf) throws omero.ServerError, java.io.IOException
omero.ServerError
java.io.IOException
public java.util.List<omero.model.Pixels> importImage(ImportContainer container, int index, int numDone, int total) throws loci.formats.FormatException, java.io.IOException, java.lang.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.java.io.IOException
- If there is an I/O error.omero.ServerError
- If there is an error communicating with the OMERO
server we're importing into.java.lang.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