ProjectData p = (ProjectData) it.next(); d.linkProject((Project) mapper.map(p));
ProjectData pd = (ProjectData) it.next(); Project p = (Project) mapper.map( pd ); if ( ! linked( p.findProjectDatasetLink( d ))) d.linkProject( p );
    public IObject fillIObject( IObject obj, ReverseModelMapper mapper)    {        if ( obj instanceof Dataset)        {            Dataset d = (Dataset) obj;                      if (super.fill(d)) {                d.setName(this.getName());                d.setDescription(this.getDescription());                if (this.getImages() != null) {                    for (Iterator it = this.getImages().iterator(); it.hasNext();)                    {                        ImageData i = (ImageData) it.next();                        d.linkImage((Image) mapper.map(i));                    }                }                                if (this.getProjects() != null) {                    for (Iterator it = this.getProjects().iterator(); it.hasNext();)                    {                        ProjectData p = (ProjectData) it.next();                        d.linkProject((Project) mapper.map(p));                    }                }                                if (this.getAnnotations() != null) {                    for (Iterator it = this.getAnnotations().iterator(); it.hasNext();)                    {                        AnnotationData ann = (AnnotationData) it.next();                        d.addToAnnotations( (DatasetAnnotation) mapper.map(ann));                    }                }                            }            return d;                    } else {                        throw new IllegalArgumentException(                    "DatasetData can only fill Dataset.");                    }    }