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

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


            if (registration.isBolonha()) {
                if (registration.hasConcluded()) {
                    final SortedSet<CycleCurriculumGroup> concludeCycles =
                            new TreeSet<CycleCurriculumGroup>(CycleCurriculumGroup.COMPARATOR_BY_CYCLE_TYPE_AND_ID);
                    concludeCycles.addAll(registration.getLastStudentCurricularPlan().getInternalCycleCurriculumGrops());
                    Row row = sheet.addRow();
                    row.setCell(alumniName);
                    row.setCell(studentNumber);
                    row.setCell(registration.getDegreeName());
                    row.setCell(registration.getStartDate().toString(DATE_FORMAT));
                    final CycleCurriculumGroup lastConcludedCycle = concludeCycles.last();
                    try {
                        row.setCell(lastConcludedCycle.isConclusionProcessed() ? lastConcludedCycle.getConclusionDate().toString(
                                DATE_FORMAT) : lastConcludedCycle.calculateConclusionDate().toString(DATE_FORMAT));
                    } catch (Exception ex) {
                        row.setCell(NOT_AVAILABLE);
                    }
                    row.setCell("Bolonha");
                    row.setCell(alumni != null && alumni.getIsEmployed() != null ? getApp("label." + alumni.getIsEmployed()) : NOT_AVAILABLE);
                }
            } else {
                if (registration.isRegistrationConclusionProcessed()) {
                    Row row = sheet.addRow();
                    row.setCell(alumniName);
                    row.setCell(studentNumber);
                    row.setCell(registration.getDegreeName());
                    row.setCell(registration.getStartDate().toString(DATE_FORMAT));
                    row.setCell(registration.getConclusionDate() != null ? registration.getConclusionDate().toString(DATE_FORMAT) : NOT_AVAILABLE);
                    row.setCell("Pre-Bolonha");
                    row.setCell(alumni != null && alumni.getIsEmployed() != null ? getApp("label." + alumni.getIsEmployed()) : NOT_AVAILABLE);
                }
            }
        }
    }
View Full Code Here


    private void addPersonalDataRow(Spreadsheet sheet, String alumniName, Integer studentNumber, Person person, Alumni alumni) {
        // "NOME", "NUMERO_ALUNO", "DATA_NASCIMENTO", "MORADA", "COD_POSTAL",
        // "PAIS",
        // "EMAIL_PESSOAL", "EMAIL_ENVIAR"
        // "TELEFONE", "TELEMOVEL", "REGISTERED_WHEN"
        final Row row = sheet.addRow();
        row.setCell(alumniName);
        row.setCell(studentNumber);
        final YearMonthDay dateOfBirth = person.getDateOfBirthYearMonthDay();
        row.setCell(dateOfBirth == null ? NOT_AVAILABLE : dateOfBirth.toString("dd/MM/yyyy"));
        row.setCell(hasLastPersonalAddress(person) ? getLastPersonalAddress(person).getAddress() : NOT_AVAILABLE);
        row.setCell(hasLastPersonalAddress(person) ? getLastPersonalAddress(person).getAreaCode() : NOT_AVAILABLE);
        row.setCell(hasLastPersonalAddress(person) ? getLastPersonalAddress(person).getArea() : NOT_AVAILABLE);
        row.setCell(hasLastPersonalAddress(person) ? getLastPersonalAddress(person).getCountryOfResidenceName() : NOT_AVAILABLE);
        row.setCell(hasPersonalEmail(person) ? getPersonalEmail(person).getValue() : NOT_AVAILABLE);
        row.setCell(hasSendingEmail(person) ? getSendingEmail(person) : NOT_AVAILABLE);
        row.setCell(hasPersonalPhone(person) ? getPersonalPhone(person).getNumber() : NOT_AVAILABLE);
        row.setCell(hasRegisteredWhen(alumni) ? alumni.getRegisteredWhen().toString("yyyy-MM-dd") : NOT_AVAILABLE);
    }
