use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createArthopodEasyCapture.
@Test
public void createArthopodEasyCapture() throws StudyImporterException, DatasetRegistryException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/arthropodEasyCaptureAMNH");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForRSS.class)));
assertThat(((DatasetImporterForRSS) importer).getRssFeedUrlString(), is(notNullValue()));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method defaultTSVImporterNotCached.
@Test
public void defaultTSVImporterNotCached() throws StudyImporterException, DatasetRegistryException, IOException {
final DatasetRegistry datasetRegistry = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = getTemplateImporter(datasetRegistry, "globalbioticinteractions/template-dataset");
assertThat(((DatasetImporterForTSV) importer).getBaseUrl(), startsWith("https://raw.githubusercontent.com/globalbioticinteractions/template-dataset/"));
InputStream actual = ((DatasetImporterForTSV) importer).getDataset().retrieve(URI.create("globi.json"));
assertThat(actual, is(notNullValue()));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createSIAD.
@Test
public void createSIAD() throws StudyImporterException, DatasetRegistryException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/siad");
assertThat(importer, is(notNullValue()));
Dataset dataset = ((BaseDatasetImporter) importer).getDataset();
final JsonNode config = dataset.getConfig();
assertThat(config, is(notNullValue()));
assertThat(dataset.getOrDefault(DatasetConstant.SHOULD_RESOLVE_REFERENCES, "donald"), is("false"));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createSzoboszlai.
@Test
public void createSzoboszlai() throws StudyImporterException, DatasetRegistryException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/szoboszlai2015");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForSzoboszlai.class)));
DatasetImporterForSzoboszlai importerz = (DatasetImporterForSzoboszlai) importer;
assertThat(importerz.getSourceCitation(), containsString("Szoboszlai"));
}
use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createWood.
@Test
public void createWood() throws StudyImporterException, DatasetRegistryException, IOException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/wood2015");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForWood.class)));
DatasetImporterForWood importerz = (DatasetImporterForWood) importer;
assertThat(importerz.getSourceCitation(), containsString("Wood"));
assertThat(importerz.getDataset().retrieve(URI.create("links")).toString(), is(notNullValue()));
}
Aggregations