code: public boolean isRootResource(final Graph graph, final Node subject) {
          final String rootRes = graph.getPrefixMapping().expandPrefix(FEDORA_REPOSITORY_ROOT);
          final Node root = createResource(rootRes).asNode();
          return graph.contains(subject, rdfType().asNode(), root);
      }
docs: Is the subject the repository root resource.
  
  @param graph The graph
  @param subject The current subject
  @return true if has rdf:type http://fedora.info/definitions/v4/repository#RepositoryRoot