for (String field : fieldArray) {
Iterable<String> defnArray = Splitter.onPattern("\\s+").trimResults().omitEmptyStrings().split(field);
List<String> defnList = Lists.newArrayList(defnArray);
//We expect FieldType, FieldName (optional : FieldAttribute)
Preconditions.checkArgument(defnList.size() >= 2);
GDATFieldType type = GDATFieldType.getGDATFieldType(defnList.get(0).toUpperCase());
String fieldName = defnList.get(1);
builder.addField(fieldName, type);
}
return builder.build();
}