use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createSIAD.
@Test
public void createSIAD() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/siad");
assertThat(importer, is(notNullValue()));
Dataset dataset = ((BaseStudyImporter) importer).getDataset();
final JsonNode config = dataset.getConfig();
assertThat(config, is(notNullValue()));
assertThat(dataset.getOrDefault(DatasetConstant.SHOULD_RESOLVE_REFERENCES, "donald"), is("false"));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createArthopodEasyCapture.
@Test
public void createArthopodEasyCapture() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/arthropodEasyCaptureAMNH");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForArthopodEasyCapture.class)));
assertThat(((StudyImporterForArthopodEasyCapture) importer).getRssFeedUrlString(), is(notNullValue()));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method getTemplateImporter.
StudyImporter getTemplateImporter(DatasetFinder datasetFinder, String repo) throws DatasetFinderException, StudyImporterException {
Dataset dataset = DatasetFactory.datasetFor(repo, datasetFinder);
StudyImporter importer = new GitHubImporterFactory().createImporter(dataset, null);
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForTSV.class)));
return importer;
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createAfrotropicalBees.
@Test
public void createAfrotropicalBees() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
String repo = "globalbioticinteractions/Catalogue-of-Afrotropical-Bees";
StudyImporter importer = importerFor(datasetFinderGitHubRemote, repo);
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForCoetzer.class)));
assertThat(((StudyImporterForCoetzer) importer).getDataset(), is(notNullValue()));
String archiveURL = ((StudyImporterForCoetzer) importer).getResourceArchiveURI();
assertThat(archiveURL, endsWith("CatalogueOfAfrotropicalBees.zip"));
assertThat(URI.create(archiveURL).isAbsolute(), is(true));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createHafner.
@Test
public void createHafner() throws StudyImporterException, DatasetFinderException {
final DatasetFinder datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = new GitHubImporterFactory().createImporter(DatasetFactory.datasetFor("globalbioticinteractions/hafner", datasetFinderGitHubRemote), null);
assertThat(importer, is(notNullValue()));
StudyImporterForHafner gomexsiImporter = (StudyImporterForHafner) importer;
assertThat(gomexsiImporter.getDataset().getResourceURI("hafner/gopher_lice_int.csv"), is("gopher_lice_int.csv"));
}
Aggregations