01: package org.osbl.riskmanagement.model;
02:
03: import org.conform.format.AbstractFormat;
04:
05: public class RiskFormat extends AbstractFormat {
06: public String format(Object value) {
07: Risk risk = (Risk) value;
08: RiskType riskType = risk.getType();
09: if (riskType != null) {
10: String name = riskType.getName();
11: return (name != null ? name : riskType.getKey()) + " "
12: + risk.getKey();
13: } else
14: return risk.getKey();
15: }
16: }
|