package org.opencb.biodata.models.commons;

public class Phenotype extends OntologyTerm {

    private Status status;

    public enum Status {
        OBSERVED,
        NOT_OBSERVED,
        UNKNOWN
    }

    public Phenotype() {
    }

    public Phenotype(String id, String name, String source) {
        this(id, name, source, Status.UNKNOWN);
    }

    public Phenotype(String id, String name, String source, Status status) {
        super(id, name, source);
        this.status = status;
    }


    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Phenotype{");
        sb.append("id='").append(id).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append(", source='").append(source).append('\'');
        sb.append(", status=").append(status);
        sb.append('}');
        return sb.toString();
    }

    public String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

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

    public String getSource() {
        return source;
    }

    public Phenotype setSource(String source) {
        this.source = source;
        return this;
    }

    public Status getStatus() {
        return status;
    }

    public Phenotype setStatus(Status status) {
        this.status = status;
        return this;
    }
}

@@ -41,79 +41,237 @@
 s;%0A%0A
-public class Phenotype extends OntologyTerm %7B%0A%0A    private Status statu
+import java.util.Collection;%0Aimport java.util.Collections;%0Aimport java.util.Map;%0A%0Apublic class Phenotype extends OntologyTerm %7B%0A%0A    private String ageOfOnset;%0A    private Status status;%0A%0A    private Map%3CString, String%3E attribute
 s;%0A%0A
@@ -478,24 +478,28 @@
 ame, source,
+ %22%22,
  Status.UNKN
@@ -501,16 +501,40 @@
 .UNKNOWN
+, Collections.emptyMap()
 );%0A    %7D
@@ -624,60 +624,339 @@
     
-super(id, name, source);%0A        this.status = statu
+this(id, name, source, %22%22, status, Collections.emptyMap());%0A    %7D%0A%0A    public Phenotype(String id, String name, String source, String ageOfOnset, Status status, Map%3CString, String%3E attributes) %7B%0A        super(id, name, source);%0A        this.ageOfOnset = ageOfOnset;%0A        this.status = status;%0A        this.attributes = attribute
 s;%0A 
@@ -961,17 +961,16 @@
 %0A    %7D%0A%0A
-%0A
     @Ove
@@ -1288,16 +1288,140 @@
 tatus);%0A
+        sb.append(%22, ageOfOnset='%22).append(ageOfOnset).append('%5C'');%0A        sb.append(%22, attributes=%22).append(attributes);%0A
         
@@ -2107,11 +2107,421 @@
 s;%0A    %7D
+%0A%0A    public String getAgeOfOnset() %7B%0A        return ageOfOnset;%0A    %7D%0A%0A    public Phenotype setAgeOfOnset(String ageOfOnset) %7B%0A        this.ageOfOnset = ageOfOnset;%0A        return this;%0A    %7D%0A%0A    public Map%3CString, String%3E getAttributes() %7B%0A        return attributes;%0A    %7D%0A%0A    public Phenotype setAttributes(Map%3CString, String%3E attributes) %7B%0A        this.attributes = attributes;%0A        return this;%0A    %7D
 %0A%7D%0A

add new 'ageOfOnset' and 'attributes' fields to Phenotype data model