* they have the pattern: xcl:<propertyName>:<metricName>
*/
String[] keyParts = p.getName().split(":");
if (keyParts.length == 3) {
if ("xcl".equals(keyParts[0])) {
CprProperty cprP =
compResult.get(0).getProperties().get(keyParts[1]);
if (cprP != null) {
String id = MetricToScaleMapping.getMetricId(keyParts[2]);
if (id != null) {
Value v = null;
Scale s = MetricToScaleMapping.getScale(id);
if (s == null) {
// There is a new XCLMetric we have not registered in MetricToScaleMapping yet...
log.debug("CPR: unkown metricId: " + id);
} else {
// scale found, so we can create a value object
v = s.createValue();
v.setScale(null);
CprMetricResult mResult = cprP.getResultMetrics().get(id);
if (mResult != null) {
if ("ok".equals(mResult.getState())) {
v.parse(mResult.getResult());
v.setComment("xcdl values(sample::result)=(" + cprP.getSource()+"::" + cprP.getTarget()+")");
} else {
v.setComment(mResult.getResult());
}
}
}