Examples of Course


Examples of org.nm.ntutimetabletoics.Course

*/
public class ClassVEvent extends VEvent {

    public ClassVEvent(ClassTimetable ct) {
        super();
        Course course = ct.getCourse();
        PropertyList pl = getProperties();
        DateTime[] timeStandard = ct.getDtStartEnd();
        pl.add(new DtStart(timeStandard[0]));
        if (timeStandard[1] != null) {
            pl.add(new DtEnd(timeStandard[1]));
        }
        try {
            UidGenerator ug = new UidGenerator("1");
            pl.add(ug.generateUid());
        } catch (SocketException ex) {
            Logger.getLogger(ClassVEvent.class).error(
                    "Error when assigning UID to "
                    + course.getCourseName() + " class timetable ", ex);
        }
        pl.add(new Description(course.getCourseName() + "("
                + course.getIndexNum() + ", " + ct.getGroup() + ")\n"
                + course.getCourseType()
                + (course.getCourseType().isPrescribed()
                ? " " + course.getGeneralPEType() : "")));
        pl.add(new Location(ct.getVenue()));
        pl.add(new Summary(course.getCourseName() + " " + ct.getClassType()
                + " " + ct.getRemark()));
        String[] split = ct.getSemesterTimetable().getStartExam().split("-");
        String str = split[0] + split[1] + split[2];
        try {
            pl.add(new RRule(new Recur(Recur.WEEKLY, new Date(str))));
        } catch (ParseException ex) {
            Logger.getLogger(ClassVEvent.class).error("Error when parsing "
                    + "recurrence rule for " + course.getCourseName()
                    + " class timetable", ex);
        }
    }
View Full Code Here

Examples of org.nm.ntutimetabletoics.Course

            assertSame(result, resultST.getNtuTimetable());
            ArrayList<Course> cList = resultST.getCourses();
            assertNotNull(cList);
            int m = cList.size();
            for (int j = 0; j < m; ++j) {
                Course c = cList.get(j);
                System.out.println(c.getCourseName());
                ArrayList<ClassTimetable> clList = c.getClassTimetables();
                for (int k = 0; k < clList.size(); ++k) {
                    ClassTimetable cp = clList.get(k);
                    System.out.println(cp.getClassType());
                }
            }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.collection.serialization.Course

