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

org.molgenis.ontology.OntologyDataConfig Maven / Gradle / Ivy

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

import javax.annotation.PostConstruct;

import org.molgenis.data.FileRepositoryCollectionFactory;
import org.molgenis.data.support.GenericImporterExtensions;
import org.molgenis.ontology.importer.repository.OntologyRepositoryCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OntologyDataConfig
{

	@Autowired
	private FileRepositoryCollectionFactory fileRepositorySourceFactory;

	/**
	 * Registers the OntologyRepositorySource factory so it can be used by DataService.createFileRepositorySource(File
	 * file);
	 */
	@PostConstruct
	public void registerOntologyRepositorySource()
	{
		fileRepositorySourceFactory.addFileRepositoryCollectionClass(OntologyRepositoryCollection.class,
				GenericImporterExtensions.getOntology());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy