code: public ResponseBuilder ldpOptions(final Resource res) {
          final String identifier = getBaseUrl() + req.getPartition() + req.getPath();
  
          LOGGER.debug("OPTIONS request for {}", identifier);
  
          final IRI graphName = ACL.equals(req.getExt()) ? PreferAccessControl : PreferUserManaged;
  
          // Check if this is already deleted
          checkDeleted(res, identifier);
  
          final ResponseBuilder builder = status(NO_CONTENT);
  
          ldpResourceTypes(res.getInteractionModel()).forEach(type -> builder.link(type.getIRIString(), "type"));
  
          if (res.isMemento() || TIMEMAP.equals(req.getExt())) {
              // Mementos and TimeMaps are read-only
              builder.header(ALLOW, join(",", GET, HEAD, OPTIONS));
          } else {
              builder.header(ACCEPT_PATCH, APPLICATION_SPARQL_UPDATE);
              // ACL resources allow a limited set of methods (no DELETE or POST)
              // If it's not a container, POST isn't allowed
              if (PreferAccessControl.equals(graphName) || res.getInteractionModel().equals(RDFSource) ||
                      res.getInteractionModel().equals(NonRDFSource)) {
                  builder.header(ALLOW, join(",", GET, HEAD, OPTIONS, PATCH, PUT, DELETE));
              } else {
                  // Containers and binaries support POST
                  builder.header(ALLOW, join(",", GET, HEAD, OPTIONS, PATCH, PUT, DELETE, POST));
                  builder.header(ACCEPT_POST, MEDIA_TYPES.stream().map(mt -> mt.getType() + "/" + mt.getSubtype())
                          .filter(mt -> !TEXT_HTML.equals(mt)).collect(joining(",")));
              }
          }
  
          return builder;
      }
docs: Build the representation for the given resource
  @param res the resource
  @return the response builder