// --- Or create a parser and do the parsing as separate steps.
String baseURI = "http://example/base" ;
in = new FileInputStream("data.trig") ;
LangRIOT parser = RiotReader.createParserQuads(in, Lang.TRIG, "http://example/base", noWhere) ;
// Parser to first error or warning.
ErrorHandler errHandler = ErrorHandlerFactory.errorHandlerStrict ;
// Now enable stricter checking, even N-TRIPLES must have absolute URIs.
ParserProfile profile = RiotLib.profile(baseURI, true, true, errHandler) ;
// Just set the error handler.
parser.getProfile().setHandler(errHandler) ;
// Or replave the whole parser profile.
parser.setProfile(profile) ;
// Do the work.
parser.parse() ;
}