code: public static void recursiveDelete(final ServiceBundler services, final Session session, final IRI identifier,
              final String baseUrl) {
          final List<IRI> resources = services.getResourceService().get(identifier)
              .thenApply(res -> res.stream(LDP.PreferContainment).map(Quad::getObject).filter(IRI.class::isInstance)
                      .map(IRI.class::cast).collect(toList())).toCompletableFuture().join();
          resources.forEach(id -> recursiveDelete(services, session, id, baseUrl));
          resources.stream().parallel().map(id -> {
                  final TrellisDataset immutable = TrellisDataset.createDataset();
                  services.getAuditService().creation(id, session).stream()
                      .map(skolemizeQuads(services.getResourceService(), baseUrl)).forEachOrdered(immutable::add);
  
                  return services.getResourceService().delete(Metadata.builder(id).interactionModel(LDP.Resource)
                          .container(identifier).build())
                      .thenCompose(future -> services.getResourceService().add(id, immutable.asDataset()))
                      .whenComplete((a, b) -> immutable.close())
                      .thenAccept(future -> services.getEventService().emit(new SimpleEvent(externalUrl(id, baseUrl),
                                  session.getAgent(), asList(PROV.Activity, AS.Delete), singletonList(LDP.Resource))));
              })
              .map(CompletionStage::toCompletableFuture).forEach(CompletableFuture::join);
      }
docs: Recursively delete resources under the given identifier.
  @param services the trellis services
  @param session the session
  @param identifier the identifier
  @param baseUrl the baseURL