package uk.ac.ebi.quickgo.geneproduct.common.document;

/**
 * The fields of a Gene Product document.
 *
 * @author Ricardo Antunes
 */
public class GeneProductFields {
    public static final String ID = "id";
    public static final String DATABASE = "database";
    public static final String SYMBOL = "symbol";
    public static final String NAME = "name";
    public static final String SYNONYM = "synonym";
    public static final String TYPE = "type";
    public static final String TAXON_ID = "taxonId";
    public static final String TAXON_NAME = "taxonName";
    public static final String DATABASE_SUBSET = "dbSubset";
    public static final String COMPLETE_PROTEOME = "completeProteome";
    public static final String REFERENCE_POTEOME = "referenceProteome";
}

@@ -49,16 +49,95 @@
 ument;%0A%0A
+import java.util.Collections;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A
 /**%0A * T
@@ -849,6 +849,2406 @@
 e%22;%0A
-%7D
 %0A
+    /**%0A     * GeneProduct fields that are stored, and can therefore be retrieved.%0A     */%0A    public static final class Retrievable extends GeneProductFields %7B%0A        private static final Set%3CString%3E VALUES = new HashSet%3C%3E();%0A%0A        public static final String ID = storeAndGet(VALUES, GeneProductFields.ID);%0A        public static final String DATABASE = storeAndGet(VALUES, GeneProductFields.DATABASE);%0A        public static final String SYMBOL = storeAndGet(VALUES, GeneProductFields.SYMBOL);%0A        public static final String NAME = storeAndGet(VALUES, GeneProductFields.NAME);%0A        public static final String SYNONYM = storeAndGet(VALUES, GeneProductFields.SYNONYM);%0A        public static final String TYPE = storeAndGet(VALUES, GeneProductFields.TYPE);%0A        public static final String TAXON_ID = storeAndGet(VALUES, GeneProductFields.TAXON_ID);%0A        public static final String TAXON_NAME = storeAndGet(VALUES, GeneProductFields.TAXON_NAME);%0A        public static final String DATABASE_SUBSET = storeAndGet(VALUES, GeneProductFields.DATABASE_SUBSET);%0A        public static final String COMPLETE_PROTEOME = storeAndGet(VALUES, GeneProductFields.COMPLETE_PROTEOME);%0A        public static final String REFERENCE_POTEOME = storeAndGet(VALUES, GeneProductFields.REFERENCE_POTEOME);%0A%0A        public static boolean isRetrievable(String field) %7B%0A            return VALUES.contains(field);%0A        %7D%0A%0A        public static Set%3CString%3E retrievableFields() %7B%0A            return Collections.unmodifiableSet(VALUES);%0A        %7D%0A    %7D%0A%0A    public static final class Searchable extends GeneProductFields %7B%0A        private static final Set%3CString%3E VALUES = new HashSet%3C%3E();%0A%0A        public static final String ID = storeAndGet(VALUES, GeneProductFields.ID);%0A        public static final String SYMBOL = storeAndGet(VALUES, GeneProductFields.SYMBOL);%0A        public static final String NAME = storeAndGet(VALUES, GeneProductFields.NAME);%0A        public static final String SYNONYM = storeAndGet(VALUES, GeneProductFields.SYNONYM);%0A%0A        public static boolean isSearchable(String field) %7B%0A            return VALUES.contains(field);%0A        %7D%0A%0A        public static Set%3CString%3E searchableFields() %7B%0A            return Collections.unmodifiableSet(VALUES);%0A        %7D%0A    %7D%0A%0A    private static String storeAndGet(Set%3CString%3E values, String value) %7B%0A        values.add(value);%0A        return value;%0A    %7D%0A%7D

Add retrievable and searchable fields.