code: public Map<String, String> getNodeBreadcrumbs(final UriInfo uriInfo,
              final Node subject) {
          final String topic = subject.getURI();
  
          LOGGER.trace("Generating breadcrumbs for subject {}", subject);
          final String baseUri = uriInfo.getBaseUri().toString();
  
          if (!topic.startsWith(baseUri)) {
              LOGGER.trace("Topic wasn't part of our base URI {}", baseUri);
              return emptyMap();
          }
  
          final String salientPath = topic.substring(baseUri.length());
          final StringJoiner cumulativePath = new StringJoiner("/");
          return stream(salientPath.split("/")).filter(seg -> !seg.isEmpty()).collect(toMap(seg -> uriInfo
                  .getBaseUriBuilder().path(cumulativePath.add(seg).toString())
                  .build().toString(), seg -> seg, (u, v) -> null, LinkedHashMap::new));
      }
docs: Generate url to local name breadcrumbs for a given node's tree
  
  @param uriInfo the uri info
  @param subject the subject
  @return breadcrumbs