View Full Code Here

        // "IDENTIFICADOR", "NOME", "NUMERO_ALUNO", "EMPREGADOR", "CIDADE",
        // "PAIS",
        // "COD_AREA_NEGOCIO", "AREA_NEGOCIO", "POSICAO", "DATA_INICIO",
        // "DATA_FIM", "FORMA_COLOCACAO", "TIPO_CONTRATO", "SALARIO",
        // "TIPO_SALARIO", "DATA_ALTERACAO", "DATA_REGISTO"
        final Row row = sheet.addRow();
        row.setCell(job.getExternalId());
        row.setCell(alumniName);
        row.setCell(studentNumber);
        row.setCell(job.getEmployerName());
        row.setCell(job.getCity());
        row.setCell(job.getCountry() != null ? job.getCountry().getName() : NOT_AVAILABLE);
        row.setCell(job.getBusinessArea() != null ? job.getBusinessArea().getCode() : NOT_AVAILABLE);
        row.setCell(job.getBusinessArea() != null ? job.getBusinessArea().getDescription().replace(';', '|') : NOT_AVAILABLE);
        row.setCell(job.getPosition());
        row.setCell(job.getBeginDate() != null ? job.getBeginDate().toString(DATE_FORMAT) : NOT_AVAILABLE);
        row.setCell(job.getEndDate() != null ? job.getEndDate().toString(DATE_FORMAT) : NOT_AVAILABLE);
        row.setCell(job.getContractType() != null ? getEnum(job.getContractType().getQualifiedName()) : NOT_AVAILABLE);
        row.setCell(job.getJobApplicationType() != null ? getEnum(job.getJobApplicationType().getQualifiedName()) : NOT_AVAILABLE);
        row.setCell(job.getSalary() != null ? job.getSalary().toString() : NOT_AVAILABLE);
        row.setCell(job.getSalaryType() != null ? getEnum(job.getSalaryType().getQualifiedName()) : NOT_AVAILABLE);
        row.setCell(job.getLastModifiedDate() != null ? job.getLastModifiedDate().toString(DATE_FORMAT) : NOT_AVAILABLE);
        AlumniIdentityCheckRequest lastIdentityRequest = job.getPerson().getStudent().getAlumni().getLastIdentityRequest();
        row.setCell(lastIdentityRequest != null ? lastIdentityRequest.getCreationDateTime().toString(DATE_FORMAT) : NOT_AVAILABLE);
    }
View Full Code Here

        // "IDENTIFICADOR", "NOME", "NUMERO_ALUNO", "TIPO", "GRAU",
        // "INSTITUICAO",
        // "COD_AREA_EDUCATIVA",
        // "AREA_EDUCATIVA", "INICIO", "CONCLUSAO", "CREDITOS_ECTS",
        // "NUMERO_HORAS", "DATA_ALTERACAO", "DATA_REGISTO"
        final Row row = sheet.addRow();
        row.setCell(formation.getExternalId());
        row.setCell(alumniName);
        row.setCell(studentNumber);
        row.setCell(formation.getFormationType() != null ? getEnum(formation.getFormationType().getQualifiedName()) : NOT_AVAILABLE);
        row.setCell(formation.getType() != null ? getEnum(formation.getType().getQualifiedName()) : NOT_AVAILABLE);
        row.setCell(formation.getInstitution() != null ? formation.getInstitution().getUnitName().getName() : NOT_AVAILABLE);
        row.setCell(formation.getEducationArea() != null ? formation.getEducationArea().getCode() : NOT_AVAILABLE);
        row.setCell(formation.getEducationArea() != null ? formation.getEducationArea().getDescription().replace(';', '|') : NOT_AVAILABLE);
        row.setCell(formation.getBeginYear());
        row.setCell(formation.getYear());
        row.setCell(formation.getEctsCredits() != null ? formation.getEctsCredits().toString() : NOT_AVAILABLE);
        row.setCell(formation.getFormationHours() != null ? formation.getFormationHours().toString() : NOT_AVAILABLE);
        row.setCell(formation.getLastModificationDateDateTime() != null ? formation.getLastModificationDateDateTime().toString(
                DATE_FORMAT) : NOT_AVAILABLE);
        AlumniIdentityCheckRequest lastIdentityRequest = formation.getPerson().getStudent().getAlumni().getLastIdentityRequest();
        row.setCell(lastIdentityRequest != null ? lastIdentityRequest.getCreationDateTime().toString(DATE_FORMAT) : NOT_AVAILABLE);
    }
