public String getSelectedSemester() throws FenixFilterException, FenixServiceException {
public String getSelectedSemester() {
    public String getSelectedSemester() throws FenixFilterException, FenixServiceException {        if (getViewState().getAttribute("selectedSemester") == null) {            if (getCurricularRule() != null && getCurricularRule() instanceof PrecedenceRule) {                final PrecedenceRule precedenceRule = (PrecedenceRule) getCurricularRule();                setSelectedSemester(precedenceRule.getCurricularPeriodOrder() != null ? precedenceRule                        .getCurricularPeriodOrder().toString() : "0");            } else if (getCurricularRule() != null && getCurricularRule() instanceof AnyCurricularCourse) {                setSelectedSemester(((AnyCurricularCourse) getCurricularRule()).getCurricularPeriodOrder().toString());            } else {                setSelectedSemester("0");            }        }        return (String) getViewState().getAttribute("selectedSemester");    }