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

import com.fasterxml.jackson.annotation.JsonInclude;
import uk.ac.ebi.quickgo.common.FieldType;

import java.util.List;
import java.util.Optional;

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

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

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

	//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;

	//A description of the type of the gene or gene product being annotated. one of the following: protein_complex;
	// protein; transcript; ncRNA; rRNA; tRNA; snRNA; snoRNA; any subtype of ncRNA in the Sequence Ontology.
	public String type;

	//taxonomic identifier(s) The NCBI taxon ID of the species encoding the gene product. this field is mandatory,
	public Taxonomy taxonomy;

	public List<String> databaseSubset;

	//UPID
	public String referenceProteome;

	public boolean isIsoform;

	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	public static class Taxonomy implements FieldType {

		//Numeric id e.g. 35758
		public int id;

		//Organism name e.g. Streptomyces ghanaensis
		public String name;

		public Taxonomy(int identifier, String name) {
			this.id = identifier;
			this.name = name;
		}
	}
}

@@ -1303,33 +1303,205 @@
 ;%0A%0A%09
-public boolean isIsoform;
+//The identifier of the gene product from which this gene product was derived%0A%09public String parentId;%0A%0A%0A%09public boolean isIsoform;%0A%09public boolean isAnnotated;%0A%09public boolean isCompleteProteome;%0A
 %0A%0A%09@

Add parent id and isIsoform; isAnnotated; isCompleteProteome.