void ensureRootAlbum(boolean allowRootPhotos) {
    if (allowRootPhotos) {
      return;
    }
    PhotoAlbum rootAlbum =
        new PhotoAlbum(
            ROOT_ALBUM, ROOT_ALBUM, "A copy of your transferred photos that were not in any album");
    boolean usedRootAlbum = false;

    for (PhotoModel photo : photos) {
      if (photo.getAlbumId() == null) {
        photo.reassignToAlbum(rootAlbum.getId());
        usedRootAlbum = true;
      }
    }
    if (usedRootAlbum) {
      List<PhotoAlbum> albums_ = new ArrayList<PhotoAlbum>(albums);
      albums_.add(rootAlbum);
      this.albums = albums_;
    }
  }
A Wrapper for all the possible objects that can be returned by a photos exporter.
portability-types-common/src/main/java/org/datatransferproject/types/common/models/photos/PhotosContainerResource.java