code: private static String extractRelativeUrl(String resURI, String parentUri) {
  
          if (Strings.isNullOrEmpty(parentUri)) {
              if (resURI.isEmpty()) {
                  return "/";
              }
              return resURI;
          }
  
          String url;
  
          //Get the relative part of the url
          String root = parentUri;
          if (!root.endsWith("/")) {
              root += "/";
          }
  
          if (!resURI.startsWith(root)) {
              url = resURI;
          } else {
              url = resURI.substring(parentUri.length(), resURI.length());
          }
  
          if (url.isEmpty()) {
              return "/";
          }
  
          return url;
      }
docs: Get the relative route uri from its resURI/fullUri and parentUri.
  
  @param resURI    the route full uri.
  @param parentUri the route parent uri.
  @return The route relative uri.