public class OMEROImportFixture
extends java.lang.Object
OMEROMetadataStoreClient client = new OMEROMetadataStoreClient(sf);
OMEROImportFixture fixture = new OMEROImportFixture(client);
fixture.setUp();
fixture.setFile(ResourceUtils.getFile("classpath:tinyTest.d3d.dv"));
fixture.setName(name);
fixture.doImport();
List<Pixels> p = fixture.getPixels();
fixture.tearDown();
i.setName(name);
i = userSave(i);
This class is not thread safe.OMEROMetadataStoreClient| Modifier and Type | Field and Description |
|---|---|
protected OMEROMetadataStoreClient |
store |
| Constructor and Description |
|---|
OMEROImportFixture(OMEROMetadataStoreClient store,
OMEROWrapper reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
doImport()
Runs import by looping through all files and then calling
ImportLibrary.importCandidates(ImportConfig, ImportCandidates). |
java.util.List<omero.model.Pixels> |
fullImport(java.io.File f,
java.lang.String name)
Provides one complete import cycle.
|
java.util.List<omero.model.Pixels> |
getPixels()
Accessor for the created pixels.
|
void |
setFile(java.io.File file) |
void |
setName(java.lang.String name) |
void |
setUp()
checks for the necessary fields and initializes the
ImportLibrary |
void |
tearDown()
sets
ImportLibrary, OMEROMetadataStore, and file array to
null. |
protected OMEROMetadataStoreClient store
public OMEROImportFixture(OMEROMetadataStoreClient store, OMEROWrapper reader)
public void setUp()
throws java.lang.Exception
ImportLibraryjava.lang.Exception - if the import library could not be instantiatedpublic void tearDown()
ImportLibrary, OMEROMetadataStore, and file array to
null. Also attempts to call FormatReader.close().public java.util.List<omero.model.Pixels> fullImport(java.io.File f,
java.lang.String name)
throws java.lang.Exception
f - the file to importname - the name (ignored)Pixels instance(s) created by the importjava.lang.Exception - if the import failedpublic void doImport()
throws java.lang.Exception
ImportLibrary.importCandidates(ImportConfig, ImportCandidates).java.lang.Exception - if import failed in a way that is not handled by an ErrorHandler.EXCEPTION_EVENTpublic void setFile(java.io.File file)
public void setName(java.lang.String name)
public java.util.List<omero.model.Pixels> getPixels()
throws java.lang.Exception
doImport()Pixels instance(s) created by the importjava.lang.Exception - from an ErrorHandler.EXCEPTION_EVENT if the import failed
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.