// Create the comparison object:
if(m.getTarget().getType() == TargetType.DIGITAL_OBJECT_PAIR ) {
MeasuredComparisonBean mb = new MeasuredComparisonBean(
m.getProperty(),
findPropertyEvaluation(pevals,m) );
mb.getCompared().add(new MeasurementBean(me, m) );
cmp.put( m.getIdentifier(), mb );
} else if( m.getTarget().getType() == TargetType.DIGITAL_OBJECT ) {
MeasuredComparisonBean mcb = cmp.get(m.getIdentifier());
if( mcb == null ) {
mcb = new MeasuredComparisonBean(
m.getProperty(),
findPropertyEvaluation(pevals,m) );
cmp.put(m.getIdentifier(), mcb);
}
if( dobUri1.equals(m.getTarget().getDigitalObjects().firstElement())) {
mcb.getFirst().add(new MeasurementBean(me,m));
} else if( dobUri2.equals(m.getTarget().getDigitalObjects().firstElement())) {
mcb.getSecond().add(new MeasurementBean(me,m));
}
}
}
}
}