use of org.eol.globi.data.DatasetImporterForRegistry in project eol-globi-data by jhpoelen.
the class IndexerDataset method indexDatasets.
private static void indexDatasets(DatasetRegistry registry, NodeFactory nodeFactory) {
try {
final Collection<String> namespaces = registry.findNamespaces();
String namespacelist = StringUtils.join(namespaces, CharsetConstant.SEPARATOR);
LOG.info("found dataset namespaces: {" + namespacelist + "}");
DatasetImporterForRegistry importer = new DatasetImporterForRegistry(new ParserFactoryLocal(), nodeFactory, registry);
importer.setDatasetFilter(x -> !DatasetUtil.isDeprecated(x));
importer.setDataset(new DatasetLocal(inStream -> inStream));
importer.setLogger(new NullImportLogger());
importer.importStudy();
} catch (DatasetRegistryException | StudyImporterException e) {
LOG.error("problem encountered while importing [" + DatasetImporterForRegistry.class.getName() + "]", e);
}
}
Aggregations