Search in sources :

Example 11 with ServiceFactory

use of loci.common.services.ServiceFactory in project bioformats by openmicroscopy.

the class JHDFServiceTest method setUp.

@BeforeMethod
public void setUp() throws DependencyException, IOException {
    ServiceFactory sf = new ServiceFactory();
    service = sf.getInstance(JHDFService.class);
    URL file = JHDFServiceTest.class.getResource(TEST_FILE);
    service.setFile(file.getPath());
}
Also used : ServiceFactory(loci.common.services.ServiceFactory) JHDFService(loci.formats.services.JHDFService) URL(java.net.URL) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 12 with ServiceFactory

use of loci.common.services.ServiceFactory in project bioformats by openmicroscopy.

the class NetCDFServiceTest method setUp.

@BeforeMethod
public void setUp() throws DependencyException, IOException {
    ServiceFactory sf = new ServiceFactory();
    service = sf.getInstance(NetCDFService.class);
    URL file = NetCDFServiceTest.class.getResource(TEST_FILE);
    service.setFile(file.getPath());
}
Also used : ServiceFactory(loci.common.services.ServiceFactory) NetCDFService(loci.formats.services.NetCDFService) URL(java.net.URL) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 13 with ServiceFactory

use of loci.common.services.ServiceFactory in project bioformats by openmicroscopy.

the class POIServiceTest method setUp.

@BeforeMethod
public void setUp() throws DependencyException, IOException {
    ServiceFactory sf = new ServiceFactory();
    service = sf.getInstance(POIService.class);
    URL file = this.getClass().getResource(TEST_XLS);
    service.initialize(file.getPath());
}
Also used : ServiceFactory(loci.common.services.ServiceFactory) POIService(loci.formats.services.POIService) URL(java.net.URL) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 14 with ServiceFactory

use of loci.common.services.ServiceFactory in project bioformats by openmicroscopy.

the class OMEXMLServiceTest method setUp.

@BeforeMethod
public void setUp() throws DependencyException, IOException {
    ServiceFactory sf = new ServiceFactory();
    service = sf.getInstance(OMEXMLService.class);
    InputStream s = OMEXMLServiceTest.class.getResourceAsStream(XML_FILE);
    byte[] b = new byte[s.available()];
    s.read(b);
    s.close();
    xml = new String(b);
}
Also used : ServiceFactory(loci.common.services.ServiceFactory) InputStream(java.io.InputStream) OMEXMLService(loci.formats.services.OMEXMLService) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 15 with ServiceFactory

use of loci.common.services.ServiceFactory in project bioformats by openmicroscopy.

the class BackReferenceTest method setUp.

@BeforeMethod
public void setUp() throws DependencyException, ServiceException, IOException {
    ServiceFactory sf = new ServiceFactory();
    service = sf.getInstance(OMEXMLService.class);
    metadata = service.createOMEXMLMetadata();
}
Also used : ServiceFactory(loci.common.services.ServiceFactory) OMEXMLService(loci.formats.services.OMEXMLService) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

ServiceFactory (loci.common.services.ServiceFactory)94 OMEXMLService (loci.formats.services.OMEXMLService)73 DependencyException (loci.common.services.DependencyException)49 FormatException (loci.formats.FormatException)38 IMetadata (loci.formats.meta.IMetadata)35 ServiceException (loci.common.services.ServiceException)30 ImageReader (loci.formats.ImageReader)23 MissingLibraryException (loci.formats.MissingLibraryException)15 BeforeMethod (org.testng.annotations.BeforeMethod)15 MetadataStore (loci.formats.meta.MetadataStore)14 PositiveInteger (ome.xml.model.primitives.PositiveInteger)14 IOException (java.io.IOException)13 CoreMetadata (loci.formats.CoreMetadata)13 Length (ome.units.quantity.Length)12 Location (loci.common.Location)11 OMEXMLMetadata (loci.formats.ome.OMEXMLMetadata)10 InputStream (java.io.InputStream)9 ArrayList (java.util.ArrayList)8 MetadataRetrieve (loci.formats.meta.MetadataRetrieve)8 BeforeClass (org.testng.annotations.BeforeClass)8