Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* File: org.molgenis.omx/model/ProbeSet.java
* Generator: org.molgenis.generators.DataTypeGen 4.0.0-testing
*
* THIS FILE HAS BEEN GENERATED, PLEASE DO NOT EDIT!
*/
package org.molgenis.omx.xgap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.molgenis.data.AttributeMetaData;
import org.molgenis.data.support.MapEntity;
import org.molgenis.data.Entity;
/**
* ProbeSet: A set of Probes. E.g. an Affymetrix probeset has multiple
probes. It implements locus because sometimes you want to give the complete set of probes a range,
for example: indicating that this set of probes spans basepair 0 through 10.000.000 on chromosome 3.
The same information could arguably also be queried from the probes themselves, but if you have 40k probes,
retrieving the same information from only ProbeSet (if annotated so) would be much faster..
* @author MOLGENIS generator
*/
@javax.persistence.Entity
@javax.persistence.Table(name = "ProbeSet"
)
@javax.xml.bind.annotation.XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.FIELD)
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value={"EI_EXPOSE_REP", "EI_EXPOSE_REP2"}, justification="Exposing internal representation is accepted")
public class ProbeSet extends org.molgenis.omx.observ.ObservationTarget implements org.molgenis.data.Entity, org.molgenis.omx.xgap.Locus
{
/** default serial version ID */
private static final long serialVersionUID = 1L;
public final static String ENTITY_NAME = "ProbeSet";
// fieldname constants
public final static String CHROMOSOME = "Chromosome";
public final static String CM = "cM";
public final static String BPSTART = "bpStart";
public final static String BPEND = "bpEnd";
public final static String SEQ = "Seq";
public final static String SYMBOL = "Symbol";
public final static String ID = "id";
// member variables (including setters.getters for interface)
public String getEntityName()
{
return ENTITY_NAME;
}
//Reference to the chromosome this position belongs to.[type=xref]
@javax.persistence.ManyToOne(fetch=javax.persistence.FetchType.EAGER /*cascade={javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.PERSIST, javax.persistence.CascadeType.REFRESH}*/)
@javax.persistence.JoinColumn(name="Chromosome")
private org.molgenis.omx.xgap.Chromosome chromosome = null;
//genetic map position in centi morgan (cM).[type=decimal]
@javax.persistence.Column(name="cM")
@javax.xml.bind.annotation.XmlElement(name="cM")
private Double cM = null;
//numeric basepair postion (5') on the chromosome[type=long]
@javax.persistence.Column(name="bpStart")
@javax.xml.bind.annotation.XmlElement(name="bpStart")
private Long bpStart = null;
//numeric basepair postion (3') on the chromosome[type=long]
@javax.persistence.Column(name="bpEnd")
@javax.xml.bind.annotation.XmlElement(name="bpEnd")
private Long bpEnd = null;
//The FASTA text representation of the sequence.[type=text]
@javax.persistence.Lob
@javax.persistence.Column(name="Seq")
private String seq = null;
//todo[type=string]
@javax.persistence.Column(name="Symbol", length=255)
@javax.xml.bind.annotation.XmlElement(name="symbol")
private String symbol = null;
//automatically generated internal id, only for internal use.[type=int]
//constructors
public ProbeSet()
{
//set the type for a new instance
set__Type(this.getClass().getSimpleName());
}
//getters and setters
/**
* Get the Reference to the chromosome this position belongs to..
* @return chromosome.
*/
public org.molgenis.omx.xgap.Chromosome getChromosome()
{
return this.chromosome;
}
/**
* Set the Reference to the chromosome this position belongs to..
* @param chromosome
*/
public void setChromosome( org.molgenis.omx.xgap.Chromosome chromosome)
{
this.chromosome = chromosome;
}
/**
* Get the genetic map position in centi morgan (cM)..
* @return cM.
*/
public Double getCM()
{
return this.cM;
}
/**
* Set the genetic map position in centi morgan (cM)..
* @param cM
*/
public void setCM( Double cM)
{
this.cM = cM;
}
/**
* Get the numeric basepair postion (5') on the chromosome.
* @return bpStart.
*/
public Long getBpStart()
{
return this.bpStart;
}
/**
* Set the numeric basepair postion (5') on the chromosome.
* @param bpStart
*/
public void setBpStart( Long bpStart)
{
this.bpStart = bpStart;
}
/**
* Get the numeric basepair postion (3') on the chromosome.
* @return bpEnd.
*/
public Long getBpEnd()
{
return this.bpEnd;
}
/**
* Set the numeric basepair postion (3') on the chromosome.
* @param bpEnd
*/
public void setBpEnd( Long bpEnd)
{
this.bpEnd = bpEnd;
}
/**
* Get the The FASTA text representation of the sequence..
* @return seq.
*/
public String getSeq()
{
return this.seq;
}
/**
* Set the The FASTA text representation of the sequence..
* @param seq
*/
public void setSeq( String seq)
{
this.seq = seq;
}
/**
* Get the todo.
* @return symbol.
*/
public String getSymbol()
{
return this.symbol;
}
/**
* Set the todo.
* @param symbol
*/
public void setSymbol( String symbol)
{
this.symbol = symbol;
}
/**
* Generic getter. Get the property by using the name.
*/
@Override
public Object get(String name)
{
name = name.toLowerCase();
if (name.equals("id"))
return getId();
if (name.equals("identifier"))
return getIdentifier();
if (name.equals("name"))
return getName();
if (name.equals("__type"))
return get__Type();
if(name.equals("__type_label"))
return get__TypeLabel();
if (name.equals("description"))
return getDescription();
if (name.equals("chromosome"))
return getChromosome();
if (name.equals("cm"))
return getCM();
if (name.equals("bpstart"))
return getBpStart();
if (name.equals("bpend"))
return getBpEnd();
if (name.equals("seq"))
return getSeq();
if (name.equals("symbol"))
return getSymbol();
return null;
}
@Override
public void set(org.molgenis.data.Entity entity, boolean strict)
{
//set Id
// query formal name, else lowercase name
if(entity.getInt("id") != null) this.setId(entity.getInt("id"));
else if(entity.getInt("id") != null) this.setId(entity.getInt("id"));
else if(strict) this.setId(entity.getInt("id")); // setting null is not an option due to function overloading
if( entity.getInt("probeset_id") != null) this.setId(entity.getInt("probeset_id"));
else if( entity.getInt("ProbeSet_id") != null) this.setId(entity.getInt("ProbeSet_id"));
//set Identifier
// query formal name, else lowercase name
if(entity.getString("identifier") != null) this.setIdentifier(entity.getString("identifier"));
else if(entity.getString("Identifier") != null) this.setIdentifier(entity.getString("Identifier"));
else if(strict) this.setIdentifier(entity.getString("identifier")); // setting null is not an option due to function overloading
if( entity.getString("probeset_identifier") != null) this.setIdentifier(entity.getString("probeset_identifier"));
else if( entity.getString("ProbeSet_Identifier") != null) this.setIdentifier(entity.getString("ProbeSet_Identifier"));
//set Name
// query formal name, else lowercase name
if(entity.getString("name") != null) this.setName(entity.getString("name"));
else if(entity.getString("Name") != null) this.setName(entity.getString("Name"));
else if(strict) this.setName(entity.getString("name")); // setting null is not an option due to function overloading
if( entity.getString("probeset_name") != null) this.setName(entity.getString("probeset_name"));
else if( entity.getString("ProbeSet_Name") != null) this.setName(entity.getString("ProbeSet_Name"));
//set __Type
// query formal name, else lowercase name
if(entity.getString("__type") != null) this.set__Type(entity.getString("__type"));
else if(entity.getString("__Type") != null) this.set__Type(entity.getString("__Type"));
else if(strict) this.set__Type(entity.getString("__type")); // setting null is not an option due to function overloading
if( entity.getString("probeset___type") != null) this.set__Type(entity.getString("probeset___type"));
else if( entity.getString("ProbeSet___Type") != null) this.set__Type(entity.getString("ProbeSet___Type"));
//set Description
// query formal name, else lowercase name
if(entity.getString("description") != null) this.setDescription(entity.getString("description"));
else if(entity.getString("description") != null) this.setDescription(entity.getString("description"));
else if(strict) this.setDescription(entity.getString("description")); // setting null is not an option due to function overloading
if( entity.getString("probeset_description") != null) this.setDescription(entity.getString("probeset_description"));
else if( entity.getString("ProbeSet_description") != null) this.setDescription(entity.getString("ProbeSet_description"));
//set Chromosome
// query formal name, else lowercase name
if( entity.getEntity("Chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("Chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
else if( entity.getEntity("chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
else if( entity.getEntity("ProbeSet_Chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("ProbeSet_Chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
else if( entity.getEntity("probeset_chromosome", org.molgenis.omx.xgap.Chromosome.class) != null) {
this.setChromosome(entity.getEntity("ProbeSet_Chromosome", org.molgenis.omx.xgap.Chromosome.class));
}
//set CM
// query formal name, else lowercase name
if(entity.getDouble("cm") != null) this.setCM(entity.getDouble("cm"));
else if(entity.getDouble("cM") != null) this.setCM(entity.getDouble("cM"));
else if(strict) this.setCM(entity.getDouble("cm")); // setting null is not an option due to function overloading
if( entity.getDouble("probeset_cm") != null) this.setCM(entity.getDouble("probeset_cm"));
else if( entity.getDouble("ProbeSet_cM") != null) this.setCM(entity.getDouble("ProbeSet_cM"));
//set BpStart
// query formal name, else lowercase name
if(entity.getLong("bpstart") != null) this.setBpStart(entity.getLong("bpstart"));
else if(entity.getLong("bpStart") != null) this.setBpStart(entity.getLong("bpStart"));
else if(strict) this.setBpStart(entity.getLong("bpstart")); // setting null is not an option due to function overloading
if( entity.getLong("probeset_bpstart") != null) this.setBpStart(entity.getLong("probeset_bpstart"));
else if( entity.getLong("ProbeSet_bpStart") != null) this.setBpStart(entity.getLong("ProbeSet_bpStart"));
//set BpEnd
// query formal name, else lowercase name
if(entity.getLong("bpend") != null) this.setBpEnd(entity.getLong("bpend"));
else if(entity.getLong("bpEnd") != null) this.setBpEnd(entity.getLong("bpEnd"));
else if(strict) this.setBpEnd(entity.getLong("bpend")); // setting null is not an option due to function overloading
if( entity.getLong("probeset_bpend") != null) this.setBpEnd(entity.getLong("probeset_bpend"));
else if( entity.getLong("ProbeSet_bpEnd") != null) this.setBpEnd(entity.getLong("ProbeSet_bpEnd"));
//set Seq
// query formal name, else lowercase name
if(entity.getString("seq") != null) this.setSeq(entity.getString("seq"));
else if(entity.getString("Seq") != null) this.setSeq(entity.getString("Seq"));
else if(strict) this.setSeq(entity.getString("seq")); // setting null is not an option due to function overloading
if( entity.getString("probeset_seq") != null) this.setSeq(entity.getString("probeset_seq"));
else if( entity.getString("ProbeSet_Seq") != null) this.setSeq(entity.getString("ProbeSet_Seq"));
//set Symbol
// query formal name, else lowercase name
if(entity.getString("symbol") != null) this.setSymbol(entity.getString("symbol"));
else if(entity.getString("Symbol") != null) this.setSymbol(entity.getString("Symbol"));
else if(strict) this.setSymbol(entity.getString("symbol")); // setting null is not an option due to function overloading
if( entity.getString("probeset_symbol") != null) this.setSymbol(entity.getString("probeset_symbol"));
else if( entity.getString("ProbeSet_Symbol") != null) this.setSymbol(entity.getString("ProbeSet_Symbol"));
}
@Override
public String toString()
{
return this.toString(false);
}
public String toString(boolean verbose)
{
StringBuilder sb = new StringBuilder("ProbeSet(");
sb.append("id='" + getId()+"' ");
sb.append("identifier='" + getIdentifier()+"' ");
sb.append("name='" + getName()+"' ");
sb.append("__Type='" + get__Type()+"' ");
sb.append("description='" + getDescription()+"' ");
sb.append("chromosome='" + getChromosome()+"' ");
sb.append("cM='" + getCM()+"' ");
sb.append("bpStart='" + getBpStart()+"' ");
sb.append("bpEnd='" + getBpEnd()+"' ");
sb.append("seq='" + getSeq()+"' ");
sb.append("symbol='" + getSymbol()+"'");
sb.append(");");
return sb.toString();
}
@Override
public Integer getIdValue()
{
return getId();
}
@Override
public Iterable getAttributeNames()
{
Set attributeNames = new LinkedHashSet();
for (AttributeMetaData attr : new ProbeSetMetaData().getAttributes())
{
attributeNames.add(attr.getName());
}
return attributeNames;
}
@Override
public java.util.List getLabelAttributeNames()
{
java.util.List result = new java.util.ArrayList();
result.add("Identifier");
return result;
}
@Override
public void set(String attributeName, Object value)
{
if("id".equalsIgnoreCase(attributeName)) {
this.setId((Integer)value);
return;
}
if("Identifier".equalsIgnoreCase(attributeName)) {
this.setIdentifier((String)value);
return;
}
if("Name".equalsIgnoreCase(attributeName)) {
this.setName((String)value);
return;
}
if("__Type".equalsIgnoreCase(attributeName)) {
this.set__Type((String)value);
return;
}
if("description".equalsIgnoreCase(attributeName)) {
this.setDescription((String)value);
return;
}
if("Chromosome".equalsIgnoreCase(attributeName)) {
org.molgenis.omx.xgap.Chromosome e = new org.molgenis.omx.xgap.Chromosome();
e.set((Entity)value);
this.setChromosome(e);
return;
}
if("cM".equalsIgnoreCase(attributeName)) {
this.setCM((Double)value);
return;
}
if("bpStart".equalsIgnoreCase(attributeName)) {
this.setBpStart((Long)value);
return;
}
if("bpEnd".equalsIgnoreCase(attributeName)) {
this.setBpEnd((Long)value);
return;
}
if("Seq".equalsIgnoreCase(attributeName)) {
this.setSeq((String)value);
return;
}
if("Symbol".equalsIgnoreCase(attributeName)) {
this.setSymbol((String)value);
return;
}
}
@Override
public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null) return false;
if (!super.equals(obj)) return false;
if (getClass() != obj.getClass()) return false;
return true;
}
@Override
public int hashCode()
{
int result = super.hashCode();
return result;
}
@Override
public org.molgenis.data.EntityMetaData getEntityMetaData()
{
return new ProbeSetMetaData();
}
}