if (schema.getType().getName().equalsIgnoreCase("fixed")) {
builders.put(schema.getName(), new AvroFixedBuilder(schema.getName(), schema));
} else if (schema.getType().getName().equalsIgnoreCase("record")) {
builders.put(schema.getName(), makeRecordBuilder(schema.getName(), schema));
} else if (schema.getType().getName().equalsIgnoreCase("enum")) {
builders.put(schema.getName(), new AvroEnumBuilder(schema.getName(), schema));
}
}
// TODO Improvs: Just a quick solution to get version.
AvroItem item = new AvroItem(builders.get("ofp_header").build());