code: public ResponseBuilder ldpOptions(final ResponseBuilder builder) {
          LOGGER.debug("OPTIONS request for {}", getIdentifier());
  
          ldpResourceTypes(getResource().getInteractionModel())
              .forEach(type -> builder.link(type.getIRIString(), "type"));
  
          if (isMemento || TIMEMAP.equals(getRequest().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) || getResource().getInteractionModel().equals(RDFSource) ||
                      getResource().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, getServices().getIOService().supportedWriteSyntaxes().stream()
                          .map(RDFSyntax::mediaType).collect(joining(",")));
              }
          }
  
          return builder;
      }
docs: Build the representation for the given resource.
  
  @param builder a response builder
  @return the response builder