Search in sources :

Example 11 with DatasetRegistryGitHubRemote

use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote 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"));
}
Also used : DatasetRegistryGitHubRemote(org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote) DatasetImporterForGoMexSI2(org.eol.globi.data.DatasetImporterForGoMexSI2) BaseDatasetImporter(org.eol.globi.data.BaseDatasetImporter) DatasetImporter(org.eol.globi.data.DatasetImporter) Test(org.junit.Test)

Example 12 with DatasetRegistryGitHubRemote

use of org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote in project eol-globi-data by jhpoelen.

the class DatasetImporterFactoryImplIT method createMetaTableREEM.

@Test
public void createMetaTableREEM() throws StudyImporterException, DatasetRegistryException {
    final DatasetRegistryGitHubRemote datasetFinderGitHubRemote = new DatasetRegistryGitHubRemote(inStream -> inStream);
    DatasetImporter importer = importerFor(datasetFinderGitHubRemote, "globalbioticinteractions/noaa-reem");
    assertThat(importer, is(notNullValue()));
    assertThat(importer, is(instanceOf(DatasetImporterForMetaTable.class)));
    final JsonNode config = ((DatasetImporterForMetaTable) importer).getConfig();
    assertThat(config, is(notNullValue()));
}
Also used : DatasetImporterForMetaTable(org.eol.globi.data.DatasetImporterForMetaTable) DatasetRegistryGitHubRemote(org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote) JsonNode(com.fasterxml.jackson.databind.JsonNode) BaseDatasetImporter(org.eol.globi.data.BaseDatasetImporter) DatasetImporter(org.eol.globi.data.DatasetImporter) Test(org.junit.Test)

Aggregations

BaseDatasetImporter (org.eol.globi.data.BaseDatasetImporter)12 DatasetImporter (org.eol.globi.data.DatasetImporter)12 DatasetRegistryGitHubRemote (org.globalbioticinteractions.dataset.DatasetRegistryGitHubRemote)12 Test (org.junit.Test)12 JsonNode (com.fasterxml.jackson.databind.JsonNode)3 Dataset (org.globalbioticinteractions.dataset.Dataset)2 DatasetRegistry (org.globalbioticinteractions.dataset.DatasetRegistry)2 InputStream (java.io.InputStream)1 DatasetImporterForCoetzer (org.eol.globi.data.DatasetImporterForCoetzer)1 DatasetImporterForGoMexSI2 (org.eol.globi.data.DatasetImporterForGoMexSI2)1 DatasetImporterForHafner (org.eol.globi.data.DatasetImporterForHafner)1 DatasetImporterForMetaTable (org.eol.globi.data.DatasetImporterForMetaTable)1 DatasetImporterForPlanque (org.eol.globi.data.DatasetImporterForPlanque)1 DatasetImporterForSzoboszlai (org.eol.globi.data.DatasetImporterForSzoboszlai)1 DatasetImporterForWood (org.eol.globi.data.DatasetImporterForWood)1 DatasetFactory (org.globalbioticinteractions.dataset.DatasetFactory)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1