eDao.attach(event);
}
}
}
Resource resource;
int semester;
for (CourseOfStudy cos : cosesRoot.getCourseOfStudys().getCourseOfStudy()) {
Map<Integer, Resource> resourcePerSemester = new FastMap<Integer, Resource>();
if (cos.getExaminationRegulation() == null) {
logger.warn("No ex reg in " + cos.getName() + " exReg==" + cos.getExaminationRegulation() + " courses:" + cos);
continue;
}
if (cos.getExaminationRegulation().getCoursesInCos() == null) {
logger.warn("No courses in " + cos.getExaminationRegulation().getName());
continue;
}
// get all courses in one courseOfStudy-object
for (CourseInCos cInCos : cos.getExaminationRegulation().getCoursesInCos().getCourseInCos()) {
semester = cInCos.getSemester().intValue();
resource = resourcePerSemester.get(semester);
if (resource == null) {
resource = new de.timefinder.data.Person();
resource.setName(cos.getName() + "-" + semester);
pDao.attach((de.timefinder.data.Person) resource);
resourcePerSemester.put(semester, resource);
}
for (Event event : getEvents(cInCos.getRef().toString())) {
resource.addEvent(event, true);
}
}
}
for (Dao<? extends DBInterface> dao : dataPool.getDaos()) {