code: 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());
          }
      }
docs: Check if this is a deleted resource, and if so return an appropriate response
  @param res the resource
  @param identifier the identifier
  @throws WebApplicationException a 410 Gone exception