Search in sources :

Example 1 with DatasetImporterForHafner

use of org.eol.globi.data.DatasetImporterForHafner in project eol-globi-data by jhpoelen.

the class DatasetImporterFactoryImplIT method createHafner.

@Test
public void createHafner() throws StudyImporterException, DatasetRegistryException, IOException {
    final DatasetRegistry datasetRegistryGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
    Dataset dataset = new DatasetFactory(datasetRegistryGitHubRemote).datasetFor("globalbioticinteractions/hafner");
    DatasetImporter importer = new StudyImporterFactoryImpl(null).createImporter(dataset);
    assertThat(importer, is(notNullValue()));
    DatasetImporterForHafner haftnerImporter = (DatasetImporterForHafner) importer;
    assertThat(haftnerImporter.getDataset().retrieve(URI.create("hafner/gopher_lice_int.csv")), is(notNullValue()));
}
Also used : DatasetRegistryGitHubRemote(org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote) Dataset(org.globalbioticinteractions.dataset.Dataset) DatasetRegistry(org.globalbioticinteractions.dataset.DatasetRegistry) DatasetImporterForHafner(org.eol.globi.data.DatasetImporterForHafner) BaseDatasetImporter(org.eol.globi.data.BaseDatasetImporter) DatasetImporter(org.eol.globi.data.DatasetImporter) DatasetFactory(org.globalbioticinteractions.dataset.DatasetFactory) Test(org.junit.Test)

Aggregations

BaseDatasetImporter (org.eol.globi.data.BaseDatasetImporter)1 DatasetImporter (org.eol.globi.data.DatasetImporter)1 DatasetImporterForHafner (org.eol.globi.data.DatasetImporterForHafner)1 Dataset (org.globalbioticinteractions.dataset.Dataset)1 DatasetFactory (org.globalbioticinteractions.dataset.DatasetFactory)1 DatasetRegistry (org.globalbioticinteractions.dataset.DatasetRegistry)1 DatasetRegistryGitHubRemote (org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote)1 Test (org.junit.Test)1