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.participant.avro;
@SuppressWarnings("all")
/** This is quite GEL specific. This is the way is stored in ModelCatalogue and PanelApp.
Currently all specific disease titles are assigned to a disease subgroup so really only specificDisease needs to be
completed but we add the others for generality */
@org.apache.avro.specific.AvroGenerated
public class Disorder 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\":\"Disorder\",\"namespace\":\"org.gel.models.participant.avro\",\"doc\":\"This is quite GEL specific. This is the way is stored in ModelCatalogue and PanelApp.\\n Currently all specific disease titles are assigned to a disease subgroup so really only specificDisease needs to be\\n completed but we add the others for generality\",\"fields\":[{\"name\":\"diseaseGroup\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is Level2 Title for this disorder\"},{\"name\":\"diseaseSubGroup\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is Level3 Title for this disorder\"},{\"name\":\"specificDisease\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is Level4 Title for this disorder.\\n In GMS, this is the clinicalIndicationFullName/clinicalIndicationCode.\"},{\"name\":\"ageOfOnset\",\"type\":[\"null\",\"float\"],\"doc\":\"Age of onset in years\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** This is Level2 Title for this disorder */
private java.lang.String diseaseGroup;
/** This is Level3 Title for this disorder */
private java.lang.String diseaseSubGroup;
/** This is Level4 Title for this disorder.
In GMS, this is the clinicalIndicationFullName/clinicalIndicationCode. */
private java.lang.String specificDisease;
/** Age of onset in years */
private java.lang.Float ageOfOnset;
/**
* 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 Disorder() {}
/**
* All-args constructor.
*/
public Disorder(java.lang.String diseaseGroup, java.lang.String diseaseSubGroup, java.lang.String specificDisease, java.lang.Float ageOfOnset) {
this.diseaseGroup = diseaseGroup;
this.diseaseSubGroup = diseaseSubGroup;
this.specificDisease = specificDisease;
this.ageOfOnset = ageOfOnset;
}
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 diseaseGroup;
case 1: return diseaseSubGroup;
case 2: return specificDisease;
case 3: return ageOfOnset;
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: diseaseGroup = (java.lang.String)value$; break;
case 1: diseaseSubGroup = (java.lang.String)value$; break;
case 2: specificDisease = (java.lang.String)value$; break;
case 3: ageOfOnset = (java.lang.Float)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'diseaseGroup' field.
* This is Level2 Title for this disorder */
public java.lang.String getDiseaseGroup() {
return diseaseGroup;
}
/**
* Sets the value of the 'diseaseGroup' field.
* This is Level2 Title for this disorder * @param value the value to set.
*/
public void setDiseaseGroup(java.lang.String value) {
this.diseaseGroup = value;
}
/**
* Gets the value of the 'diseaseSubGroup' field.
* This is Level3 Title for this disorder */
public java.lang.String getDiseaseSubGroup() {
return diseaseSubGroup;
}
/**
* Sets the value of the 'diseaseSubGroup' field.
* This is Level3 Title for this disorder * @param value the value to set.
*/
public void setDiseaseSubGroup(java.lang.String value) {
this.diseaseSubGroup = value;
}
/**
* Gets the value of the 'specificDisease' field.
* This is Level4 Title for this disorder.
In GMS, this is the clinicalIndicationFullName/clinicalIndicationCode. */
public java.lang.String getSpecificDisease() {
return specificDisease;
}
/**
* Sets the value of the 'specificDisease' field.
* This is Level4 Title for this disorder.
In GMS, this is the clinicalIndicationFullName/clinicalIndicationCode. * @param value the value to set.
*/
public void setSpecificDisease(java.lang.String value) {
this.specificDisease = value;
}
/**
* Gets the value of the 'ageOfOnset' field.
* Age of onset in years */
public java.lang.Float getAgeOfOnset() {
return ageOfOnset;
}
/**
* Sets the value of the 'ageOfOnset' field.
* Age of onset in years * @param value the value to set.
*/
public void setAgeOfOnset(java.lang.Float value) {
this.ageOfOnset = value;
}
/** Creates a new Disorder RecordBuilder */
public static org.gel.models.participant.avro.Disorder.Builder newBuilder() {
return new org.gel.models.participant.avro.Disorder.Builder();
}
/** Creates a new Disorder RecordBuilder by copying an existing Builder */
public static org.gel.models.participant.avro.Disorder.Builder newBuilder(org.gel.models.participant.avro.Disorder.Builder other) {
return new org.gel.models.participant.avro.Disorder.Builder(other);
}
/** Creates a new Disorder RecordBuilder by copying an existing Disorder instance */
public static org.gel.models.participant.avro.Disorder.Builder newBuilder(org.gel.models.participant.avro.Disorder other) {
return new org.gel.models.participant.avro.Disorder.Builder(other);
}
/**
* RecordBuilder for Disorder instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String diseaseGroup;
private java.lang.String diseaseSubGroup;
private java.lang.String specificDisease;
private java.lang.Float ageOfOnset;
/** Creates a new Builder */
private Builder() {
super(org.gel.models.participant.avro.Disorder.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.gel.models.participant.avro.Disorder.Builder other) {
super(other);
if (isValidValue(fields()[0], other.diseaseGroup)) {
this.diseaseGroup = data().deepCopy(fields()[0].schema(), other.diseaseGroup);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.diseaseSubGroup)) {
this.diseaseSubGroup = data().deepCopy(fields()[1].schema(), other.diseaseSubGroup);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.specificDisease)) {
this.specificDisease = data().deepCopy(fields()[2].schema(), other.specificDisease);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.ageOfOnset)) {
this.ageOfOnset = data().deepCopy(fields()[3].schema(), other.ageOfOnset);
fieldSetFlags()[3] = true;
}
}
/** Creates a Builder by copying an existing Disorder instance */
private Builder(org.gel.models.participant.avro.Disorder other) {
super(org.gel.models.participant.avro.Disorder.SCHEMA$);
if (isValidValue(fields()[0], other.diseaseGroup)) {
this.diseaseGroup = data().deepCopy(fields()[0].schema(), other.diseaseGroup);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.diseaseSubGroup)) {
this.diseaseSubGroup = data().deepCopy(fields()[1].schema(), other.diseaseSubGroup);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.specificDisease)) {
this.specificDisease = data().deepCopy(fields()[2].schema(), other.specificDisease);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.ageOfOnset)) {
this.ageOfOnset = data().deepCopy(fields()[3].schema(), other.ageOfOnset);
fieldSetFlags()[3] = true;
}
}
/** Gets the value of the 'diseaseGroup' field */
public java.lang.String getDiseaseGroup() {
return diseaseGroup;
}
/** Sets the value of the 'diseaseGroup' field */
public org.gel.models.participant.avro.Disorder.Builder setDiseaseGroup(java.lang.String value) {
validate(fields()[0], value);
this.diseaseGroup = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'diseaseGroup' field has been set */
public boolean hasDiseaseGroup() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'diseaseGroup' field */
public org.gel.models.participant.avro.Disorder.Builder clearDiseaseGroup() {
diseaseGroup = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'diseaseSubGroup' field */
public java.lang.String getDiseaseSubGroup() {
return diseaseSubGroup;
}
/** Sets the value of the 'diseaseSubGroup' field */
public org.gel.models.participant.avro.Disorder.Builder setDiseaseSubGroup(java.lang.String value) {
validate(fields()[1], value);
this.diseaseSubGroup = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'diseaseSubGroup' field has been set */
public boolean hasDiseaseSubGroup() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'diseaseSubGroup' field */
public org.gel.models.participant.avro.Disorder.Builder clearDiseaseSubGroup() {
diseaseSubGroup = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'specificDisease' field */
public java.lang.String getSpecificDisease() {
return specificDisease;
}
/** Sets the value of the 'specificDisease' field */
public org.gel.models.participant.avro.Disorder.Builder setSpecificDisease(java.lang.String value) {
validate(fields()[2], value);
this.specificDisease = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'specificDisease' field has been set */
public boolean hasSpecificDisease() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'specificDisease' field */
public org.gel.models.participant.avro.Disorder.Builder clearSpecificDisease() {
specificDisease = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'ageOfOnset' field */
public java.lang.Float getAgeOfOnset() {
return ageOfOnset;
}
/** Sets the value of the 'ageOfOnset' field */
public org.gel.models.participant.avro.Disorder.Builder setAgeOfOnset(java.lang.Float value) {
validate(fields()[3], value);
this.ageOfOnset = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'ageOfOnset' field has been set */
public boolean hasAgeOfOnset() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'ageOfOnset' field */
public org.gel.models.participant.avro.Disorder.Builder clearAgeOfOnset() {
ageOfOnset = null;
fieldSetFlags()[3] = false;
return this;
}
@Override
public Disorder build() {
try {
Disorder record = new Disorder();
record.diseaseGroup = fieldSetFlags()[0] ? this.diseaseGroup : (java.lang.String) defaultValue(fields()[0]);
record.diseaseSubGroup = fieldSetFlags()[1] ? this.diseaseSubGroup : (java.lang.String) defaultValue(fields()[1]);
record.specificDisease = fieldSetFlags()[2] ? this.specificDisease : (java.lang.String) defaultValue(fields()[2]);
record.ageOfOnset = fieldSetFlags()[3] ? this.ageOfOnset : (java.lang.Float) defaultValue(fields()[3]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}