use of org.apache.jena.riot.ErrorHandlerTestLib.ErrorHandlerEx in project jena by apache.
the class TestLangNTuples method parseCount.
protected final long parseCount(CharSpace charSpace, String... strings) {
String string = String.join("\n", strings);
Tokenizer tokenizer = tokenizer(charSpace, string);
StreamRDFCounting sink = StreamRDFLib.count();
LangRIOT x = RiotParsers.createParserNTriples(tokenizer, sink, parserProfile(new ErrorHandlerEx()));
x.parse();
return sink.count();
}
use of org.apache.jena.riot.ErrorHandlerTestLib.ErrorHandlerEx in project jena by apache.
the class TestLangNTuples method parseCheck.
protected final void parseCheck(String... strings) {
String string = String.join("\n", strings);
Tokenizer tokenizer = tokenizer(string);
StreamRDFCounting sink = StreamRDFLib.count();
LangRIOT x = RiotParsers.createParserNQuads(tokenizer, sink, parserProfile(new ErrorHandlerEx()));
x.parse();
}
use of org.apache.jena.riot.ErrorHandlerTestLib.ErrorHandlerEx in project jena by apache.
the class ParserTestBaseLib method parse.
/** Parse strings to destination (checking on, URI resolution off) - convert errors and warning to ErrorHandlerEx */
static void parse(Lang lang, StreamRDF dest, String... strings) {
String string = String.join("\n", strings);
String baseIRI = "http://base/";
RDFParser.create().fromString(string).base(baseIRI).errorHandler(new ErrorHandlerEx()).lang(lang).parse(dest);
}
Aggregations