public ArrayList<String> getAllIdsForDownload() throws IOException, JSONException {
   HashMap<String, String> serverIdsRevs = childService.getAllIdsAndRevs();
   HashMap<String, String> repoIdsAndRevs = childRepository.getAllIdsAndRevs();
   ArrayList<String> idsToDownload = new ArrayList<String>();
   for (Map.Entry<String, String> serverIdRev : serverIdsRevs.entrySet()) {
     if (!isServerIdExistingInRepository(repoIdsAndRevs, serverIdRev)
         || (repoIdsAndRevs.get(serverIdRev.getKey()) != null
             && isRevisionMismatch(repoIdsAndRevs, serverIdRev))) {
       idsToDownload.add(serverIdRev.getKey());
     }
   }
   return idsToDownload;
 }