ProjectMapper.fillProjectsTree(projects, results, projectIDs);
ProjectMapper.fillProjectsTree(projects, results, projectIDs, null, null);
    public List retrieveProjectsTree(List projectIDs, boolean annotated)        throws DSOutOfServiceException, DSAccessException    {        Criteria c;        if (projectIDs.size() > LIMIT_FOR_IN)             c = ProjectMapper.buildProjectsTreeCriteria(null);        else c = ProjectMapper.buildProjectsTreeCriteria(projectIDs);        List projects = (List) gateway.retrieveListData(Project.class, c);        List results = new ArrayList();        //Put the server data into the corresponding client object.        if (projects == null || projects.size() == 0) return results;                if (!annotated) {            ProjectMapper.fillProjectsTree(projects, results, projectIDs);            return results;        }        //Retrieve the user ID.        UserCredentials uc = (UserCredentials)                            registry.lookup(LookupNames.USER_CREDENTIALS);        List datasetIDs = ProjectMapper.prepareListDatasetsID(projects);        List imageIDs = ProjectMapper.prepareListImagesID(projects);        if (datasetIDs.size() > LIMIT_FOR_IN) datasetIDs = null;        c = AnnotationMapper.buildDatasetAnnotationCriteria(datasetIDs,                 uc.getUserID());        List dsAnnotations =             (List) gateway.retrieveListSTSData("DatasetAnnotation", c);        if (imageIDs.size() > LIMIT_FOR_IN) imageIDs = null;        c = AnnotationMapper.buildImageAnnotationCriteria(imageIDs,                 uc.getUserID());        List isAnnotations =             (List) gateway.retrieveListSTSData("ImageAnnotation", c);        ProjectMapper.fillProjectsTree(projects, results, projectIDs,                                     dsAnnotations, isAnnotations);        return results;    }