public class Sample
extends org.apache.avro.specific.SpecificRecordBase
implements org.apache.avro.specific.SpecificRecord
Modifier and Type | Class and Description |
---|---|
static class |
Sample.Builder
RecordBuilder for Sample instances.
|
Modifier and Type | Field and Description |
---|---|
Map<String,String> |
attributes
Deprecated.
|
String |
id
Deprecated.
|
String |
name
Deprecated.
|
List<ProcessingStep> |
processingSteps
Deprecated.
|
static org.apache.avro.Schema |
SCHEMA$ |
Constructor and Description |
---|
Sample()
Default constructor.
|
Sample(String id,
String name,
Map<String,String> attributes,
List<ProcessingStep> processingSteps)
All-args constructor.
|
Modifier and Type | Method and Description |
---|---|
static org.apache.avro.message.BinaryMessageDecoder<Sample> |
createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified
SchemaStore . |
static Sample |
fromByteBuffer(ByteBuffer b)
Deserializes a Sample from a ByteBuffer.
|
Object |
get(int field$) |
Map<String,String> |
getAttributes()
Gets the value of the 'attributes' field.
|
static org.apache.avro.Schema |
getClassSchema() |
static org.apache.avro.message.BinaryMessageDecoder<Sample> |
getDecoder()
Return the BinaryMessageDecoder instance used by this class.
|
String |
getId()
Gets the value of the 'id' field.
|
String |
getName()
Gets the value of the 'name' field.
|
List<ProcessingStep> |
getProcessingSteps()
Gets the value of the 'processingSteps' field.
|
org.apache.avro.Schema |
getSchema() |
static Sample.Builder |
newBuilder()
Creates a new Sample RecordBuilder.
|
static Sample.Builder |
newBuilder(Sample.Builder other)
Creates a new Sample RecordBuilder by copying an existing Builder.
|
static Sample.Builder |
newBuilder(Sample other)
Creates a new Sample RecordBuilder by copying an existing Sample instance.
|
void |
put(int field$,
Object value$) |
void |
readExternal(ObjectInput in) |
void |
setAttributes(Map<String,String> value)
Sets the value of the 'attributes' field.
|
void |
setId(String value)
Sets the value of the 'id' field.
|
void |
setName(String value)
Sets the value of the 'name' field.
|
void |
setProcessingSteps(List<ProcessingStep> value)
Sets the value of the 'processingSteps' field.
|
ByteBuffer |
toByteBuffer()
Serializes this Sample to a ByteBuffer.
|
void |
writeExternal(ObjectOutput out) |
public static final org.apache.avro.Schema SCHEMA$
@Deprecated public String id
@Deprecated public String name
@Deprecated public Map<String,String> attributes
@Deprecated public List<ProcessingStep> processingSteps
public Sample()
newBuilder()
.public Sample(String id, String name, Map<String,String> attributes, List<ProcessingStep> processingSteps)
id
- Identifier for this sample, e.g. IDENTIFIERS → PRIMARY_ID or other
subelements of IDENTIFERS in SRA metadata, sample tag SM in read group @RG header lines
in SAM/BAM files, or sample ID from the header or ##SAMPLE=<ID=S_ID meta-information
lines in VCF files.name
- Descriptive name for this sample, e.g. SAMPLE_NAME → TAXON_ID, COMMON_NAME,
INDIVIDUAL_NAME, or other subelements of SAMPLE_NAME in SRA metadata.attributes
- Map of attributes. Common attributes may include: SRA metadata not mentioned above,
e.g. SAMPLE → TITLE, SAMPLE → DESCRIPTION, and SAMPLE_ATTRIBUTES; ENA default
sample checklist attributes such as cell_type, dev_stage, and germline; and Genomes,
Mixture, and Description from sample meta-information lines in VCF files.processingSteps
- The processing steps that have been applied to this sample.public static org.apache.avro.Schema getClassSchema()
public static org.apache.avro.message.BinaryMessageDecoder<Sample> getDecoder()
public static org.apache.avro.message.BinaryMessageDecoder<Sample> createDecoder(org.apache.avro.message.SchemaStore resolver)
SchemaStore
.resolver
- a SchemaStore
used to find schemas by fingerprintpublic ByteBuffer toByteBuffer() throws IOException
IOException
public static Sample fromByteBuffer(ByteBuffer b) throws IOException
IOException
public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
getSchema
in class org.apache.avro.specific.SpecificRecordBase
public Object get(int field$)
get
in interface org.apache.avro.generic.IndexedRecord
get
in class org.apache.avro.specific.SpecificRecordBase
public void put(int field$, Object value$)
put
in interface org.apache.avro.generic.IndexedRecord
put
in class org.apache.avro.specific.SpecificRecordBase
public String getId()
public void setId(String value)
value
- the value to set.public String getName()
public void setName(String value)
value
- the value to set.public Map<String,String> getAttributes()
public void setAttributes(Map<String,String> value)
value
- the value to set.public List<ProcessingStep> getProcessingSteps()
public void setProcessingSteps(List<ProcessingStep> value)
value
- the value to set.public static Sample.Builder newBuilder()
public static Sample.Builder newBuilder(Sample.Builder other)
other
- The existing builder to copy.public static Sample.Builder newBuilder(Sample other)
other
- The existing instance to copy.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class org.apache.avro.specific.SpecificRecordBase
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
readExternal
in class org.apache.avro.specific.SpecificRecordBase
IOException
Copyright © 2019. All rights reserved.