package uk.ac.ebi.quickgo.geneproduct.model;

import uk.ac.ebi.quickgo.geneproduct.common.GeneProductType;

import java.util.List;

/**
 * Represents a domain model instance of a gene product.
 *
 * See http://geneontology.org/page/gene-product-information-gpi-format
 *
 * @author Tony Wardell
 * Date: 22/03/2016
 * Time: 14:10
 * Created with IntelliJ IDEA.
 */
public class GeneProduct {

    // UniProt, RNA Central, Intact
    public String database;

    // e.g. A0A000 http://www.uniprot.org/uniprot/A0A000
    public String id;

    // A (unique and valid) symbol to which DB object ID is matched this field is mandatory, cardinality 1
    public String symbol;

    // name of gene or gene product this field is not mandatory, cardinality 0, 1 [white space allowed]
    public String name;

    // Gene symbol [or other text]
    public List<String> synonyms;

    // Protein; RNA or complex
    public GeneProductType type;

    // NCBI taxon id of the species encoding the gene product.
    public int taxonId;

    public String databaseSubset;

    // UPID
    public String referenceProteome;

    // The id of the gene product from which this gene product was derived
    public String parentId;

    public boolean isIsoform;

    public boolean isAnnotated;

    //todo maybe.. this value could be replaced with the UPID (as we have for referenceProteome)
    public boolean isCompleteProteome;

    @Override
    public String toString() {
        return "GeneProduct{" +
                "database='" + database + '\'' +
                ", id='" + id + '\'' +
                ", symbol='" + symbol + '\'' +
                ", name='" + name + '\'' +
                ", synonyms=" + synonyms +
                ", type=" + type +
                ", databaseSubset=" + databaseSubset +
                ", referenceProteome='" + referenceProteome + '\'' +
                ", parentId='" + parentId + '\'' +
                ", isIsoform=" + isIsoform +
                ", isCompleteProteome=" + isCompleteProteome +
                '}';
    }
}
@@ -1375,61 +1375,195 @@
     
-public boolean isCompleteProteome;%0A%0A    @Override%0A   
+@Deprecated //replaced by proteomeMembership%0A    public boolean isCompleteProteome;%0A%0A    // The assigned value fromProteomeMembership */%0A    public Enum proteomeMembership;%0A%0A    @Override
  pub
@@ -1870,24 +1870,65 @@
 =%22 + type +%0A
+                %22, taxonId=%22 + taxonId +%0A
             
@@ -1949,16 +1949,17 @@
 eSubset=
+'
 %22 + data
@@ -1970,16 +1970,23 @@
 Subset +
+ '%5C'' +
 %0A       
@@ -2143,16 +2143,65 @@
 oform +%0A
+                %22, isAnnotated=%22 + isAnnotated +%0A
         
@@ -2251,24 +2251,87 @@
 eProteome +%0A
+                %22, proteomeMembership=%22 + proteomeMembership +%0A
             
@@ -2346,8 +2346,9 @@
 %0A    %7D%0A%7D
+%0A

Add enum proteomeMembership - a replacement for isCompleteProteome that holds the relationship to a reference or complete proteome the gene product has.