docs: public static Object toRDF(Object input, JsonLdTripleCallback callback, JsonLdOptions options)
              throws JsonLdError {
  
          final Object expandedInput = expand(input, options);
  
          final JsonLdApi api = new JsonLdApi(expandedInput, options);
          final RDFDataset dataset = api.toRDF();
  
          // generate namespaces from context
          if (options.useNamespaces) {
              List<Map<String, Object>> _input;
              if (input instanceof List) {
                  _input = (List<Map<String, Object>>) input;
              } else {
                  _input = new ArrayList<Map<String, Object>>();
                  _input.add((Map<String, Object>) input);
              }
              for (final Map<String, Object> e : _input) {
                  if (e.containsKey(JsonLdConsts.CONTEXT)) {
                      dataset.parseContext(e.get(JsonLdConsts.CONTEXT));
                  }
              }
          }
  
          if (callback != null) {
              return callback.call(dataset);
          }
  
          if (options.format != null) {
              if (JsonLdConsts.APPLICATION_NQUADS.equals(options.format)) {
                  return new NQuadTripleCallback().call(dataset);
              } else {
                  throw new JsonLdError(JsonLdError.Error.UNKNOWN_FORMAT, options.format);
              }
          }
          return dataset;
      }