use of org.eol.globi.data.DatasetImporter in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method getTemplateImporter.
DatasetImporter getTemplateImporter(DatasetRegistry datasetRegistry, String repo) throws DatasetRegistryException, StudyImporterException {
Dataset dataset = new DatasetFactory(datasetRegistry).datasetFor(repo);
DatasetImporter importer = new StudyImporterFactoryImpl(null).createImporter(dataset);
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForTSV.class)));
return importer;
}
use of org.eol.globi.data.DatasetImporter 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.eol.globi.data.DatasetImporter 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()));
}
use of org.eol.globi.data.DatasetImporter in project eol-globi-data by jhpoelen.
the class DatasetImporterFactoryImplIT method createGoMexSI.
@Test
public void createGoMexSI() throws StudyImporterException, DatasetRegistryException {
final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "gomexsi/interaction-data");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(DatasetImporterForGoMexSI2.class)));
DatasetImporterForGoMexSI2 gomexsiImporter = (DatasetImporterForGoMexSI2) importer;
assertThat(gomexsiImporter.getSourceCitation(), is("http://gomexsi.tamucc.edu"));
}
use of org.eol.globi.data.DatasetImporter in project eol-globi-data by jhpoelen.
the class NodeFactoryTest method createStudyImporter.
private static DatasetImporter createStudyImporter(Class<? extends DatasetImporter> studyImporter, NodeFactory factory) throws StudyImporterException {
DatasetImporter importer = new StudyImporterTestFactory(factory).instantiateImporter(studyImporter);
importer.setLogger(new NullImportLogger());
return importer;
}
Aggregations