use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createMetaTable.
@Test
public void createMetaTable() throws DatasetFinderException, StudyImporterException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/AfricaTreeDatabase");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForMetaTable.class)));
assertThat(((StudyImporterForMetaTable) importer).getConfig(), is(notNullValue()));
assertThat(((StudyImporterForMetaTable) importer).getBaseUrl(), startsWith("https://raw.githubusercontent.com/globalbioticinteractions/AfricaTreeDatabase/"));
}
use of org.eol.globi.data.StudyImporter 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.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class NormalizerTest method importData.
private static void importData(Class<? extends StudyImporter> importer, NodeFactoryNeo4j factory) throws StudyImporterException {
StudyImporter studyImporter = createStudyImporter(importer, factory);
LOG.info("[" + importer + "] importing ...");
studyImporter.importStudy();
LOG.info("[" + importer + "] imported.");
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createGoMexSI.
@Test
public void createGoMexSI() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "gomexsi/interaction-data");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForGoMexSI2.class)));
StudyImporterForGoMexSI2 gomexsiImporter = (StudyImporterForGoMexSI2) importer;
assertThat(gomexsiImporter.getSourceCitation(), is("http://gomexsi.tamucc.edu"));
}
use of org.eol.globi.data.StudyImporter in project eol-globi-data by jhpoelen.
the class GitHubImporterFactoryIT method createPlanque.
@Test
public void createPlanque() throws StudyImporterException, DatasetFinderException {
final DatasetFinderGitHubRemote datasetFinderGitHubRemote = new DatasetFinderGitHubRemote();
StudyImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/planque2014");
assertThat(importer, is(notNullValue()));
assertThat(importer, is(instanceOf(StudyImporterForPlanque.class)));
StudyImporterForPlanque importerz = (StudyImporterForPlanque) importer;
assertThat(importerz.getSourceCitation(), containsString("Planque"));
assertThat(importerz.getLinks(), is(notNullValue()));
assertThat(importerz.getReferences(), is(notNullValue()));
assertThat(importerz.getReferencesForLinks(), is(notNullValue()));
}
Aggregations