code: public CompletionStage<ResponseBuilder> updateResource(final ResponseBuilder builder) {
          LOGGER.debug("Updating {} via PATCH", getIdentifier());
  
          // Add the LDP link types
          if (ACL.equals(getRequest().getExt())) {
              getLinkTypes(LDP.RDFSource).forEach(type -> builder.link(type, "type"));
          } else {
              getLinkTypes(getResource().getInteractionModel()).forEach(type -> builder.link(type, "type"));
          }
  
          final TrellisDataset mutable = TrellisDataset.createDataset();
          final TrellisDataset immutable = TrellisDataset.createDataset();
  
          return assembleResponse(mutable, immutable, builder)
              .whenComplete((a, b) -> mutable.close())
              .whenComplete((a, b) -> immutable.close());
      }
docs: Update the resource in the persistence layer.
  
  @param builder the Trellis response builder
  @return a response builder promise