Package pt.utl.ist.fenix.tools.util.excel.Spreadsheet

Examples of pt.utl.ist.fenix.tools.util.excel.Spreadsheet.Row


    protected Spreadsheet buildIndividualCandidacyReport(final Spreadsheet spreadsheet,
            final IndividualCandidacyProcess individualCandidacyProcess) {
        DegreeCandidacyForGraduatedPersonIndividualProcess degreeCandidacyForGraduatedPersonProcess =
                (DegreeCandidacyForGraduatedPersonIndividualProcess) individualCandidacyProcess;

        final Row row = spreadsheet.addRow();
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getProcessCode());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPersonalDetails().getName());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPersonalDetails().getIdDocumentType().getLocalizedName());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPersonalDetails().getDocumentIdNumber());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPersonalDetails().getCountry().getCountryNationality()
                .getContent());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPrecedentDegreeInformation().getDegreeAndInstitutionName());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPrecedentDegreeInformation().getDegreeDesignation());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPrecedentDegreeInformation().getConclusionDate()
                .toString(dateFormat));
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getPrecedentDegreeInformation().getConclusionGrade());
        row.setCell(degreeCandidacyForGraduatedPersonProcess.getCandidacy().getSelectedDegree().getName());
        row.setCell(BundleUtil.getString(Bundle.ENUMERATION, individualCandidacyProcess.getCandidacyState().getQualifiedName()));
        row.setCell(BundleUtil.getString(Bundle.CANDIDATE, degreeCandidacyForGraduatedPersonProcess.getProcessChecked() != null
                && degreeCandidacyForGraduatedPersonProcess.getProcessChecked() ? MESSAGE_YES : MESSAGE_NO));
        return spreadsheet;
    }
View Full Code Here


    @Override
    protected Spreadsheet buildIndividualCandidacyReport(final Spreadsheet spreadsheet,
            final IndividualCandidacyProcess individualCandidacyProcess) {
        DegreeChangeIndividualCandidacyProcess degreeChangeIndividualCandidacyProcess =
                (DegreeChangeIndividualCandidacyProcess) individualCandidacyProcess;
        final Row row = spreadsheet.addRow();
        row.setCell(degreeChangeIndividualCandidacyProcess.getProcessCode());
        row.setCell(degreeChangeIndividualCandidacyProcess.getPersonalDetails().getName());
        row.setCell(degreeChangeIndividualCandidacyProcess.getPersonalDetails().getIdDocumentType().getLocalizedName());
        row.setCell(degreeChangeIndividualCandidacyProcess.getPersonalDetails().getDocumentIdNumber());
        row.setCell(degreeChangeIndividualCandidacyProcess.getPersonalDetails().getCountry().getCountryNationality().getContent());
        row.setCell(degreeChangeIndividualCandidacyProcess.getPrecedentDegreeInformation().getPrecedentInstitution().getName());
        row.setCell(degreeChangeIndividualCandidacyProcess.getPrecedentDegreeInformation().getPrecedentDegreeDesignation());
        row.setCell(degreeChangeIndividualCandidacyProcess.getCandidacy().getSelectedDegree().getName());
        row.setCell(BundleUtil.getString(Bundle.ENUMERATION, individualCandidacyProcess.getCandidacyState().getQualifiedName()));
        row.setCell(BundleUtil.getString(Bundle.CANDIDATE, degreeChangeIndividualCandidacyProcess.getProcessChecked() != null
                && degreeChangeIndividualCandidacyProcess.getProcessChecked() ? MESSAGE_YES : MESSAGE_NO));
        return spreadsheet;
    }
View Full Code Here

        for (final SecondCycleIndividualCandidacyProcess process : name) {
            if (!process.canExecuteActivity(Authenticate.getUser())) {
                continue;
            }
            final Row row = spreadsheet.addRow();
            row.setCell(process.getPersonalDetails().getName());
            row.setCell(process.getPrecedentDegreeInformation().getConclusionGrade());
            row.setCell(process.getCandidacyProfessionalExperience());
            row.setCell(process.getPrecedentDegreeInformation().getDegreeAndInstitutionName());
            row.setCell(process.getCandidacyAffinity());
            row.setCell(process.getCandidacyDegreeNature());
            row.setCell(process.getCandidacyGrade());
            row.setCell(process.getCandidacyInterviewGrade() != null ? process.getCandidacyInterviewGrade() : " ");
            row.setCell(process.getCandidacySeriesGrade());
            if (process.isCandidacyAccepted() || process.isCandidacyRejected()) {
                row.setCell(BundleUtil.getString(Bundle.ENUMERATION, process.getCandidacyState().getQualifiedName()));
            } else {
                row.setCell(" ");
            }
        }

        return spreadsheet;
    }