View Full Code Here

                final MobilityProgram mobilityProgram = mobilityAgreement.getMobilityProgram();
                final RegistrationProtocol registrationProtocol = mobilityProgram.getRegistrationProtocol();
                final UniversityUnit universityUnit = mobilityAgreement.getUniversityUnit();
                final Country country = universityUnit.getCountry();

                final Row candidacyRow = spreadsheetCandidates.addRow();
                candidacyRow.setCell(getString("label.mobility.program"), registrationProtocol.getDescription().getContent());
                candidacyRow.setCell(getString("label.country"), country == null ? "" : country.getLocalizedName().toString());
                candidacyRow.setCell(getString("label.university"), universityUnit.getPresentationName());
                candidacyRow.setCell(getString("label.degrees"), group.getDescription());
                candidacyRow.setCell(getString("label.vacancies"), contest.getVacancies());
                candidacyRow.setCell(getString("label.username"), person.getUsername());
                candidacyRow.setCell(getString("label.name"), person.getName());
                candidacyRow.setCell(getString("label.degree"), registration.getDegree().getSigla());
                candidacyRow.setCell(getString("label.candidate.classification"), getGrades(submission));
                candidacyRow.setCell(getString("label.preference.order"), candidacy.getPreferenceOrder());
                candidacyRow.setCell(getString("label.curricular.year"), curriculum.getCurricularYear());
                candidacyRow.setCell(getString("label.ects.completed.degree"), curriculum.getSumEctsCredits().toString());
                candidacyRow.setCell(getString("label.average.degree"), curriculum.getAverage().toString());
                group.fillCycleDetails(candidacyRow, CycleType.FIRST_CYCLE, registration,
                        getString("label.ects.completed.cycle.first"), getString("label.average.cycle.first"));
                group.fillCycleDetails(candidacyRow, CycleType.SECOND_CYCLE, registration,
                        getString("label.ects.completed.cycle.second"), getString("label.average.cycle.second"));
                candidacyRow.setCell(getString("label.email"), person.getEmailForSendingEmails());
                candidacyRow.setCell(getString("label.phone"), person.getDefaultPhoneNumber());
                candidacyRow.setCell(getString("label.mobile"), person.getDefaultMobilePhoneNumber());

                for (final Registration otherRegistration : registration.getStudent().getRegistrationsSet()) {
                    if (otherRegistration != registration) {
                        final Row rowOCI = spreadsheetOtherCurricularInfo.addRow();
                        final ICurriculum curriculumOther = otherRegistration.getCurriculum();
                        rowOCI.setCell(getString("label.username"), person.getUsername());
                        rowOCI.setCell(getString("label.name"), person.getName());
                        rowOCI.setCell(getString("label.degree"), otherRegistration.getDegree().getSigla());
                        rowOCI.setCell(getString("label.curricular.year"), curriculumOther.getCurricularYear());
                        rowOCI.setCell(getString("label.ects.completed.degree"), curriculumOther.getSumEctsCredits().toString());
                        rowOCI.setCell(getString("label.average.degree"), curriculumOther.getAverage().toString());
                        group.fillCycleDetails(rowOCI, CycleType.FIRST_CYCLE, otherRegistration,
                                getString("label.ects.completed.cycle.first"), getString("label.average.cycle.first"));
                        group.fillCycleDetails(rowOCI, CycleType.SECOND_CYCLE, otherRegistration,
                                getString("label.ects.completed.cycle.second"), getString("label.average.cycle.second"));
                    }
View Full Code Here

    }

    private Spreadsheet generateSpreadsheet() {
        final Spreadsheet spreadsheet = createSpreadSheet();
        for (final StudentCurricularPlan studentCurricularPlan : filterAllStudentCurricularPlans().keySet()) {
            final Row row = spreadsheet.addRow();

            row.setCell(studentCurricularPlan.getRegistration().getNumber());
            row.setCell(studentCurricularPlan.getPerson().getName());
            row.setCell(studentCurricularPlan.getPerson().getInstitutionalOrDefaultEmailAddressValue());
            row.setCell(studentCurricularPlan.getRegistration().getLastRegistrationState(getExecutionYear()).getStateType()
                    .getDescription());
            row.setCell(studentCurricularPlan.getRegistration().getNumberOfCurriculumEntries());
            row.setCell(studentCurricularPlan.getRegistration().getEctsCredits());
            row.setCell(getAverageInformation(studentCurricularPlan));
            row.setCell(studentCurricularPlan.getRegistration().getCurricularYear());
        }

        return spreadsheet;
    }
