code: public String getVersionSubjectUrl(final UriInfo uriInfo, final Node subject) {
          final Map<String, String> breadcrumbs = getNodeBreadcrumbs(uriInfo, subject);
          String lastUrl = null;
          for (final Map.Entry<String, String> entry : breadcrumbs.entrySet()) {
              if (entry.getValue().equals("fcr:versions")) {
                  return lastUrl;
              }
              lastUrl = entry.getKey();
          }
          return null;
       }
docs: Gets the URL of the node whose version is represented by the
  current node.  The current implementation assumes the URI
  of that node will be the same as the breadcrumb entry that
  precedes one with the path "fcr:versions".
  @param uriInfo the uri info
  @param subject the subject
  @return the URL of the node