code: static String root(final ResourcePath path) {
          if (path.getDepth() == 1)
              return path.getResourcePath();
          throw new JaxRxException(404, "Resource not found: " + path);
      }
docs: Returns the root resource of the specified path.
  
  @param path
  path
  @return root resource