private static DatasetGraph parse(HttpActionREST action, Lang lang, String base, InputStream input)
{
Graph graphTmp = GraphFactory.createGraphMem() ;
Sink<Triple> sink = new SinkTriplesToGraph(graphTmp) ;
LangRIOT parser = RiotReader.createParserTriples(input, lang, base, sink) ;
parser.getProfile().setHandler(errorHandler) ;
try {
parser.parse() ;
}
catch (RiotException ex) { errorBadRequest("Parse error: "+ex.getMessage()) ; }
finally { sink.close() ; }
DatasetGraph dsgTmp = DatasetGraphFactory.create(graphTmp) ;