TaskType (Element element) { String category = element.getChildText("ixCategory"); if ("1".equals(category)) { return TaskType.BUG; } else if ("2".equals(category)) { return TaskType.FEATURE; } return TaskType.OTHER; }