int numberOfDishes = nodeUtils.getIntegerFieldValue( node, "numberOfDishes"); //$NON-NLS-1$
if (numberOfDishes==0) {
numberOfDishes=1;
}
ExperimentDetailsFactory expFactory = new ExperimentDetailsFactory(file);
ExperimentalDetails expDetails = expFactory.getExperimentalDetails();
final RecordModel experimentalDetails = node.getRecordModel();
final RecordNameProvider targetRecordNameProvider = node.getRecordNameProvider();
experimentalDetails.setValue("equipment_file_name", expDetails.getFileName(), false); //$NON-NLS-1$
// First let's set the number of dishes...
experimentalDetails.setValue("numberOfDishes", Integer.toString(numberOfDishes), false); //$NON-NLS-1$
//And get the dishes...
ArrayList dishes = expDetails.getDishes();
for (int i =0; i<dishes.size(); i++) {
//We need a record model for this dish.
RecordModel dishNode = recordModelFactory.createRecordModel("Dish"); //$NON-NLS-1$
Dish currentDish = (Dish)dishes.get(i);