code: public Set<ResourceType<L>> getRootResourceTypes() {
          Set<ResourceType<L>> roots = new HashSet<>();
          Set<ResourceType<L>> allTypes = resourceTypesGraph.vertexSet();
          for (ResourceType<L> type : allTypes) {
              if (index.predecessorsOf(type).isEmpty()) {
                  if (type.getParents().isEmpty()) {
                      roots.add(type);
                  } else {
                      log.errorInvalidRootResourceType(type.getID().getIDString(), type.getParents());
                  }
              }
          }
          return Collections.unmodifiableSet(roots);
      }
docs: Returns resource types that are at the top of the hierarchy (that is, they do not have any parent types).
  
  @return root types