@@ -0,0 +1,2152 @@
+package uk.ac.ebi.quickgo.annotation;%0A%0Aimport java.util.function.Function;%0A%0A/**%0A * A helper class containing a set of utility methods to help generate ids for different fields of the annotation.%0A *%0A * @author Ricardo Antunes%0A */%0Apublic class IdGeneratorUtil %7B%0A    /**%0A     * Generates a gene product identifier based on the number provided as an argument%0A     *%0A     * @param idNum a number to base the id generation on%0A     * @return a gene product identifier%0A     */%0A    public static String createGPId(int idNum) %7B%0A        return String.format(%22A0A%2503d%22, idNum);%0A    %7D%0A%0A    /**%0A     * Generate an evidence code based on the number provided as an argument%0A     *%0A     * @param idNum a number to base the evidence code generation on%0A     * @return an evidence code identifier%0A     */%0A    public static String createEvidenceCode(int idNum) %7B%0A        return String.format(%22ECO:%2507d%22, idNum);%0A    %7D%0A%0A    /**%0A     * Generate a GO_REF code based on the number provided as an argument%0A     *%0A     * @param idNum a number to base the GO_REF generation on%0A     * @return an GO_REF identifier%0A     */%0A    public static String createGoRef(int idNum) %7B%0A        return String.format(%22GO_REF:%2507d%22, idNum);%0A    %7D%0A%0A    /**%0A     * Generate a GO term identifier based on the number provided as an argument%0A     *%0A     * @param idNum a number to base the Go term identifier generation on%0A     * @return a GO identifier%0A     */%0A    public static String createGoId(int idNum) %7B%0A        return String.format(%22GO:%2507d%22, idNum);%0A    %7D%0A%0A    /**%0A     * Method that takes in the number of values to generate, and a value generator and returns an array of generated%0A     * values.%0A     *%0A     * @param valueGenerator contains the logic to generate a specific value%0A     * @param numberOfValues number of values to generate%0A     * @return an array of generated values%0A     */%0A    public static String%5B%5D generateValues(Function%3CInteger, String%3E valueGenerator, int numberOfValues) %7B%0A        String%5B%5D values = new String%5BnumberOfValues%5D;%0A%0A        for (int i = 0; i %3C numberOfValues; i++) %7B%0A            values%5Bi%5D = valueGenerator.apply(i);%0A        %7D%0A%0A        return values;%0A    %7D%0A%7D

Create utility class that generates IDs.