code: public static Link filterLinkParams(final Link link, final boolean filter) {
          // from and until parameters can cause problems with downstream applications because they contain commas. This
          // method makes it possible to filter out those params, if desired. By default, they are not filtered out.
          if (filter) {
              if (TIMEMAP.equals(link.getRel())) {
                  return Link.fromUri(link.getUri()).rel(TIMEMAP).type(APPLICATION_LINK_FORMAT).build();
              } else if (MEMENTO.equals(link.getRel())) {
                  return Link.fromUri(link.getUri()).rel(MEMENTO).build();
              }
          }
          return link;
      }
docs: Filter link parameters from a provided Link object, if configured to do so.
  @param link the link
  @param filter whether to filter the memento parameters
  @return a Link without Memento parameters, if desired; otherwise, the original link