code: public Resource<L> getParent(Resource<L> resource) {
          // do NOT call resource.getParent(), we want the one in our graph, not the one in the resource object
          graphLockRead.lock();
          try {
              Set<Resource<L>> directParents = neighborIndex.predecessorsOf(resource);
              if (directParents.isEmpty()) {
                  return null;
              }
              return directParents.iterator().next();
          } finally {
              graphLockRead.unlock();
          }
      }
docs: Returns the direct parent of the given resource. This examines the internal hierarchical graph
  to determine parentage.
  
  @param resource the resource whose parent is to be returned
  
  @return the direct parent of the given resource, or null if this is a root resource without a parent
  
  @throws IllegalArgumentException if the resource itself is not found in the graph