code: public void addRelationLabel(Relation e0, HashMap<String,String> properties) {
          String label=null;
          if (!(e0 instanceof QualifiedRelation)) return;
          QualifiedRelation e=(QualifiedRelation)e0;
          List<Type> type=pf.getType(e);
          if ((type!=null) && (!type.isEmpty())) {
              label=type.get(0).getValue().toString();
          } else if (getRelationPrintRole(e)) {
              String role=pf.getRole(e);
              if (role!=null) {
                  label=displayRole(role);
                  properties.put("fontsize","8");
              }
          }
          if (label!=null) {
              properties.put("label",convertRelationLabel(label));
              if (properties.get("fontsize")==null) {
                  properties.put("fontsize","10");
              }
          }
      }
docs: /* Displays type if any, role otherwise.