code: private static String getDisplayName(ImmutableTerm term, PrefixManager prefixManager) {
          if (term instanceof ImmutableFunctionalTerm)
              return displayFunction((ImmutableFunctionalTerm) term, prefixManager);
          if (term instanceof Variable)
              return displayVariable((Variable)term);
          if (term instanceof IRIConstant)
              return displayURIConstant((Constant)term, prefixManager);
          if (term instanceof ValueConstant)
              return displayValueConstant((Constant)term);
          if (term instanceof BNode)
              return displayBnode((BNode)term);
          throw new UnexpectedTermException(term);
      }
docs: Prints the text representation of different terms.