List projectIDs)
List projectIDs, List dsAnnotations, List isAnnotations)
    public static void fillProjectsTree(List projects, List results,                             List projectIDs)    {        Iterator i = projects.iterator(), j, k;        Map datasetsMap = new HashMap(), imagesMap = new HashMap();        Project p;        List datasets, images;        ProjectSummary ps;        Dataset d;        DatasetSummaryLinked ds;        ImageSummary is;        Image img;        Integer id, idImg;        while (i.hasNext()) {            p = (Project) i.next();            if (projectIDs.contains(new Integer(p.getID()))) {                ps = new ProjectSummary(p.getID(), p.getName());                datasets = new ArrayList();                j = p.getDatasets().iterator();                while (j.hasNext()) {                    d = (Dataset) j.next();                    id = new Integer(d.getID());                    ds = (DatasetSummaryLinked) datasetsMap.get(id);                    if (ds == null) {                        //Make a new DataObject and fill it up.                        ds = new DatasetSummaryLinked();                         ds.setID(d.getID());                        ds.setName(d.getName());                        datasetsMap.put(id, ds);                    }  //object already created this object.                    //Add the dataset to this project's list.                    datasets.add(ds);                       //Add images to the dataset                    images = new ArrayList();                    k = d.getImages().iterator();                    while (k.hasNext()) {                        img = (Image) k.next();                        idImg = new Integer(img.getID());                        is = (ImageSummary) imagesMap.get(idImg);                        if (is == null) {                            is = DatasetMapper.fillImageSummary(img);                            imagesMap.put(idImg, is);                        }                        images.add(is);                    }                    ds.setImages(images);                }                //Link the datasets to this project.                ps.setDatasets(datasets);                results.add(ps);            }        }    }