code: private static List<String> getAllPathAncestors(final String path) {
          final List<String> segments = asList(path.split("/"));
          return range(1, segments.size())
                  .mapToObj(frameSize -> FEDORA_INTERNAL_PREFIX + "/" + String.join("/", segments.subList(1, frameSize)))
                  .collect(toList());
      }
docs: Given a path (e.g. /a/b/c/d) retrieve a list of all ancestor paths.
  In this case, that would be a list of "/a/b/c", "/a/b", "/a" and "/".