.setKey(vcfLine.getKey()) .setId(vcfLine.getID()) .setDescription(vcfLine.getDescription()) .setType(vcfLine.getType().toString()) .setNumber(number).build()); setValue(map, "Number", builder::setNumber); setValue(map, "Type", builder::setType); builder.setKey(line.getKey()); builder.setGenericFields(map); complexLines.add(builder.build());
/** Creates a Builder by copying an existing VariantFileHeaderComplexLine instance */ private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine other) { super(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.SCHEMA$); if (isValidValue(fields()[0], other.key)) { this.key = data().deepCopy(fields()[0].schema(), other.key); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.id)) { this.id = data().deepCopy(fields()[1].schema(), other.id); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.description)) { this.description = data().deepCopy(fields()[2].schema(), other.description); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.number)) { this.number = data().deepCopy(fields()[3].schema(), other.number); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.type)) { this.type = data().deepCopy(fields()[4].schema(), other.type); fieldSetFlags()[4] = true; } if (isValidValue(fields()[5], other.genericFields)) { this.genericFields = data().deepCopy(fields()[5].schema(), other.genericFields); fieldSetFlags()[5] = true; } }
@Override public VariantFileHeaderComplexLine build() { try { VariantFileHeaderComplexLine record = new VariantFileHeaderComplexLine(); record.key = fieldSetFlags()[0] ? this.key : (java.lang.String) defaultValue(fields()[0]); record.id = fieldSetFlags()[1] ? this.id : (java.lang.String) defaultValue(fields()[1]); record.description = fieldSetFlags()[2] ? this.description : (java.lang.String) defaultValue(fields()[2]); record.number = fieldSetFlags()[3] ? this.number : (java.lang.String) defaultValue(fields()[3]); record.type = fieldSetFlags()[4] ? this.type : (java.lang.String) defaultValue(fields()[4]); record.genericFields = fieldSetFlags()[5] ? this.genericFields : (java.util.Map<java.lang.String,java.lang.String>) defaultValue(fields()[5]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder other) { super(other); if (isValidValue(fields()[0], other.key)) { this.key = data().deepCopy(fields()[0].schema(), other.key); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.id)) { this.id = data().deepCopy(fields()[1].schema(), other.id); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.description)) { this.description = data().deepCopy(fields()[2].schema(), other.description); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.number)) { this.number = data().deepCopy(fields()[3].schema(), other.number); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.type)) { this.type = data().deepCopy(fields()[4].schema(), other.type); fieldSetFlags()[4] = true; } if (isValidValue(fields()[5], other.genericFields)) { this.genericFields = data().deepCopy(fields()[5].schema(), other.genericFields); fieldSetFlags()[5] = true; } }
/** Checks whether the 'genericFields' field has been set */ public boolean hasGenericFields() { return fieldSetFlags()[5]; }
/** Checks whether the 'number' field has been set */ public boolean hasNumber() { return fieldSetFlags()[3]; }
/** Checks whether the 'description' field has been set */ public boolean hasDescription() { return fieldSetFlags()[2]; }
/** Checks whether the 'key' field has been set */ public boolean hasKey() { return fieldSetFlags()[0]; }
/** Creates a new VariantFileHeaderComplexLine RecordBuilder by copying an existing VariantFileHeaderComplexLine instance */ public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine other) { return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder(other); }
/** Creates a new VariantFileHeaderComplexLine RecordBuilder by copying an existing Builder */ public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder other) { return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder(other); }
/** Creates a new VariantFileHeaderComplexLine RecordBuilder */ public static org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder newBuilder() { return new org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder(); }
/** Checks whether the 'id' field has been set */ public boolean hasId() { return fieldSetFlags()[1]; }
/** Clears the value of the 'number' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearNumber() { number = null; fieldSetFlags()[3] = false; return this; }
/** Sets the value of the 'key' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setKey(java.lang.String value) { validate(fields()[0], value); this.key = value; fieldSetFlags()[0] = true; return this; }
/** Clears the value of the 'genericFields' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearGenericFields() { genericFields = null; fieldSetFlags()[5] = false; return this; }
/** Clears the value of the 'description' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearDescription() { description = null; fieldSetFlags()[2] = false; return this; }
/** Clears the value of the 'id' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearId() { id = null; fieldSetFlags()[1] = false; return this; }
/** Clears the value of the 'key' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder clearKey() { key = null; fieldSetFlags()[0] = false; return this; }
/** Checks whether the 'type' field has been set */ public boolean hasType() { return fieldSetFlags()[4]; }
/** Sets the value of the 'description' field */ public org.opencb.biodata.models.variant.metadata.VariantFileHeaderComplexLine.Builder setDescription(java.lang.String value) { validate(fields()[2], value); this.description = value; fieldSetFlags()[2] = true; return this; }