use of org.eol.globi.service.StudyImporterFactoryImpl in project eol-globi-data by jhpoelen.
the class DatasetImportUtil method importDataset.
public static void importDataset(StudyImporterConfigurator studyImporterConfigurator, Dataset dataset, NodeFactory nodeFactory, ImportLogger logger, GeoNamesService geoNamesService) throws StudyImporterException {
nodeFactory.getOrCreateDataset(dataset);
NodeFactory nodeFactoryForDataset = new NodeFactoryWithDatasetContext(nodeFactory, dataset);
DatasetImporter datasetImporter = new StudyImporterFactoryImpl(nodeFactoryForDataset).createImporter(dataset);
datasetImporter.setDataset(dataset);
if (studyImporterConfigurator != null) {
studyImporterConfigurator.configure(datasetImporter);
}
if (logger != null) {
datasetImporter.setLogger(logger);
}
if (geoNamesService != null) {
datasetImporter.setGeoNamesService(geoNamesService);
}
datasetImporter.importStudy();
}
Aggregations