use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method defaultTSVImporterCached.
@Test
public void defaultTSVImporterCached() throws StudyImporterException, DatasetFinderException {
final DatasetFinder datasetFinder = new DatasetFinderWithCache(new DatasetFinderGitHubArchive());
StudyImporter importer = getTemplateImporter(datasetFinder, "globalbioticinteractions/template-dataset");
StudyImporterForTSV importerTSV = (StudyImporterForTSV) importer;
assertThat(importerTSV.getBaseUrl(), startsWith("https://github.com/globalbioticinteractions/template-dataset/"));
String actual = importerTSV.getDataset().getResourceURI("this/is/relative").toString();
assertThat(actual, startsWith("jar:file:"));
assertThat(actual, endsWith("this/is/relative"));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createWood.
@Test
public void createWood() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/wood2015");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForWood.class)));
StudyImporterForWood importerz = (StudyImporterForWood) importer;
assertThat(importerz.getSourceCitation(), containsString("Wood"));
assertThat(importerz.getDataset().getResourceURI(importerz.getLinksResourceName()).toString(), endsWith(".csv"));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createMetaTableREEM.
@Test
public void createMetaTableREEM() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/noaa-reem");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForMetaTable.class)));
final JsonNode config = ((StudyImporterForMetaTable) importer).getConfig();
assertThat(config, is(notNullValue()));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createSzoboszlai.
@Test
public void createSzoboszlai() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/szoboszlai2015");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForSzoboszlai.class)));
StudyImporterForSzoboszlai importerz = (StudyImporterForSzoboszlai) importer;
assertThat(importerz.getSourceCitation(), containsString("Szoboszlai"));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method defaultTSVImporterNotCached.
@Test
public void defaultTSVImporterNotCached() throws StudyImporterException, DatasetFinderException {
final DatasetFinder datasetFinder = new DatasetFinderGitHubRemote();
StudyImporter importer = getTemplateImporter(datasetFinder, "globalbioticinteractions/template-dataset");
assertThat(((StudyImporterForTSV) importer).getBaseUrl(), startsWith("https://raw.githubusercontent.com/globalbioticinteractions/template-dataset/"));
String actual = ((StudyImporterForTSV) importer).getDataset().getResourceURI("this/is/relative").toString();
assertThat(actual, startsWith("https:/"));
assertThat(actual, endsWith("this/is/relative"));
}
Aggregations