View Full Code Here

                final Calculator calculator = new Calculator(registration.getStudent());

                if (!processed.contains(registration)) {
                    final Person person = registration.getPerson();

                    final Row row = spreadsheetCurricularInfo.addRow();
                    final BigDecimal candidacyGrade = submission.getGrade(this);
//                    final ICurriculum curriculum = registration.getCurriculum();
                    row.setCell(getString("label.username"), person.getUsername());
                    row.setCell(getString("label.name"), person.getName());
                    row.setCell(getString("label.degree"), registration.getDegree().getSigla());
                    row.setCell(getString("label.candidate.classification"),
                            candidacyGrade == null ? "" : candidacyGrade.toString());

                    row.setCell(getString("label.ects.first.cycle"), calculator.completedECTSCycle1.toString());
                    row.setCell(getString("label.ects.average"), calculator.getEctsAverage().toString());
                    row.setCell(getString("label.ects.average.first.and.second.cycle"), calculator
                            .getEctsEverateFirstAndSecondCycle().toString());
                    row.setCell(getString("label.ects.completed"), calculator.completedECTS.toString());
                    //row.setCell(getString("label.ects.pending"), calculator.getPendingEcts().toString());
                    row.setCell(getString("label.ects.enrolled"), calculator.enrolledECTS.toString());

                    for (final Registration otherRegistration : registration.getStudent().getRegistrationsSet()) {
                        final Row rowOCI = spreadsheetOtherCurricularInfo.addRow();
                        final ICurriculum curriculumOther = otherRegistration.getCurriculum();
                        rowOCI.setCell(getString("label.username"), person.getUsername());
                        rowOCI.setCell(getString("label.name"), person.getName());
                        rowOCI.setCell(getString("label.degree"), otherRegistration.getDegree().getSigla());
                        rowOCI.setCell(getString("label.curricular.year"), curriculumOther.getCurricularYear());
                        rowOCI.setCell(getString("label.ects.completed.degree"), curriculumOther.getSumEctsCredits().toString());
                        rowOCI.setCell(getString("label.average.degree"), curriculumOther.getAverage().toString());
                        fillCycleDetails(rowOCI, CycleType.FIRST_CYCLE, otherRegistration,
                                getString("label.ects.completed.cycle.first"), getString("label.average.cycle.first"));
                        fillCycleDetails(rowOCI, CycleType.SECOND_CYCLE, otherRegistration,
                                getString("label.ects.completed.cycle.second"), getString("label.average.cycle.second"));
                    }

                    for (final OutboundMobilityCandidacy c : submission.getSortedOutboundMobilityCandidacySet()) {
                        final OutboundMobilityCandidacyContest contestFromCandidacy = c.getOutboundMobilityCandidacyContest();
                        final MobilityAgreement mobilityAgreement = contestFromCandidacy.getMobilityAgreement();
                        final UniversityUnit unit = mobilityAgreement.getUniversityUnit();
                        final Country country = unit.getCountry();

                        final Row row2 = spreadsheetOptions.addRow();
                        row2.setCell(getString("label.username"), person.getUsername());
                        row2.setCell(getString("label.preference.order"), c.getPreferenceOrder());
                        row2.setCell(getString("label.degrees"), contestFromCandidacy.getOutboundMobilityCandidacyContestGroup()
                                .getDescription());
                        row2.setCell(getString("label.mobility.program"), mobilityAgreement.getMobilityProgram()
                                .getRegistrationProtocol().getDescription().getContent());
                        row2.setCell(getString("label.country"), country == null ? "" : country.getName());
                        row2.setCell(getString("label.university"), unit.getPresentationName());
                    }

                    final Row contactRow = spreadsheetContactInformation.addRow();
                    contactRow.setCell(getString("label.username"), person.getUsername());
                    contactRow.setCell(getString("label.name"), person.getName());
                    contactRow.setCell(getString("label.email"), person.getEmailForSendingEmails());
                    contactRow.setCell(getString("label.phone"), person.getDefaultPhoneNumber());
                    contactRow.setCell(getString("label.mobile"), person.getDefaultMobilePhoneNumber());

                    processed.add(registration);
                }
            }
        }