View Full Code Here

        }
        spreadsheet.exportToXLSSheet(writer);
    }

    private void addRow(final Spreadsheet spreadsheet, final StandaloneIndividualCandidacyProcess candidacy) {
        final Row row = spreadsheet.addRow();
        row.setCell(candidacy.getPersonalDetails().getName());
        row.setCell(candidacy.getPersonalDetails().getDocumentIdNumber());

        final StringBuilder names = new StringBuilder();
        final Iterator<CurricularCourse> elements = candidacy.getCurricularCourses().iterator();
        while (elements.hasNext()) {
            names.append(elements.next().getName(candidacy.getCandidacyExecutionInterval()));
            names.append(elements.hasNext() ? ", " : "");
        }
        row.setCell(names.toString());
    }
View Full Code Here

    protected Spreadsheet buildIndividualCandidacyReport(final Spreadsheet spreadsheet,
            final IndividualCandidacyProcess individualCandidacyProcess) {
        SecondCycleIndividualCandidacyProcess secondCycleIndividualCandidacyProcess =
                (SecondCycleIndividualCandidacyProcess) individualCandidacyProcess;

        final Row row = spreadsheet.addRow();
        row.setCell(secondCycleIndividualCandidacyProcess.getProcessCode());
        row.setCell(secondCycleIndividualCandidacyProcess.getPersonalDetails().getName());
        row.setCell(secondCycleIndividualCandidacyProcess.getPersonalDetails().getIdDocumentType().getLocalizedName());
        row.setCell(secondCycleIndividualCandidacyProcess.getPersonalDetails().getDocumentIdNumber());

        row.setCell(secondCycleIndividualCandidacyProcess.getPersonalDetails().getCountry() != null ? secondCycleIndividualCandidacyProcess
                .getPersonalDetails().getCountry().getCountryNationality().getContent() : "");

        row.setCell(secondCycleIndividualCandidacyProcess.getPrecedentDegreeInformation().getDegreeAndInstitutionName());
        row.setCell(secondCycleIndividualCandidacyProcess.getPrecedentDegreeInformation().getDegreeDesignation());
        row.setCell(secondCycleIndividualCandidacyProcess.getPrecedentDegreeInformation().getConclusionDate() != null ? secondCycleIndividualCandidacyProcess
                .getPrecedentDegreeInformation().getConclusionDate().toString(dateFormat) : "");
        row.setCell(secondCycleIndividualCandidacyProcess.getPrecedentDegreeInformation().getConclusionGrade());

        StringBuilder degreesSb = new StringBuilder();
        for (Degree degree : secondCycleIndividualCandidacyProcess.getCandidacy().getSelectedDegreesSet()) {
            degreesSb.append(degree.getName()).append("\n");
        }

        row.setCell(degreesSb.toString());
        row.setCell(BundleUtil.getString(Bundle.ENUMERATION, individualCandidacyProcess.getCandidacyState().getQualifiedName()));
        row.setCell(BundleUtil.getString(Bundle.CANDIDATE, secondCycleIndividualCandidacyProcess.getProcessChecked() != null
                && secondCycleIndividualCandidacyProcess.getProcessChecked() ? MESSAGE_YES : MESSAGE_NO));
        row.setCell(secondCycleIndividualCandidacyProcess.getCandidacyNotes());
        return spreadsheet;
    }
View Full Code Here

    private Spreadsheet buildReport(final Degree degree,
            final SortedSet<DegreeCandidacyForGraduatedPersonIndividualProcess> candidacyProcesses) {

        final Spreadsheet spreadsheet = new Spreadsheet(degree.getSigla(), getHeader());
        for (final DegreeCandidacyForGraduatedPersonIndividualProcess process : candidacyProcesses) {
            final Row row = spreadsheet.addRow();
            row.setCell(process.getPersonalDetails().getName());
            row.setCell(process.getPrecedentDegreeInformation().getDegreeAndInstitutionName());
            row.setCell(process.getCandidacyAffinity());
            row.setCell(process.getCandidacyDegreeNature());
            row.setCell(process.getPrecedentDegreeInformation().getConclusionGrade());
            row.setCell(process.getCandidacyGrade());
            if (process.isCandidacyAccepted() || process.isCandidacyRejected()) {
                row.setCell(BundleUtil.getString(Bundle.ENUMERATION, process.getCandidacyState().getQualifiedName()));
            } else {
                row.setCell("");
            }
        }

        return spreadsheet;
    }
View Full Code Here

    }

    private void fillStudentsEnroled(Spreadsheet spreadsheet) throws FenixServiceException {

        for (WrittenEvaluationEnrolment enrolment : getWrittenEvaluationEnrolments()) {
            final Row newRow = spreadsheet.addRow();
            newRow.setCell(enrolment.getStudent().getPerson().getUsername());
            newRow.setCell(enrolment.getStudent().getNumber().toString());
            newRow.setCell(enrolment.getStudent().getPerson().getName());
            newRow.setCell(enrolment.getRoom() != null ? enrolment.getRoom().getName() : "-");
            newRow.setCell(enrolment.getStudent().getDegree().getNameI18N().getContent());
        }
    }
