protected static void checkDeleted ( final Resource res , final String identifier ) { if ( RdfUtils . isDeleted ( res ) ) { throw new WebApplicationException ( status ( GONE ) . links ( MementoResource . getMementoLinks ( identifier , res . getMementos ( ) ) . toArray ( Link [ ] :: new ) ) . build ( ) ) ; } }
Check if this is a deleted resource and if so return an appropriate response