public static SLCCourse generateLowFi(String id, String schoolId, String uniqueCourseId) throws Exception { SLCCourse course = new SLCCourse(); course.setCourseTitle(id); course.setNumberOfParts(1); course.setUniqueCourseId(uniqueCourseId); CourseCode CourseCode = new CourseCode(); CourseCode.setID(id); CourseCode.setIdentificationSystem(CourseCodeSystemType.CSSC_COURSE_CODE); CourseCode.setAssigningOrganizationCode("200"); course.getCourseCode().add(CourseCode); // construct and add the school reference SLCEducationalOrgIdentityType edOrgIdentityType = new SLCEducationalOrgIdentityType(); // EducationOrgIdentificationCode eoic = new EducationOrgIdentificationCode(); // eoic.setIdentificationSystem(EducationOrgIdentificationSystemType.SCHOOL); // eoic.setID(schoolId); // edOrgIdentityType.getEducationOrgIdentificationCode().add(eoic); // edOrgIdentityType.getStateOrganizationIdOrEducationOrgIdentificationCode().add(schoolId); edOrgIdentityType.setStateOrganizationId(schoolId); SLCEducationalOrgReferenceType schoolRef = new SLCEducationalOrgReferenceType(); schoolRef.setEducationalOrgIdentity(edOrgIdentityType); course.setEducationOrganizationReference(schoolRef); return course; }
public SLCCourse getCourse(String courseId, String schoolId, String uniqueCourseId) { SLCCourse course = null; course = clone(courses.get((counter++) % courses.size())); // courseCount--; course.setId(courseId); course.setUniqueCourseId(uniqueCourseId); CourseCode cc = new CourseCode(); cc.setID(courseId); // cc.setID(course.getId() + courseCount); cc.setIdentificationSystem(CourseCodeSystemType.CSSC_COURSE_CODE); course.getCourseCode().add(cc); // TODO remove this once DE608 is resolved course.setCourseTitle(cc.getID()); SLCEducationalOrgIdentityType edOrgIdentityType = new SLCEducationalOrgIdentityType(); edOrgIdentityType.setStateOrganizationId(schoolId); // TODO Comment out the next 4 lines ... // EducationOrgIdentificationCode eoic = new EducationOrgIdentificationCode(); // eoic.setIdentificationSystem(EducationOrgIdentificationSystemType.SCHOOL); // eoic.setID(schoolId); // edOrgIdentityType.getEducationOrgIdentificationCode().add(eoic); // TODO and uncomment this 1 line to implement changes coming out of HERMOD. // edOrgIdentityType.setStateOrganizationId(schoolId); // edOrgIdentityType.getStateOrganizationIdOrEducationOrgIdentificationCode().add(eoic); SLCEducationalOrgReferenceType schoolRef = new SLCEducationalOrgReferenceType(); schoolRef.setEducationalOrgIdentity(edOrgIdentityType); course.setEducationOrganizationReference(schoolRef); return course; }