Beispiel #1
0
  private void fillParticipant(
      String guiderRole,
      final PhdIndividualProgramProcess process,
      PhdParticipant phdParticipant,
      HSSFRow row) {
    String processNumber = process.getProcessNumber();
    String studentNumber =
        process.getStudent() != null ? process.getStudent().getNumber().toString() : "";
    String studentName = process.getPerson().getName();

    String participantName = phdParticipant.getName();
    String institution = phdParticipant.getWorkLocation();

    addCellValue(row, onNullEmptyString(processNumber), 0);
    addCellValue(row, onNullEmptyString(studentNumber), 1);
    addCellValue(row, onNullEmptyString(studentName), 2);
    addCellValue(row, onNullEmptyString(participantName), 3);
    addCellValue(row, onNullEmptyString(guiderRole), 4);
    addCellValue(row, onNullEmptyString(institution), 5);

    if (!phdParticipant.isTeacher()) {
      addCellValue(row, onNullEmptyString(null), 6);
      addCellValue(row, onNullEmptyString(null), 7);
      addCellValue(row, onNullEmptyString(null), 8);
    } else {
      InternalPhdParticipant internalPhdParticipant = (InternalPhdParticipant) phdParticipant;
      Teacher teacher = internalPhdParticipant.getTeacher();

      addCellValue(row, onNullEmptyString(teacher.getTeacherId()), 6);
      Department department = internalPhdParticipant.getDepartment();

      addCellValue(row, onNullEmptyString(department != null ? department.getCode() : ""), 7);
      addCellValue(row, onNullEmptyString(department != null ? department.getName() : ""), 8);
    }
  }
Beispiel #2
0
 private static void drawGuiding(final Page page, final PhdParticipant guiding)
     throws IOException {
   page.tableStart("tstyle2 thwhite thnowrap thlight thleft thtop ulnomargin ");
   page.rowStart()
       .headerStartWithStyle("width: 125px;")
       .write("Name:")
       .headerEnd()
       .column(guiding.getName())
       .rowEnd();
   page.rowStart().header("Affiliation:").column(guiding.getWorkLocation()).rowEnd();
   page.rowStart().header("Email:").column(guiding.getEmail()).rowEnd();
   page.tableEnd();
 }