model.getClassifications(), l, uc.getUserID());
model.getClassifications(), l);
    private CategoryData getCategory(int id, boolean withAnnotation)        throws DSOutOfServiceException, DSAccessException    {        //Retrieve the user ID.        UserCredentials uc = (UserCredentials)                registry.lookup(LookupNames.USER_CREDENTIALS);        //Retrieve the specified category.        Criteria c = CategoryMapper.buildClassificationCriteria(id);        Category category = (Category) gateway.retrieveSTSData("Category", c);        CategoryData model = new CategoryData();        if (category != null) CategoryMapper.fillCategory(category, model,                                                         uc.getUserID());        if (withAnnotation) {            List imgs = model.getImages();            if (imgs.size() != 0) {       //i.e. some classifications                List ids = new ArrayList();                Iterator i = imgs.iterator();                while (i.hasNext())                     ids.add(new Integer(((ImageSummary) i.next()).getID()));                                c = AnnotationMapper.buildImageAnnotationCriteria(ids);                List l = (List) gateway.retrieveListSTSData("ImageAnnotation",                                                         c);                                CategoryMapper.fillImageAnnotationInCategory(                        model.getClassifications(), l, uc.getUserID());            }        }        return model;    }