View Full Code Here

        final DegreeCurricularPlan degreeCurricularPlan = studentCurricularPlan.getDegreeCurricularPlan();
        final Degree degree = degreeCurricularPlan.getDegree();
        final Branch branch = studentCurricularPlan.getBranch();
        StudentDataShareAuthorization dataAccess =
                student.getPersonalDataAuthorizationAt(executionYear.getEndDateYearMonthDay().toDateTimeAtMidnight());
        final Row row = spreadsheet.addRow();
        row.setCell(student.getNumber().toString());
        row.setCell(person.getName());
        row.setCell(degree.getDegreeType().getLocalizedName() + " "
                + degree.getNameFor(registration.getStartExecutionYear()).getContent());
        row.setCell(branch == null ? "" : branch.getName());
        row.setCell("" + registration.getCurricularYear(executionYear));
        row.setCell("" + registration.getAverage(executionYear));
        if (registration.isConcluded()) {
            row.setCell(executionYear.getYear());
        } else {
            row.setCell("");
        }
        row.setCell(person.getAddress());
        row.setCell(person.getArea());
        row.setCell(person.getAreaCode());
        row.setCell(person.getAreaOfAreaCode());
        row.setCell(person.getDefaultPhoneNumber());
        row.setCell(person.getDefaultMobilePhoneNumber());
        row.setCell(person.getEmail());
        row.setCell(dataAccess != null ? dataAccess.getAuthorizationChoice().getDescription() : StudentPersonalDataAuthorizationChoice.NO_END
                .getDescription());
    }
View Full Code Here

    public Spreadsheet buildSpreadsheet() {
        Spreadsheet spreadsheet = new Spreadsheet("resultado da bolsa de accao social");

        setHeaders(spreadsheet);

        Row row = spreadsheet.addRow();

        row.setCell(getInstitutionCode());
        row.setCell(getInstitutionName());
        row.setCell(getApplicationNumber());
        row.setCell(getStudentNumber());
        row.setCell(getStudentName());
        row.setCell(getIdDocumentType());
        row.setCell(getIdDocumentNumber());
        row.setCell(getDegreeCode());
        row.setCell(getDegreeName());
        row.setCell(getDegreeTypeName());
        row.setCell(getNumberOfDegreeChanges());
        row.setCell(getHasMadeDegreeChangeInThisExecutionYear());
        row.setCell(getCurrentExecutionYearBeginDate());
        row.setCell(getRegimen());
        row.setCell(getCode());
        row.setCell(getFirstExecutionYearInIST());
        row.setCell(getNumberOfStudyExecutionYearsInCurrentRegistration());
        row.setCell(getNumberOfCurricularYearsOnCurrentDegreeCurricularPlan());
        row.setCell(getLastYearCurricularYear());
        row.setCell(getLastYearEnrolledECTS());
        row.setCell(getLastYearApprovedECTS());
        row.setCell(getWasApprovedOnMostECTS());
        row.setCell(getCurrentYearCurricularYear());
        row.setCell(getCurrentYearEnrolledECTS());
        row.setCell(getDegreeConcluded());
        row.setCell(getFinalResult());
        row.setCell(getGratuityAmount().toString());
        row.setCell(getNumberOfMonthsInExecutionYear());
        row.setCell(getFirstMonthToPay());
        row.setCell(getIsCETQualificationOwner());
        row.setCell(getIsDegreeQualificationOwner());
        row.setCell(getIsMasterDegreeQualificationOwner());
        row.setCell(getIsPhdQualificationOwner());
        row.setCell(getIsOwnerOfQualification());
        row.setCell(getObservations());

        return spreadsheet;
    }
View Full Code Here

                    if (transaction.getWhenRegisteredDateTime().isAfter(getEndDate())) {
                        continue;
                    }
                }

                Row row = spreadsheet.addRow();

                fillWithGratuityEventInformation(row, entry);
                fillWithTransactionsInformation(row, transaction);
            }
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.