private static void drawQualification(final Page page, final Qualification qualification) throws IOException { page.tableStart("tstyle2 thwhite thnowrap thlight thleft thtop ulnomargin "); if (qualification != null) { final QualificationType type = qualification.getType(); page.rowStart().header("Type:").column(type == null ? "-" : type.getLocalizedName()).rowEnd(); final String degree = qualification.getDegree(); page.rowStart().header("Scientific Field:").column(degree == null ? "-" : degree).rowEnd(); final String school = qualification.getSchool(); page.rowStart().header("Institution:").column(school == null ? "-" : school).rowEnd(); final String mark = qualification.getMark(); page.rowStart().header("Grade:").column(mark == null ? "-" : mark).rowEnd(); final Partial attendedBegin = qualification.getAttendedBegin(); page.rowStart() .header("Attended from:") .column(attendedBegin == null ? "-" : attendedBegin.toString("MM/yyyy")) .rowEnd(); final Partial attendedEnd = qualification.getAttendedEnd(); page.rowStart() .header("Attended to:") .column(attendedEnd == null ? "-" : attendedEnd.toString("MM/yyyy")) .rowEnd(); } page.tableEnd(); }
public static String getPartialString(Partial partial) { return partial.toString("MMyyyy"); }