if (getDocumentRequest().isRequestForRegistration()) {
final StringBuilder res = new StringBuilder();
RegistryDiplomaRequest request = (RegistryDiplomaRequest) getDocumentRequest();
CycleType cycle = request.getRequestedCycle();
Degree degree = request.getDegree();
final DegreeType degreeType = request.getDegreeType();
if (degreeType.hasAnyCycleTypes()) {
res.append(cycle.getDescription(getLocale()));
res.append(" ").append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.of.both")).append(" ");
}
if (!degree.isEmpty()) {
res.append(degreeType.getFilteredName(getLocale()));
res.append(" ").append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.in")).append(" ");
}
res.append(degree.getNameI18N(request.getConclusionYear()).getContent(getLanguage()));
return res.toString();