package uk.ac.ebi.quickgo.index.annotation.coterms;

import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;

/**
 * @author Tony Wardell
 * Date: 12/09/2016
 * Time: 15:01
 * Created with IntelliJ IDEA.
 */
public class Co_occurringTermsStepExecutionListener implements StepExecutionListener {

    private final AnnotationCo_occurringTermsAggregator all;
    private final AnnotationCo_occurringTermsAggregator manual;

    public Co_occurringTermsStepExecutionListener(AnnotationCo_occurringTermsAggregator all,
            AnnotationCo_occurringTermsAggregator manual) {
        this.all = all;
        this.manual = manual;
    }

    @Override public void beforeStep(StepExecution stepExecution) {

    }

    @Override public ExitStatus afterStep(StepExecution stepExecution) {
        all.finish();
        manual.finish();
        return ExitStatus.COMPLETED;
    }
}

@@ -215,16 +215,128 @@
 r;%0A%0A/**%0A
+ * Listener to be activated when all annotations have been passed to the co-occurring term aggregation code.%0A *%0A
  * @auth
@@ -917,32 +917,256 @@
 tion) %7B%0A%0A    %7D%0A%0A
+    /**%0A     * Call finish() on the aggregation instances, so the last accumulating buckets can be processed.%0A     * @param stepExecution%0A     * @return 'COMPLETED' once the aggregation code has finished processing.%0A     */%0A
     @Override pu

Add some javadoc.