setImages( new HashSet( d.eachLinkedImage( block ))); setProjects( new HashSet( d.eachLinkedProject( block ))); setAnnotations( new HashSet( d.collectAnnotations( block )));
setImages( makeSet( d.sizeOfImageLinks(), d.eachLinkedImage( block ))); setProjects( makeSet( d.sizeOfProjectLinks(), d.eachLinkedProject( block ))); setAnnotations( makeSet( d.sizeOfAnnotations(), d.collectAnnotations( block )));
    public void copy(IObject model, ModelMapper mapper) {    	if (model instanceof Dataset) {			Dataset d = (Dataset) model;            super.copy(model,mapper);            // Details            if (d.getDetails() != null){                                Details details = d.getDetails();                this.setOwner((ExperimenterData)mapper.findTarget(                        details.getOwner()));                         if ( details.getCounts() != null )                {                    Object annotationCount = details.getCounts().get( Dataset.ANNOTATIONS );                    if ( annotationCount instanceof Integer )                        this.setAnnotationCount( (Integer) annotationCount  );                }           }                        // Fields			this.setName(d.getName());			this.setDescription(d.getDescription());                        // Collections            MapperBlock block = new MapperBlock( mapper );            setImages( new HashSet( d.eachLinkedImage( block )));            setProjects( new HashSet( d.eachLinkedProject( block )));            setAnnotations( new HashSet( d.collectAnnotations( block )));            		} else {			throw new IllegalArgumentException(                    "DatasetData can only copy from Dataset");		}    }