package uk.ac.ebi.quickgo.annotation.service.comm.rest.geneproduct.model;

import uk.ac.ebi.quickgo.rest.comm.ResponseType;

import java.util.List;

/**
 * Represents part of the model corresponding to the response available from the resource:
 *
 * <ul>
 *     <li>/geneproduct/{id}</li>
 * </ul>
 *
 * This model captures the parts reached by the JSON path expression, "$.results.name; $.results.synonyms;".
 * @author Tony Wardell
 * Date: 23/06/2017
 * Time: 15:07
 * Created with IntelliJ IDEA.
 */
public class BasicGeneProduct implements ResponseType {

    private List<Result> results;

    public BasicGeneProduct() {}

    public List<Result> getResults() {
        return results;
    }

    public void setResults(List<Result> results) {
        this.results = results;
    }

    @Override public String toString() {
        return "ResponseType{" +
                "results=" + results +
                '}';
    }

    public static class Result {
        private String id;
        private String name;
        private List<String> synonyms;

        public Result() {}

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<String> getSynonyms() {
            return synonyms;
        }

        public void setSynonyms(List<String> synonyms) {
            this.synonyms = synonyms;
        }

        @Override public String toString() {
            return "Result{" +
                    "id='" + id + '\'' +
                    ", name='" + name + '\'' +
                    ", synonyms=" + synonyms +
                    '}';
        }
    }
}

@@ -1051,16 +1051,45 @@
 ynonyms;
+%0A        private String type;
 %0A%0A      
@@ -1588,32 +1588,186 @@
 yms;%0A        %7D%0A%0A
+        public String getType() %7B%0A            return type;%0A        %7D%0A%0A        public void setType(String type) %7B%0A            this.type = type;%0A        %7D%0A%0A
         @Overrid
@@ -1957,24 +1957,71 @@
  synonyms +%0A
+                    %22, type='%22 + type + '%5C'' +%0A
             

Add gene product type.