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);
//Sort out what we know about the dish
ArrayList spotReadings = currentDish.getSpotReadings();
Microscope microscope = currentDish.getMicroscope();
//Set the top level nodes we can
RecordModel microscopeNode = recordModelFactory.createRecordModel("Microscope"); //$NON-NLS-1$
RecordModel objectiveNode = recordModelFactory.createRecordModel("Objective_Details"); //$NON-NLS-1$
//Do the microscope:
objectiveNode.setValue("name", microscope.getName(), false); //$NON-NLS-1$
objectiveNode.setValue("lensNA", microscope.getLens(), false); //$NON-NLS-1$
objectiveNode.setValue("magnification", microscope.getMagnification(), false); //$NON-NLS-1$
//Assemble the node
microscopeNode.addChild("Objective_Details", objectiveNode, false); //$NON-NLS-1$
//Add it to the dish
dishNode.addChild("Microscope", microscopeNode, false); //$NON-NLS-1$
dishNode.setValue("dishNumber", Integer.toString(currentDish.getDishNumber()), false); //$NON-NLS-1$
//And now the spot readings...
for (int j =0; j<spotReadings.size();j++) {
SpotReading currentSpot = (SpotReading)spotReadings.get(j);