View Full Code Here

    }

    private void addInformation(final Spreadsheet spreadsheet, final Student student) {
        StudentCurricularPlan studentCurricularPlan = getStudentCurricularPlan(student, getExecutionSemester());

        final Row row = spreadsheet.addRow();
        row.setCell(student.getNumber());
        row.setCell(student.getPerson().getName());
        row.setCell(studentCurricularPlan.getDegreeType().getFilteredName());
        row.setCell(studentCurricularPlan.getName());
        row.setCell(studentCurricularPlan.getRegistration().getCycleType(getExecutionSemester().getExecutionYear())
                .getDescription());
        row.setCell(getApprovedECTS(student).toPlainString());
        row.setCell(getEnrolledECTS(student).toPlainString());
        row.setCell(getApprovedGradeValuesSum(student));
        row.setCell(getNumberOfApprovedCourses(student));
        row.setCell(getA(student).toPlainString());
        row.setCell(getB(student).toPlainString());
        row.setCell(getA(student).add(getB(student)).multiply(BigDecimal.valueOf(100)).intValue());

    }
View Full Code Here

        for (final Context contextWithCurricularCourse : contextsWithCurricularCourses) {
            CurricularCourse curricularCourse = (CurricularCourse) contextWithCurricularCourse.getChildDegreeModule();

            if (!curricularCourse.isOptional()
                    && !scientificAreaUnits.contains(curricularCourse.getCompetenceCourse().getScientificAreaUnit())) {
                final Row row = spreadsheet.addRow();

                if (rootWasClicked && !this.getCourseGroup().getSortedChildContextsWithCourseGroups().isEmpty()) {
                    row.setCell(courseGroupBeingReported);
                }
                row.setCell(curricularCourse.getCompetenceCourse().getScientificAreaUnit().getName());
                row.setCell(curricularCourse.getCompetenceCourse().getScientificAreaUnit().getAcronym());
                row.setCell(curricularCourse.getCompetenceCourse().getScientificAreaUnit()
                        .getScientificAreaUnitEctsCredits(contextsWithCurricularCourses).toString());

                scientificAreaUnits.add(curricularCourse.getCompetenceCourse().getScientificAreaUnit());
            }
        }
View Full Code Here

        }
    }

    private void fillCurricularCourse(final Spreadsheet spreadsheet, CurricularCourse curricularCourse,
            CurricularPeriod curricularPeriod, String parentCourseGroupName) {
        final Row row = spreadsheet.addRow();

        row.setCell(curricularCourse.getName());
        row.setCell(parentCourseGroupName);
        if (curricularCourse.isOptional()) {
            row.setCell(""); // scientific area unit name
            row.setCell(""); // scientific area unit acronym

            row.setCell(""); // regime
            row.setCell(curricularPeriod.getParent().getChildOrder() == null ? "" : curricularPeriod.getParent().getChildOrder()
                    .toString());
            row.setCell(curricularPeriod.getChildOrder().toString());

            row.setCell(""); // ects
            row.setCell(""); // t
            row.setCell(""); // tp
            row.setCell(""); // pl
            row.setCell(""); // tc
            row.setCell(""); // s
            row.setCell(""); // e
            row.setCell(""); // ot
            row.setCell(""); // ta
        } else {
            row.setCell(curricularCourse.getCompetenceCourse().getScientificAreaUnit().getName());
            row.setCell(curricularCourse.getCompetenceCourse().getScientificAreaUnit().getAcronym());

            row.setCell(BundleUtil.getString(Bundle.ENUMERATION, curricularCourse.getCompetenceCourse().getRegime().toString()));
            row.setCell(curricularPeriod.getParent().getChildOrder() == null ? "" : curricularPeriod.getParent().getChildOrder()
                    .toString());
            row.setCell(curricularPeriod.getChildOrder().toString());

            row.setCell(curricularCourse.getEctsCredits(curricularPeriod).toString());
            row.setCell(curricularCourse.getTheoreticalHours(curricularPeriod).toString());
            row.setCell(curricularCourse.getProblemsHours(curricularPeriod).toString());
            row.setCell(curricularCourse.getLaboratorialHours(curricularPeriod).toString());
            row.setCell(curricularCourse.getFieldWorkHours(curricularPeriod).toString());
            row.setCell(curricularCourse.getSeminaryHours().toString());
            row.setCell(curricularCourse.getTrainingPeriodHours(curricularPeriod).toString());
            row.setCell(curricularCourse.getTutorialOrientationHours(curricularPeriod).toString());
            row.setCell(curricularCourse.getAutonomousWorkHours(curricularPeriod).toString());
        }
        row.setCell(""); // notes
    }
View Full Code Here

TOP

Related Classes of pt.utl.ist.fenix.tools.util.excel.Spreadsheet.Row

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.