private List<SelectItem> getRuleTypes() throws FenixFilterException, FenixServiceException {
private List<SelectItem> getRuleTypes() {
    private List<SelectItem> getRuleTypes() throws FenixFilterException, FenixServiceException {        final List<SelectItem> result = new ArrayList<SelectItem>();        for (final CurricularRuleType curricularRuleType : CurricularRuleType.values()) {            switch (curricularRuleType) {            case CREDITS_LIMIT:                if (getDegreeModule().isLeaf()) {                    final CurricularCourse curricularCourse = (CurricularCourse) getDegreeModule();                    if (curricularCourse.getType() == CurricularCourseType.OPTIONAL_COURSE) {                        result.add(new SelectItem(curricularRuleType.getName(), enumerationResources                                .getString(curricularRuleType.getName())));                        break;                    }                }            case DEGREE_MODULES_SELECTION_LIMIT:            case PRECEDENCY_BETWEEN_DEGREE_MODULES:                if (!getDegreeModule().isLeaf()) {                    result.add(new SelectItem(curricularRuleType.getName(), enumerationResources                            .getString(curricularRuleType.getName())));                }                break;            case PRECEDENCY_APPROVED_DEGREE_MODULE:            case PRECEDENCY_ENROLED_DEGREE_MODULE:            case ENROLMENT_TO_BE_APPROVED_BY_COORDINATOR:                if (getDegreeModule().isLeaf()) {                    result.add(new SelectItem(curricularRuleType.getName(), enumerationResources                            .getString(curricularRuleType.getName())));                }                break;            case EXCLUSIVENESS:                result.add(new SelectItem(curricularRuleType.getName(), enumerationResources                        .getString(curricularRuleType.getName())));                break;            case ANY_CURRICULAR_COURSE:                if (getDegreeModule().isLeaf()) {                    final CurricularCourse curricularCourse = (CurricularCourse) getDegreeModule();                    if (curricularCourse.getType() == CurricularCourseType.OPTIONAL_COURSE) {                        result.add(new SelectItem(curricularRuleType.getName(), enumerationResources                                .getString(curricularRuleType.getName())));                    }                }                break;                            case MINIMUM_NUMBER_OF_CREDITS_TO_ENROL:                result.add(new SelectItem(curricularRuleType.getName(), enumerationResources                        .getString(curricularRuleType.getName())));                break;            default:                break;            }        }        Collections.sort(result, new BeanComparator("label"));        result.add(0, new SelectItem(NO_SELECTION_STRING, bolonhaResources.getString("choose")));        return result;    }