public ResponseBuilder getTimeGateBuilder ( final SortedSet < Instant > mementos , final TrellisRequest req , final String baseUrl ) { final String identifier = fromUri ( baseUrl ) . path ( req . getPath ( ) ) . build ( ) . toString ( ) ; return status ( FOUND ) . location ( fromUri ( identifier + "?version=" + req . getDatetime ( ) . getInstant ( ) . getEpochSecond ( ) ) . build ( ) ) . link ( identifier , ORIGINAL + " " + TIMEGATE ) . links ( getMementoLinks ( identifier , mementos ) . map ( this :: filterLinkParams ) . toArray ( Link [ ] :: new ) ) . header ( VARY , ACCEPT_DATETIME ) ; }
Create a response builder for a TimeGate response .