All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencb.biodata.models.clinical.pedigree.Family Maven / Gradle / Ivy

The newest version!
/*
 * 
 *
 */

package org.opencb.biodata.models.clinical.pedigree;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * Created by imedina on 10/10/16.
 */
@Deprecated
public class Family {

    private String id;
    private Member father;
    private Member mother;

    private int numGenerations;
    private Set members;

    public Family() {
        this(null, null, null);
    }

    public Family(String id) {
        this(id, null, null);
    }

    public Family(String id, Member father, Member mother) {
        this.id = id;
        this.father = father;
        this.mother = mother;
        this.numGenerations = 0;
        this.members = new LinkedHashSet<>();
    }


    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Family{");
        sb.append("id='").append(id).append('\'');
        sb.append(", father=").append(father != null ? father.getName() : "-");
        sb.append(", mother=").append(mother != null ? mother.getName() : "-");
        sb.append(", numGenerations=").append(numGenerations);
        sb.append(", members={");
        if (members != null && members.size() > 0) {
            members.forEach(m -> sb.append(m.getName()).append(", "));
        }
        sb.append("} }");
        return sb.toString();
    }

    public String getId() {
        return id;
    }

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

    public Member getFather() {
        return father;
    }

    public Family setFather(Member father) {
        this.father = father;
        return this;
    }

    public Member getMother() {
        return mother;
    }

    public Family setMother(Member mother) {
        this.mother = mother;
        return this;
    }

    public int getNumGenerations() {
        return numGenerations;
    }

    public Family setNumGenerations(int numGenerations) {
        this.numGenerations = numGenerations;
        return this;
    }

    public Set getMembers() {
        return members;
    }

    public Family setMembers(Set members) {
        this.members = members;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy