code: public static RDFSyntax getSyntax(final IOService ioService, final List<MediaType> acceptableTypes,
              final String mimeType) {
          if (acceptableTypes.isEmpty()) {
              return mimeType != null ? null : TURTLE;
          }
          final MediaType mt = mimeType != null ? MediaType.valueOf(mimeType) : null;
          for (final MediaType type : acceptableTypes) {
              if (type.isCompatible(mt)) {
                  return null;
              }
              final RDFSyntax syntax = ioService.supportedReadSyntaxes().stream()
                  .filter(s -> MediaType.valueOf(s.mediaType()).isCompatible(type))
                  .findFirst().orElse(null);
              if (syntax != null) {
                  return syntax;
              }
          }
          LOGGER.debug("Valid syntax not found among {} or {}", acceptableTypes, mimeType);
          throw new NotAcceptableException();
      }
docs: Given a list of acceptable media types, get an RDF syntax.
  
  @param ioService the I/O service
  @param acceptableTypes the types from HTTP headers
  @param mimeType an additional "default" mimeType to match
  @return an RDFSyntax or, in the case of binaries, null
  @throws NotAcceptableException if no acceptable syntax is available