use of org.eol.globi.data.DatasetImporterWithListener in project eol-globi-data by jhpoelen.
the class DatasetImportUtil method importDatasets.
public static void importDatasets(Map<Pair<String, String>, Map<String, String>> interactionsWithUnresolvedOccurrenceIds, List<Dataset> datasets, ImportLogger logger, NodeFactory nodeFactory) throws StudyImporterException {
for (Dataset dataset : datasets) {
try {
importDataset(studyImporter -> {
if (studyImporter instanceof DatasetImporterWithListener) {
final InteractionListenerResolving interactionListener = new InteractionListenerResolving(interactionsWithUnresolvedOccurrenceIds, ((DatasetImporterWithListener) studyImporter).getInteractionListener());
((DatasetImporterWithListener) studyImporter).setInteractionListener(interactionListener);
}
}, dataset, nodeFactory, logger);
} catch (StudyImporterException | IllegalStateException ex) {
LogUtil.logError(logger, ex);
}
}
}
Aggregations