use of org.globalbioticinteractions.dataset.DatasetFinderWithCache in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method jsonldImporterCached.
@Test
public void jsonldImporterCached() throws StudyImporterException, DatasetFinderException {
final DatasetFinder datasetFinder = new DatasetFinderWithCache(new DatasetFinderGitHubArchive());
Dataset dataset = DatasetFactory.datasetFor("globalbioticinteractions/jsonld-template-dataset", datasetFinder);
StudyImporter importer = new GitHubImporterFactory().createImporter(dataset, null);
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForJSONLD.class)));
}
use of org.globalbioticinteractions.dataset.DatasetFinderWithCache 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.globalbioticinteractions.dataset.DatasetFinderWithCache in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method defaultTSVImporterCachedZenodo.
@Test
public void defaultTSVImporterCachedZenodo() throws StudyImporterException, DatasetFinderException {
final DatasetFinder datasetFinder = new DatasetFinderWithCache(new DatasetFinderZenodo());
StudyImporter importer = getTemplateImporter(datasetFinder, "globalbioticinteractions/template-dataset");
StudyImporterForTSV importerTSV = (StudyImporterForTSV) importer;
assertThat(importerTSV.getSourceCitation(), containsString("doi.org"));
}
Aggregations