code: protected String computeLabel(ResourceReference reference)
      {
          // Look for a component implementing URILabelGenerator with a role hint matching the link scheme.
          // If not found then use the full reference as the label.
          // If there's no scheme separator then use the full reference as the label. Note that this can happen
          // when we're not in wiki mode (since all links are considered URIs when not in wiki mode).
          String label;
          try {
              URILabelGenerator uriLabelGenerator =
                  this.componentManager.getInstance(URILabelGenerator.class, reference.getType().getScheme());
              label = uriLabelGenerator.generateLabel(reference);
          } catch (ComponentLookupException e) {
              label = reference.getReference();
          }
          return label;
      }
docs: Default implementation for computing a link label when no label has been specified. Can be overwritten by
  implementations to provide a different algorithm.
  
  @param reference the reference of the link for which to compute the label
  @return the computed label