package uk.ac.ebi.quickgo.ontology.common.coterms;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;

/**
 * @author Tony Wardell
 * Date: 29/09/2016
 * Time: 11:50
 * Created with IntelliJ IDEA.
 */
@Configuration
public class CoTermRepoConfig {

    @Value("${coterm.file.manual}")
    private Resource manualResource;

    @Value("${coterm.file.all}")
    private Resource allResource;

    @Bean
    public CoTermRepository coTermRepository(){
        CoTermRepositorySimpleMap coTermRepository = new CoTermRepositorySimpleMap();
        CoTermRepositorySimpleMap.CoTermLoader coTermLoader = coTermRepository.new CoTermLoader(manualResource, allResource);
        coTermLoader.load();
        return coTermRepository;

    }


}

@@ -267,16 +267,100 @@
 e;%0A%0A/**%0A
+ * Configuration class related to loading and using co-occurring terms information.%0A
  * @auth
@@ -375,16 +375,16 @@
 Wardell%0A
-
  * Date:
@@ -691,16 +691,17 @@
 sitory()
+ 
 %7B%0A      
@@ -841,16 +841,32 @@
 Loader =
+%0A               
  coTermR
@@ -988,15 +988,12 @@
 ry;%0A
-%0A
     %7D%0A
-%0A%0A
 %7D%0A

Add javadoc, re-arrange code.