当前位置: 首页>>代码示例>>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;未经允许,请勿转载。