* @param e
* @param filename
* @param data
*/
private MigrationResult runExperiment(MassMigrationExperiment e, String filename, byte[] data) {
IMigrationAction service = getService(e.getAction());
DetailedExperimentInfo eInfo = e.getResult().get(filename);
if (eInfo == null) {
eInfo = new DetailedExperimentInfo();
e.getResult().put(filename, eInfo);
}
// remove old results
eInfo.getMeasurements().clear();
// why does this expect an instance of SampleObject ??!!
SampleObject r = new SampleObject();
r.getData().setData(data);
r.setFullname(filename);
Measurement success = new Measurement();
success.setProperty(new MeasurableProperty(new BooleanScale(), MigrationResult.MIGRES_SUCCESS));
success.setValue(success.getProperty().getScale().createValue());
Measurement report = new Measurement();
report.setProperty(new MeasurableProperty(new FreeStringScale(), MigrationResult.MIGRES_REPORT));
report.setValue(report.getProperty().getScale().createValue());
try {
MigrationResult result = service.migrate(e.getAction(), r);
if (result.isSuccessful()) {
/* put all info to toolExperience */
eInfo.getMeasurements().putAll(result.getMeasurements());
((BooleanValue)success.getValue()).setValue("true");