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

/**
 *
 * Types of CoTerm data by annotation source.
 *
 * @author Tony Wardell
 * Date: 29/09/2016
 * Time: 15:49
 * Created with IntelliJ IDEA.
 */
public enum CoTermSource {

    ALL,
    MANUAL
}

@@ -45,16 +45,78 @@
 terms;%0A%0A
+import java.util.Arrays;%0Aimport java.util.stream.Collectors;%0A%0A
 /**%0A *%0A 
@@ -304,11 +304,590 @@
   MANUAL
+;%0A%0A    /**%0A     * Test to see if a value exists as a CoTermSource.%0A     */%0A    public static boolean isValidValue(String value) %7B%0A       return Arrays.stream(CoTermSource.values())%0A                .map(CoTermSource::name)%0A                .anyMatch(n -%3E n.equals(value));%0A    %7D%0A%0A    /**%0A     * Populate a String of CoTerm source values.%0A     * @return list of CoTermSource values.%0A     */%0A    public static String valuesAsCSV() %7B%0A        return Arrays.stream(CoTermSource.values())%0A                .map(CoTermSource::name)%0A                .collect(Collectors.joining(%22, %22));%0A    %7D
 %0A%7D%0A

Add some methods for validation.