Omero Web - get comments of ROIs

Dear all,

currently I am working on a groovy script which requires to load rois attached to an image. I managed to get the rois of an image. But we also would like to read the comments we attached to the rois in omero.web.iviewer… I tried to find something in the documentation and failed …

This is the state of my script:

roi_facility = gateway.getFacility(ROIFacility)
    result = roi_facility.loadROIs(ctx, image_id)
	roi_result = result.iterator().next()
	if (roi_result==null){
		println("No ROIs found")
		return null
	}
	roi_result = roi_result.getROIs()
	j = roi_result.iterator()
	while (j.hasNext()) {
	  	roi = j.next()
	  	shapes= roi.getShapes()

Is there something for omero.gateway.model.ROIData like:

shapes.getComment()

Thank you very much!

sorry solved it myself.
answer for an entry in shapes is:

shapes[0].getText()