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.
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.gel.models.report.avro;
@SuppressWarnings("all")
/** A genomic feature */
@org.apache.avro.specific.AvroGenerated
public class GenomicEntity extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"GenomicEntity\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"A genomic feature\",\"fields\":[{\"name\":\"type\",\"type\":{\"type\":\"enum\",\"name\":\"GenomicEntityType\",\"doc\":\"Types of genomic features:\\n\\n* `regulatory_region`: a regulatory region\\n* `gene`: a gene\\n* `transcript`: a transcript\\n* `intergenic`: an intergenic region\",\"symbols\":[\"regulatory_region\",\"gene\",\"transcript\",\"intergenic\",\"gene_fusion\",\"genomic_region\",\"cytobands\"]},\"doc\":\"The type of the genomic entity\"},{\"name\":\"ensemblId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Ensembl identifier for the feature (e.g, ENST00000544455)\"},{\"name\":\"geneSymbol\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The HGNC gene symbol. This field is optional, BUT it should be filled if possible\"},{\"name\":\"otherIds\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Identifier\",\"fields\":[{\"name\":\"source\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Source i.e, esenmbl\"},{\"name\":\"identifier\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"identifier\"}]}}],\"doc\":\"Others identifiers for this genomic feature\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** The type of the genomic entity */
private org.gel.models.report.avro.GenomicEntityType type;
/** Ensembl identifier for the feature (e.g, ENST00000544455) */
private java.lang.String ensemblId;
/** The HGNC gene symbol. This field is optional, BUT it should be filled if possible */
private java.lang.String geneSymbol;
/** Others identifiers for this genomic feature */
private java.util.List otherIds;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use newBuilder().
*/
public GenomicEntity() {}
/**
* All-args constructor.
*/
public GenomicEntity(org.gel.models.report.avro.GenomicEntityType type, java.lang.String ensemblId, java.lang.String geneSymbol, java.util.List otherIds) {
this.type = type;
this.ensemblId = ensemblId;
this.geneSymbol = geneSymbol;
this.otherIds = otherIds;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return type;
case 1: return ensemblId;
case 2: return geneSymbol;
case 3: return otherIds;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: type = (org.gel.models.report.avro.GenomicEntityType)value$; break;
case 1: ensemblId = (java.lang.String)value$; break;
case 2: geneSymbol = (java.lang.String)value$; break;
case 3: otherIds = (java.util.List)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'type' field.
* The type of the genomic entity */
public org.gel.models.report.avro.GenomicEntityType getType() {
return type;
}
/**
* Sets the value of the 'type' field.
* The type of the genomic entity * @param value the value to set.
*/
public void setType(org.gel.models.report.avro.GenomicEntityType value) {
this.type = value;
}
/**
* Gets the value of the 'ensemblId' field.
* Ensembl identifier for the feature (e.g, ENST00000544455) */
public java.lang.String getEnsemblId() {
return ensemblId;
}
/**
* Sets the value of the 'ensemblId' field.
* Ensembl identifier for the feature (e.g, ENST00000544455) * @param value the value to set.
*/
public void setEnsemblId(java.lang.String value) {
this.ensemblId = value;
}
/**
* Gets the value of the 'geneSymbol' field.
* The HGNC gene symbol. This field is optional, BUT it should be filled if possible */
public java.lang.String getGeneSymbol() {
return geneSymbol;
}
/**
* Sets the value of the 'geneSymbol' field.
* The HGNC gene symbol. This field is optional, BUT it should be filled if possible * @param value the value to set.
*/
public void setGeneSymbol(java.lang.String value) {
this.geneSymbol = value;
}
/**
* Gets the value of the 'otherIds' field.
* Others identifiers for this genomic feature */
public java.util.List getOtherIds() {
return otherIds;
}
/**
* Sets the value of the 'otherIds' field.
* Others identifiers for this genomic feature * @param value the value to set.
*/
public void setOtherIds(java.util.List value) {
this.otherIds = value;
}
/** Creates a new GenomicEntity RecordBuilder */
public static org.gel.models.report.avro.GenomicEntity.Builder newBuilder() {
return new org.gel.models.report.avro.GenomicEntity.Builder();
}
/** Creates a new GenomicEntity RecordBuilder by copying an existing Builder */
public static org.gel.models.report.avro.GenomicEntity.Builder newBuilder(org.gel.models.report.avro.GenomicEntity.Builder other) {
return new org.gel.models.report.avro.GenomicEntity.Builder(other);
}
/** Creates a new GenomicEntity RecordBuilder by copying an existing GenomicEntity instance */
public static org.gel.models.report.avro.GenomicEntity.Builder newBuilder(org.gel.models.report.avro.GenomicEntity other) {
return new org.gel.models.report.avro.GenomicEntity.Builder(other);
}
/**
* RecordBuilder for GenomicEntity instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private org.gel.models.report.avro.GenomicEntityType type;
private java.lang.String ensemblId;
private java.lang.String geneSymbol;
private java.util.List otherIds;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.report.avro.GenomicEntity.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.report.avro.GenomicEntity.Builder other) {
super(other);
if (isValidValue(fields()[0], other.type)) {
this.type = data().deepCopy(fields()[0].schema(), other.type);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.ensemblId)) {
this.ensemblId = data().deepCopy(fields()[1].schema(), other.ensemblId);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.geneSymbol)) {
this.geneSymbol = data().deepCopy(fields()[2].schema(), other.geneSymbol);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.otherIds)) {
this.otherIds = data().deepCopy(fields()[3].schema(), other.otherIds);
fieldSetFlags()[3] = true;
}
}
/** Creates a Builder by copying an existing GenomicEntity instance */
private Builder(org.gel.models.report.avro.GenomicEntity other) {
super(org.gel.models.report.avro.GenomicEntity.SCHEMA$);
if (isValidValue(fields()[0], other.type)) {
this.type = data().deepCopy(fields()[0].schema(), other.type);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.ensemblId)) {
this.ensemblId = data().deepCopy(fields()[1].schema(), other.ensemblId);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.geneSymbol)) {
this.geneSymbol = data().deepCopy(fields()[2].schema(), other.geneSymbol);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.otherIds)) {
this.otherIds = data().deepCopy(fields()[3].schema(), other.otherIds);
fieldSetFlags()[3] = true;
}
}
/** Gets the value of the 'type' field */
public org.gel.models.report.avro.GenomicEntityType getType() {
return type;
}
/** Sets the value of the 'type' field */
public org.gel.models.report.avro.GenomicEntity.Builder setType(org.gel.models.report.avro.GenomicEntityType value) {
validate(fields()[0], value);
this.type = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'type' field has been set */
public boolean hasType() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'type' field */
public org.gel.models.report.avro.GenomicEntity.Builder clearType() {
type = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'ensemblId' field */
public java.lang.String getEnsemblId() {
return ensemblId;
}
/** Sets the value of the 'ensemblId' field */
public org.gel.models.report.avro.GenomicEntity.Builder setEnsemblId(java.lang.String value) {
validate(fields()[1], value);
this.ensemblId = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'ensemblId' field has been set */
public boolean hasEnsemblId() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'ensemblId' field */
public org.gel.models.report.avro.GenomicEntity.Builder clearEnsemblId() {
ensemblId = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'geneSymbol' field */
public java.lang.String getGeneSymbol() {
return geneSymbol;
}
/** Sets the value of the 'geneSymbol' field */
public org.gel.models.report.avro.GenomicEntity.Builder setGeneSymbol(java.lang.String value) {
validate(fields()[2], value);
this.geneSymbol = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'geneSymbol' field has been set */
public boolean hasGeneSymbol() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'geneSymbol' field */
public org.gel.models.report.avro.GenomicEntity.Builder clearGeneSymbol() {
geneSymbol = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'otherIds' field */
public java.util.List getOtherIds() {
return otherIds;
}
/** Sets the value of the 'otherIds' field */
public org.gel.models.report.avro.GenomicEntity.Builder setOtherIds(java.util.List value) {
validate(fields()[3], value);
this.otherIds = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'otherIds' field has been set */
public boolean hasOtherIds() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'otherIds' field */
public org.gel.models.report.avro.GenomicEntity.Builder clearOtherIds() {
otherIds = null;
fieldSetFlags()[3] = false;
return this;
}
@Override
public GenomicEntity build() {
try {
GenomicEntity record = new GenomicEntity();
record.type = fieldSetFlags()[0] ? this.type : (org.gel.models.report.avro.GenomicEntityType) defaultValue(fields()[0]);
record.ensemblId = fieldSetFlags()[1] ? this.ensemblId : (java.lang.String) defaultValue(fields()[1]);
record.geneSymbol = fieldSetFlags()[2] ? this.geneSymbol : (java.lang.String) defaultValue(fields()[2]);
record.otherIds = fieldSetFlags()[3] ? this.otherIds : (java.util.List) defaultValue(fields()[3]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}