예제 #1
0
 private void traverse(final Module module, final Integer depth, final StringBuilder sb) {
   final String indent = Strings.repeat(INDENTATION, depth);
   sb.append(indent)
       .append("<m name=\"")
       .append(module.getTitle())
       .append("\" ")
       .append(formatMandatory(module))
       .append(" pordnr=\"")
       .append(module.getPordnr())
       .append("\" ")
       .append(formatCreditPoints(module))
       .append(" />\n");
 }
예제 #2
0
 private String formatMandatory(final Module mod) {
   if (!mod.getMandatory()) {
     return "";
   }
   return "pflicht=\"j\"";
 }
예제 #3
0
 private String formatCreditPoints(final Module module) {
   if (module.getCreditPoints() < 0) {
     return "";
   }
   return "cp=\"" + module.getCreditPoints() + "\"";
 }