All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.molgenis.data.csv.CsvDataConfig Maven / Gradle / Ivy

There is a newer version: 8.4.5
Show newest version
package org.molgenis.data.csv;

import javax.annotation.PostConstruct;
import org.molgenis.data.file.FileRepositoryCollectionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CsvDataConfig {

  @Autowired private FileRepositoryCollectionFactory fileRepositorySourceFactory;

  /**
   * Registers the CsvRepositorySource factory so it can be used by
   * DataService.createFileRepositorySource(File file);
   */
  @PostConstruct
  public void registerCsvRepositorySource() {
    fileRepositorySourceFactory.addFileRepositoryCollectionClass(
        CsvRepositoryCollection.class, CsvFileExtensions.getCSV());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy