當前位置: 首頁>>代碼示例>>Java>>正文


Java AcademicAreaCode類代碼示例

本文整理匯總了Java中org.cpsolver.studentsct.model.AcademicAreaCode的典型用法代碼示例。如果您正苦於以下問題:Java AcademicAreaCode類的具體用法?Java AcademicAreaCode怎麽用?Java AcademicAreaCode使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AcademicAreaCode類屬於org.cpsolver.studentsct.model包,在下文中一共展示了AcademicAreaCode類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: XStudent

import org.cpsolver.studentsct.model.AcademicAreaCode; //導入依賴的package包/類
public XStudent(org.cpsolver.studentsct.model.Student student, Assignment<Request, Enrollment> assignment) {
 	super(student);
 	iStatus = student.getStatus();
 	iEmailTimeStamp = (student.getEmailTimeStamp() == null ? null : new Date(student.getEmailTimeStamp()));
 	for (AreaClassificationMajor acm: student.getAreaClassificationMajors()) {
 		iMajors.add(new XAreaClassificationMajor(acm.getArea(), acm.getClassification(), acm.getMajor()));
 	}
 	for (int i = 0; i < Math.min(student.getAcademicAreaClasiffications().size(), student.getMajors().size()); i++) {
 		iMajors.add(new XAreaClassificationMajor(student.getMajors().get(i).getArea(), student.getAcademicAreaClasiffications().get(i).getCode(), student.getMajors().get(i).getCode()));
 	}
 	for (AcademicAreaCode aac: student.getMinors()) {
 		if ("A".equals(aac.getArea()))
	iAccomodations.add(aac.getCode());
else
	iGroups.add(aac.getCode());
 	}
 	for (Request request: student.getRequests()) {
 		if (request instanceof FreeTimeRequest) {
 			iRequests.add(new XFreeTimeRequest((FreeTimeRequest)request));
 		} else if (request instanceof CourseRequest) {
 			iRequests.add(new XCourseRequest((CourseRequest)request, assignment == null ? null : assignment.getValue(request)));
 		}
 	}
 }
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:25,代碼來源:XStudent.java

示例2: loadStudentInfo

import org.cpsolver.studentsct.model.AcademicAreaCode; //導入依賴的package包/類
public void loadStudentInfo(Student student, org.unitime.timetable.model.Student s) {
    for (StudentAreaClassificationMajor acm: s.getAreaClasfMajors()) {
        // student.getAcademicAreaClasiffications().add(new AcademicAreaCode(acm.getAcademicArea().getAcademicAreaAbbreviation(),acm.getAcademicClassification().getCode()));
        // student.getMajors().add(new AcademicAreaCode(acm.getAcademicArea().getAcademicAreaAbbreviation(),acm.getMajor().getCode()));
    	student.getAreaClassificationMajors().add(new AreaClassificationMajor(acm.getAcademicArea().getAcademicAreaAbbreviation(), acm.getAcademicClassification().getCode(), acm.getMajor().getCode()));
    }
    for (StudentGroup g: s.getGroups())
    	student.getMinors().add(new AcademicAreaCode("", g.getGroupAbbreviation()));
    for (StudentAccomodation a: s.getAccomodations())
    	student.getMinors().add(new AcademicAreaCode("A", a.getAbbreviation()));
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:12,代碼來源:StudentSectioningDatabaseLoader.java

示例3: loadStudentInfo

import org.cpsolver.studentsct.model.AcademicAreaCode; //導入依賴的package包/類
public void loadStudentInfo(Student student, org.unitime.timetable.model.Student s) {
    for (StudentAreaClassificationMajor aac: s.getAreaClasfMajors()) {
        student.getAcademicAreaClasiffications().add(new AcademicAreaCode(aac.getAcademicArea().getAcademicAreaAbbreviation(),aac.getAcademicClassification().getCode()));
        sLog.debug("  -- aac: "+aac.getAcademicArea().getAcademicAreaAbbreviation()+":"+aac.getAcademicClassification().getCode());
        student.getMajors().add(new AcademicAreaCode(aac.getAcademicArea().getAcademicAreaAbbreviation(), aac.getMajor().getCode()));
        sLog.debug("  -- mj: "+aac.getAcademicArea().getAcademicAreaAbbreviation()+":"+aac.getMajor().getCode());
    }
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:9,代碼來源:BatchStudentSectioningLoader.java

示例4: compareMajors

import org.cpsolver.studentsct.model.AcademicAreaCode; //導入依賴的package包/類
public int compareMajors(List<AcademicAreaCode> m1, List<AcademicAreaCode> m2) {
    if (m1.isEmpty()) {
        return m2.isEmpty() ? 0 : -1;
    } else if (m2.isEmpty())
        return 1;
    return compareMajors(m1.get(0), m2.get(0));
}
 
開發者ID:UniTime,項目名稱:cpsolver,代碼行數:8,代碼來源:StudentMajorOrder.java

示例5: loadStudent

import org.cpsolver.studentsct.model.AcademicAreaCode; //導入依賴的package包/類
/**
 * Load student
 * @param studentEl student element
 * @param offeringTable offering table
 * @return loaded student
 */
protected Student loadStudent(Element studentEl, Map<Long, Offering> offeringTable) {
    Student student = new Student(Long.parseLong(studentEl.attributeValue("id")), "true".equals(studentEl.attributeValue("dummy")));
    if ("true".equals(studentEl.attributeValue("shortDistances")))
        student.setNeedShortDistances(true);
    student.setExternalId(studentEl.attributeValue("externalId"));
    student.setName(studentEl.attributeValue("name"));
    student.setStatus(studentEl.attributeValue("status"));
    for (Iterator<?> j = studentEl.elementIterator(); j.hasNext();) {
        Element requestEl = (Element) j.next();
        if ("classification".equals(requestEl.getName())) {
            student.getAcademicAreaClasiffications().add(
                    new AcademicAreaCode(requestEl.attributeValue("area"), requestEl.attributeValue("code")));
        } else if ("major".equals(requestEl.getName())) {
            student.getMajors().add(
                    new AcademicAreaCode(requestEl.attributeValue("area"), requestEl.attributeValue("code")));
        } else if ("minor".equals(requestEl.getName())) {
            student.getMinors().add(
                    new AcademicAreaCode(requestEl.attributeValue("area"), requestEl.attributeValue("code")));
        } else if ("unavailability".equals(requestEl.getName())) {
            Offering offering = offeringTable.get(Long.parseLong(requestEl.attributeValue("offering")));
            Section section = (offering == null ? null : offering.getSection(Long.parseLong(requestEl.attributeValue("section"))));
            if (section != null)
                new Unavailability(student, section, "true".equals(requestEl.attributeValue("allowOverlap")));
        } else if ("acm".equals(requestEl.getName())) {
            student.getAreaClassificationMajors().add(
                    new AreaClassificationMajor(requestEl.attributeValue("area"), requestEl.attributeValue("classification"), requestEl.attributeValue("major")));
        }
    }
    return student;
}
 
開發者ID:UniTime,項目名稱:cpsolver,代碼行數:37,代碼來源:StudentSectioningXMLLoader.java

示例6: accept

import org.cpsolver.studentsct.model.AcademicAreaCode; //導入依賴的package包/類
/**
 * Accept student. Student is accepted if it is freshmen, i.e., academic
 * area classification code is A, 01, or 02.
 **/
@Override
public boolean accept(Student student) {
    for (AcademicAreaCode aac : student.getAcademicAreaClasiffications()) {
        if ("A".equals(aac.getCode()))
            return true; // First Year
        if ("01".equals(aac.getCode()))
            return true; // First Semester Freshman
        if ("02".equals(aac.getCode()))
            return true; // Second Semester Freshman
    }
    return false;
}
 
開發者ID:UniTime,項目名稱:cpsolver,代碼行數:17,代碼來源:FreshmanStudentFilter.java


注:本文中的org.cpsolver.studentsct.model.AcademicAreaCode類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。