if (options.format != null) {
if ("application/nquads".equals(options.format)) {
return new NQuadTripleCallback().call(dataset);
} else if ("text/turtle".equals(options.format)) {
return new TurtleTripleCallback().call(dataset);
} else {
throw new JsonLdError(JsonLdError.Error.UNKNOWN_FORMAT, options.format);
}
}
return dataset;