List datasetsDS = null;  if (datasets != null) datasetsDS = DatasetMapper.fillFullUserDatasets(datasets, dProto,iProto);   return datasetsDS;
if (datasets == null || datasets.size() == 0) return new ArrayList(); return DatasetMapper.fillFullUserDatasets(datasets, dProto, iProto);
    public List fullRetrieveUserDatasets(DatasetData dProto,                                         ImageSummary iProto)		throws DSOutOfServiceException, DSAccessException	{    	//Make a new proto if none was provided.		if (dProto == null) dProto = new DatasetData();		if (iProto == null) iProto = new ImageSummary();				//Retrieve the user ID.		UserCredentials uc = (UserCredentials)							registry.lookup(LookupNames.USER_CREDENTIALS);		//Define the criteria by which the object graph is pulled out.		Criteria c = 			DatasetMapper.buildFullUserDatasetsCriteria(uc.getUserID());		//Load the graph defined by criteria.		List datasets = (List) gateway.retrieveListData(Dataset.class, c);	  			//List of dataset summary objects.		List datasetsDS = null;		//Put the server data into the corresponding client object.		if (datasets != null) 		    datasetsDS = 				DatasetMapper.fillFullUserDatasets(datasets, dProto,iProto);    		//can be null		return datasetsDS;	}