org.opencb.biodata.models.clinical.interpretation.CancerPanel Maven / Gradle / Ivy
The newest version!
package org.opencb.biodata.models.clinical.interpretation;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.collections4.CollectionUtils;
import org.opencb.biodata.models.clinical.ClinicalProperty.RoleInCancer;
import java.util.Collections;
import java.util.List;
public class CancerPanel {
private boolean somatic;
private boolean germline;
private List roles;
private List tissues;
private List somaticTumourTypes;
private List germlineTumourTypes;
private List fusionPartners;
public CancerPanel() {
}
@Deprecated
public CancerPanel(boolean somatic, boolean germline, RoleInCancer role, List tissues,
List somaticTumourTypes, List germlineTumourTypes, List fusionPartners) {
this.somatic = somatic;
this.germline = germline;
this.roles = role != null ? Collections.singletonList(role) : null;
this.tissues = tissues;
this.somaticTumourTypes = somaticTumourTypes;
this.germlineTumourTypes = germlineTumourTypes;
this.fusionPartners = fusionPartners;
}
public CancerPanel(boolean somatic, boolean germline, List roles, List tissues,
List somaticTumourTypes, List germlineTumourTypes, List fusionPartners) {
this.somatic = somatic;
this.germline = germline;
this.roles = roles;
this.tissues = tissues;
this.somaticTumourTypes = somaticTumourTypes;
this.germlineTumourTypes = germlineTumourTypes;
this.fusionPartners = fusionPartners;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("Cancer{");
sb.append("somatic=").append(somatic);
sb.append(", germline=").append(germline);
sb.append(", roles=").append(roles);
sb.append(", tissues=").append(tissues);
sb.append(", somaticTumourTypes=").append(somaticTumourTypes);
sb.append(", germlineTumourTypes=").append(germlineTumourTypes);
sb.append(", fusionPartners=").append(fusionPartners);
sb.append('}');
return sb.toString();
}
public boolean isSomatic() {
return somatic;
}
public CancerPanel setSomatic(boolean somatic) {
this.somatic = somatic;
return this;
}
public boolean isGermline() {
return germline;
}
public CancerPanel setGermline(boolean germline) {
this.germline = germline;
return this;
}
@Deprecated
@JsonIgnore
public RoleInCancer getRole() {
return CollectionUtils.isNotEmpty(roles) ? roles.get(0) : null;
}
@Deprecated
@JsonIgnore
public CancerPanel setRole(RoleInCancer role) {
this.roles = role != null ? Collections.singletonList(role) : null;
return this;
}
public List getRoles() {
return roles;
}
public CancerPanel setRoles(List roles) {
this.roles = roles;
return this;
}
public List getTissues() {
return tissues;
}
public CancerPanel setTissues(List tissues) {
this.tissues = tissues;
return this;
}
public List getSomaticTumourTypes() {
return somaticTumourTypes;
}
public CancerPanel setSomaticTumourTypes(List somaticTumourTypes) {
this.somaticTumourTypes = somaticTumourTypes;
return this;
}
public List getGermlineTumourTypes() {
return germlineTumourTypes;
}
public CancerPanel setGermlineTumourTypes(List germlineTumourTypes) {
this.germlineTumourTypes = germlineTumourTypes;
return this;
}
public List getFusionPartners() {
return fusionPartners;
}
public CancerPanel setFusionPartners(List fusionPartners) {
this.fusionPartners = fusionPartners;
return this;
}
}