This whole switch statement could be extracted into a Method named getFieldAttribute