String start = dataFormatHour.format(lesson.getInicio().getTime());
String end = dataFormatHour.format(lesson.getFim().getTime());
String weekday = lesson.getDiaSemana().getDiaSemanaString();
FenixPeriod period = new FenixPeriod(day + " " + start, day + " " + end);
String info = lesson.getInfoShift().getShiftTypesCodePrettyPrint();
FenixCourse course = new FenixCourse(infoExecutionCourse.getExecutionCourse());
roomEvent = new FenixRoomEvent.LessonEvent(start, end, weekday, day, period, info, course);
} else if (showOccupation instanceof InfoWrittenEvaluation) {
InfoWrittenEvaluation infoWrittenEvaluation = (InfoWrittenEvaluation) showOccupation;
List<FenixCourse> courses = new ArrayList<>();
for (int iterEC = 0; iterEC < infoWrittenEvaluation.getAssociatedExecutionCourse().size(); iterEC++) {
InfoExecutionCourse infoEC = infoWrittenEvaluation.getAssociatedExecutionCourse().get(iterEC);
courses.add(new FenixCourse(infoEC.getExecutionCourse()));
}
String start = null;
String end = null;
String weekday = null;
if (infoWrittenEvaluation instanceof InfoExam) {
InfoExam infoExam = (InfoExam) infoWrittenEvaluation;
start = infoExam.getBeginningHour();
end = infoExam.getEndHour();
weekday = infoWrittenEvaluation.getDiaSemana().getDiaSemanaString();
FenixPeriod period = new FenixPeriod(day + " " + start, day + " " + end);
Integer season = infoExam.getSeason().getSeason();
roomEvent =
new FenixRoomEvent.WrittenEvaluationEvent.ExamEvent(start, end, weekday, day, period, courses,
season);
} else if (infoWrittenEvaluation instanceof InfoWrittenTest) {
InfoWrittenTest infoWrittenTest = (InfoWrittenTest) infoWrittenEvaluation;
String description = infoWrittenTest.getDescription();
start = dataFormatHour.format(infoWrittenTest.getInicio().getTime());
end = dataFormatHour.format(infoWrittenTest.getFim().getTime());
weekday = infoWrittenTest.getDiaSemana().getDiaSemanaString();
FenixPeriod period = new FenixPeriod(day + " " + start, day + " " + end);
roomEvent =
new FenixRoomEvent.WrittenEvaluationEvent.TestEvent(start, end, weekday, day, period, courses,
description);
}
} else if (showOccupation instanceof InfoOccupation) {
InfoOccupation infoGenericEvent = (InfoOccupation) showOccupation;
String description = infoGenericEvent.getDescription();
String title = infoGenericEvent.getTitle();
String start = dataFormatHour.format(infoGenericEvent.getInicio().getTime());
String end = dataFormatHour.format(infoGenericEvent.getFim().getTime());
String weekday = infoGenericEvent.getDiaSemana().getDiaSemanaString();
FenixPeriod period = new FenixPeriod(day + " " + start, day + " " + end);
roomEvent = new FenixRoomEvent.GenericEvent(start, end, weekday, day, period, description, title);
}
if (roomEvent != null) {