use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createHurlbert.
@Test
public void createHurlbert() throws StudyImporterException, DatasetRegistryException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "hurlbertlab/dietdatabase");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForHurlbert.class)));
final JsonNode config = ((BaseDatasetImporter) importer).getDataset().getConfig();
assertThat(config, is(notNullValue()));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createMetaTable.
@Test
public void createMetaTable() throws DatasetRegistryException, StudyImporterException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/AfricaTreeDatabase");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForMetaTable.class)));
assertThat(((DatasetImporterForMetaTable) importer).getConfig(), is(notNullValue()));
assertThat(((DatasetImporterForMetaTable) importer).getBaseUrl(), startsWith("https://raw.githubusercontent.com/globalbioticinteractions/AfricaTreeDatabase/"));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createPlanque.
@Test
public void createPlanque() throws StudyImporterException, DatasetRegistryException, IOException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/planque2014");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForPlanque.class)));
DatasetImporterForPlanque importerz = (DatasetImporterForPlanque) importer;
assertThat(importerz.getSourceCitation(), containsString("Planque"));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote 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()));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createAfrotropicalBees.
@Test
public void createAfrotropicalBees() throws StudyImporterException, DatasetRegistryException, IOException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
String repo = "globalbioticinteractions/Catalogue-of-Afrotropical-Bees";
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, repo);
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForCoetzer.class)));
assertThat(((DatasetImporterForCoetzer) importer).getDataset(), is(notNullValue()));
assertThat(((DatasetImporterForCoetzer) importer).getDataset().retrieve(URI.create("archive")), is(notNullValue()));
}
Aggregations