        Student s3 = new Student(3);
        Collection col = new ArrayList();
        col.add(s1);
        col.add(s2);
        col.add(s3);
        Course c = new Course("Course1");
        c.setProf(prof);
        c.setStudents(col);
        pm.currentTransaction().begin();
        pm.makePersistent(c);
        Object oid = pm.getObjectId(c);
        Course copyOfC = (Course) pm.detachCopy(c);
        pm.currentTransaction().commit();
        pm.close();
    File f = new File(new File(new File("output"),"test"), "testSerializeWithCollection");
    if (f.exists()) {
      f.delete();
    }
    try {
      ObjectOutputStream oos = new ObjectOutputStream(
          new FileOutputStream(f));
      oos.writeObject(copyOfC);
      oos.close();

      c = null;
      ObjectInputStream ois = new ObjectInputStream(
          new FileInputStream(f));
      c = (Course) ois.readObject();
      ois.close();
      assertEquals("Not the same professor", c.getProf().getName(), copyOfC.getProf().getName());
      assertEquals("Not the same list of students", col.size(), copyOfC.getStudents().size());
      int sid = 0;
      int copySid = 0;
      pm = pmf.getPersistenceManager();
      Iterator itCol = col.iterator();
      Iterator itCopy = copyOfC.getStudents().iterator();
      while (itCol.hasNext()) {
        Student s = (Student) itCol.next();
        sid += s.getSid();
        s = (Student) itCopy.next();
        copySid += s.getSid();
View Full Code Here

Examples of org.optaplanner.examples.curriculumcourse.domain.Course

            Map<String, Teacher> teacherMap = new HashMap<String, Teacher>();
            List<Course> courseList = new ArrayList<Course>(courseListSize);
            readEmptyLine();
            readConstantLine("COURSES:");
            for (int i = 0; i < courseListSize; i++) {
                Course course = new Course();
                course.setId((long) i);
                // Courses: <CourseID> <Teacher> <# Lectures> <MinWorkingDays> <# Students>
                String line = bufferedReader.readLine();
                String[] lineTokens = splitBySpacesOrTabs(line, 5);
                course.setCode(lineTokens[0]);
                course.setTeacher(findOrCreateTeacher(teacherMap, lineTokens[1]));
                course.setLectureSize(Integer.parseInt(lineTokens[2]));
                course.setMinWorkingDaySize(Integer.parseInt(lineTokens[3]));
                course.setCurriculumList(new ArrayList<Curriculum>());
                course.setStudentSize(Integer.parseInt(lineTokens[4]));
                courseList.add(course);
                courseMap.put(course.getCode(), course);
            }
            schedule.setCourseList(courseList);
            List<Teacher> teacherList = new ArrayList<Teacher>(teacherMap.values());
            schedule.setTeacherList(teacherList);
            return courseMap;
View Full Code Here

Examples of org.xrace.model.evenements.Course

    super.onSetUpInTransaction();

    Saison saison = getSaisonService().findByAnnee(2007).get(0);
    Evenement evenement1 = getEvenementService().getEvenementParNo(saison,
        1);
    Course course1 = getCourseService().getCourseParNom(evenement1,
        "Cross-Country");
    Evenement evenement2 = getEvenementService().getEvenementParNo(saison,
        2);
    Course course2 = getCourseService().getCourseParNom(evenement2,
        "Cross-Country");

    Categorie categorie1 = getCategorieService().findByCode("XJS", "H",
        getDisciplineService().findByNom("XC"));
    Categorie categorie2 = getCategorieService().findByCode("XSS", "H",
View Full Code Here

Examples of projectatlast.course.Course

    int randDuration = new Random().nextInt(7*24*60*60);
    cal.add(Calendar.SECOND, randDuration);
    Date e1 = cal.getTime();

    Student student = AuthController.getCurrentStudent();
    Course analyse = Registry.courseFinder().getCourse("H01A0B");
    Activity a1 = new StudyActivity(student, "Exercises", analyse);
    a1.setStart(s1);
    a1.setEnd(e1);
    ActivityController.put(true, a1);
    resp.getWriter().println("Created: "+a1);
View Full Code Here

Examples of sis.studentinfo.Course

              "ITAL 410" + NEWLINE
              , report.text());
  }
 
  private Session create(String department, String number, Date startDate) {
    return CourseSession.create(new Course(department, number), startDate);
  }
View Full Code Here

Examples of teammates.jdo.Course

                .toString() + "</enrollmentreports>");
  }

  private void coordinatorGetCourse() throws IOException, ServletException {
    Courses courses = Courses.inst();
    Course course = courses.getCourse(req.getParameter(COURSE_ID));

    CourseSummaryForCoordinator courseSummary = new CourseSummaryForCoordinator(
        course.getID(), course.getName(), course.isArchived(),
        courses.getNumberOfTeams(course.getID()),
        courses.getTotalStudents(course.getID()),
        courses.getUnregistered(course.getID()));

    ArrayList<CourseSummaryForCoordinator> courseSummaryList = new ArrayList<CourseSummaryForCoordinator>();
    courseSummaryList.add(courseSummary);

    resp.getWriter().write(
View Full Code Here

Examples of teammates.jdo.Course

    Accounts accounts = Accounts.inst();

    String courseID = req.getParameter(COURSE_ID);
    String email = req.getParameter(STUDENT_EMAIL);

    Course course = courses.getCourse(courseID);
    Student student = courses.getStudentWithEmail(courseID, email);

    List<Student> studentList = new ArrayList<Student>();
    studentList.add(student);

    String courseName = course.getName();
    Coordinator coord = accounts.getCoordinator(course.getCoordinatorID());

    courses.sendRegistrationKeys(studentList, courseID, courseName,
        coord.getName(), coord.getEmail());
  }
View Full Code Here

Examples of teammates.jdo.Course

    // Get unregistered students
    List<Student> studentList = courses.getUnregisteredStudentList(req
        .getParameter(COURSE_ID));

    if (!studentList.isEmpty()) {
      Course course = courses.getCourse(studentList.get(0).getCourseID());

      String courseID = course.getID();
      String courseName = course.getName();
      Coordinator coord = accounts.getCoordinator(course
          .getCoordinatorID());

      courses.sendRegistrationKeys(studentList, courseID, courseName,
          coord.getName(), coord.getEmail());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.