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 ; }
Filter link parameters from a provided Link object if configured to do so .