code: @Nullable
      public static String shortenURI(@Nullable final URI uri) {
          if (uri == null) {
              return null;
          }
          final String prefix = Data.namespaceToPrefix(uri.getNamespace(), Data.getNamespaceMap());
          if (prefix != null) {
              return prefix + ':' + uri.getLocalName();
          }
          final String ns = uri.getNamespace();
          return "&lt;.." + uri.stringValue().substring(ns.length() - 1) + "&gt;";
          // final int index = uri.stringValue().lastIndexOf('/');
          // if (index >= 0) {
          // return "&lt;.." + uri.stringValue().substring(index) + "&gt;";
          // }
          // return "&lt;" + uri.stringValue() + "&gt;";
      }
docs: Returns a shortened version of the supplied RDF {@code URI}.
  
  @param uri
  the uri to shorten
  @return the shortened URI string