Package org.fenixedu.academic.domain.degreeStructure

Examples of org.fenixedu.academic.domain.degreeStructure.CompetenceCourseInformation


        this();
        super.setCurricularStage(curricularStage);
        setType(type);

        CompetenceCourseInformation competenceCourseInformation =
                new CompetenceCourseInformation(name.trim(), nameEn.trim(), basic, regimeType, competenceCourseLevel,
                        startSemester, unit);
        super.addCompetenceCourseInformations(competenceCourseInformation);

        // unique acronym creation
        try {
            final UniqueAcronymCreator<CompetenceCourse> uniqueAcronymCreator =
                    new UniqueAcronymCreator<CompetenceCourse>("name", "acronym",
                            (Set<CompetenceCourse>) CompetenceCourse.readBolonhaCompetenceCourses(), true);
            competenceCourseInformation.setAcronym(uniqueAcronymCreator.create(this).getLeft());
        } catch (Exception e) {
            throw new DomainException("competence.course.unable.to.create.acronym");
        }
    }
View Full Code Here


    public BibliographicReferences getBibliographicReferences() {
        return getBibliographicReferences(null);
    }

    public BibliographicReferences getBibliographicReferences(final ExecutionSemester period) {
        final CompetenceCourseInformation information = findCompetenceCourseInformationForExecutionPeriod(period);
        return (information != null) ? information.getBibliographicReferences() : null;
    }
View Full Code Here

    }

    public void createBibliographicReference(String year, String title, String authors, String reference, String url,
            BibliographicReferenceType type) {
        checkIfCanEdit(false);
        CompetenceCourseInformation info = getMostRecentCompetenceCourseInformation();
        info.setBibliographicReferences(info.getBibliographicReferences().with(year, title, authors, reference, url, type));
    }
View Full Code Here

        info.setBibliographicReferences(info.getBibliographicReferences().with(year, title, authors, reference, url, type));
    }

    public void editBibliographicReference(Integer index, String year, String title, String authors, String reference,
            String url, BibliographicReferenceType type) {
        CompetenceCourseInformation info = getMostRecentCompetenceCourseInformation();
        info.setBibliographicReferences(info.getBibliographicReferences().replacing(index, year, title, authors, reference, url,
                type));
    }
View Full Code Here

        info.setBibliographicReferences(info.getBibliographicReferences().replacing(index, year, title, authors, reference, url,
                type));
    }

    public void deleteBibliographicReference(Integer index) {
        CompetenceCourseInformation info = getMostRecentCompetenceCourseInformation();
        info.setBibliographicReferences(info.getBibliographicReferences().without(index));
    }
View Full Code Here

        CompetenceCourseInformation info = getMostRecentCompetenceCourseInformation();
        info.setBibliographicReferences(info.getBibliographicReferences().without(index));
    }

    public void switchBibliographicReferencePosition(Integer oldPosition, Integer newPosition) {
        CompetenceCourseInformation info = getMostRecentCompetenceCourseInformation();
        info.setBibliographicReferences(info.getBibliographicReferences().movingBibliographicReference(oldPosition, newPosition));
    }
View Full Code Here

    private CompetenceCourseInformation getMostRecentCompetenceCourseInformation() {
        return getMostRecentCompetenceCourseInformationUntil(ExecutionSemester.readActualExecutionSemester());
    }

    private CompetenceCourseInformation getMostRecentCompetenceCourseInformationUntil(ExecutionSemester semester) {
        CompetenceCourseInformation mostRecentInformation = getOldestCompetenceCourseInformation();
        for (CompetenceCourseInformation information : getCompetenceCourseInformationsSet()) {
            if (information.getExecutionPeriod().isAfter(mostRecentInformation.getExecutionPeriod())
                    && !information.getExecutionPeriod().isAfter(semester)) {
                mostRecentInformation = information;
            }
        }
        return mostRecentInformation;
View Full Code Here

    private CompetenceCourseLoad findCompetenceCourseLoad(final CurricularCourse curricularCourse,
            final ExecutionSemester executionPeriod) {
        final CompetenceCourse competenceCourse = curricularCourse.getCompetenceCourse();
        if (competenceCourse != null) {
            final CompetenceCourseInformation competenceCourseInformation =
                    competenceCourse.findCompetenceCourseInformationForExecutionPeriod(executionPeriod);
            if (competenceCourseInformation != null) {
                for (final CompetenceCourseLoad competenceCourseLoad : competenceCourseInformation.getCompetenceCourseLoadsSet()) {
                    return competenceCourseLoad;
                }
            }
        }
        return null;
View Full Code Here

        }
        return Collections.min(competenceCourseInformations, CompetenceCourseInformation.COMPARATORY_BY_EXECUTION_PERIOD);
    }

    public boolean isCompetenceCourseInformationDefinedAtExecutionPeriod(final ExecutionSemester executionSemester) {
        final CompetenceCourseInformation information = findCompetenceCourseInformationForExecutionPeriod(executionSemester);
        return information != null && information.getExecutionPeriod().equals(executionSemester);
    }
View Full Code Here

        if (executionSemester.isBefore(getOldestCompetenceCourseInformation().getExecutionPeriod())) {
            return null;
        }

        CompetenceCourseInformation minCompetenceCourseInformation = null;
        for (final CompetenceCourseInformation competenceCourseInformation : getOrderedCompetenceCourseInformations()) {
            if (competenceCourseInformation.getExecutionPeriod().isAfter(executionSemester)) {
                return minCompetenceCourseInformation;
            } else {
                minCompetenceCourseInformation = competenceCourseInformation;
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.degreeStructure.CompetenceCourseInformation

Copyright © 2018 www.massapicom. 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.