@@ -0,0 +1,1752 @@
+package uk.ac.ebi.quickgo.annotation.service.comm.rest.geneproduct.transformer;%0A%0Aimport uk.ac.ebi.quickgo.annotation.model.Annotation;%0Aimport uk.ac.ebi.quickgo.annotation.service.comm.rest.geneproduct.model.BasicGeneProduct;%0Aimport uk.ac.ebi.quickgo.rest.search.request.FilterRequest;%0Aimport uk.ac.ebi.quickgo.rest.search.request.converter.ConvertedFilter;%0Aimport uk.ac.ebi.quickgo.rest.search.results.transformer.AbstractValueInjector;%0A%0Aimport java.util.List;%0A%0A/**%0A * Responsible for supplementing an %7B@link Annotation%7D instance, which contains%0A * a gene product identifier, with a list of gene product synonyms, through the use of a RESTful service.%0A * @author Tony Wardell%0A * Date: 23/06/2017%0A * Time: 14:56%0A * Created with IntelliJ IDEA.%0A */%0Apublic class GeneProductTypeInjector extends AbstractValueInjector%3CBasicGeneProduct, Annotation%3E %7B%0A%0A    private static final String GENE_PRODUCT_ID = %22geneProductId%22;%0A    static final String GENE_PRODUCT_TYPE = %22type%22;%0A%0A    @Override%0A    public String getId() %7B%0A        return GENE_PRODUCT_TYPE;%0A    %7D%0A%0A    @Override%0A    public FilterRequest buildFilterRequest(Annotation annotation) %7B%0A        return FilterRequest.newBuilder()%0A                            .addProperty(getId())%0A                            .addProperty(GENE_PRODUCT_ID, annotation.geneProductId.split(%22:%22)%5B1%5D)%0A                            .build();%0A    %7D%0A%0A    @Override%0A    public void injectValueFromResponse(ConvertedFilter%3CBasicGeneProduct%3E convertedRequest, Annotation annotation) %7B%0A        BasicGeneProduct response = convertedRequest.getConvertedValue();%0A%0A        List%3CBasicGeneProduct.Result%3E results = response.getResults();%0A        if (!results.isEmpty()) %7B%0A            annotation.name = results.get(0).getType();%0A        %7D%0A    %7D%0A%7D%0A

Create injector for gene product type.