for (MeasurableProperty property: getMeasurableProperties()) {
if (property.getName().startsWith("machine:")) {
Measurement measurement = new Measurement();
measurement.setProperty(property);
FreeStringValue v =(FreeStringValue) property.getScale().createValue();
if (property.getName().equals(Machine.MACHINE_NAME)) {
v.setValue(m.getId());
} else if (property.getName().equals(Machine.MACHINE_OS)) {
v.setValue(m.getOperatingSystem());
} else if (property.getName().equals(Machine.MACHINE_CPUS)) {
v.setValue(m.getCpus());
} else if (property.getName().equals(Machine.MACHINE_CPUCLOCK)) {
v.setValue(m.getCpuClock());
} else if (property.getName().equals(Machine.MACHINE_CPUTYPE)) {
v.setValue(m.getCpuType());
} else if (property.getName().equals(Machine.MACHINE_MEMORY)) {
v.setValue(m.getMemory());
}
measurement.setValue(v);
result.getMeasurements().put(property.getName(), measurement);
}
}