final FormatParser parser = new N3FormatParser(triplesParser, prefixParser);
return new RDFEventReaderImpl(reader, baseURI, parser);
}
private TripleParser init(final Graph graph) {
final NamespaceAwareNodeParsersFactory parsersFactory = new NamespaceAwareNodeParsersFactoryImpl(graph,
mapFactory, REGEX_MATCHER_FACTORY, namespaceListener);
final NamespaceAwareURIReferenceParser uriReferenceParser = parsersFactory.getUriReferenceParser();
final ParserBlankNodeFactory blankNodeFactory = new ParserBlankNodeFactoryImpl(mapFactory,
graph.getElementFactory());
final BlankNodeParser blankNodeParser = parsersFactory.getBlankNodeParserWithFactory(blankNodeFactory);
final LiteralParser literalParser = parsersFactory.getLiteralParser();
final NodeMaps nodeMaps = new NamespaceAwareNodeMaps(uriReferenceParser, blankNodeParser, literalParser);
final RegexTripleParser regexTripleFactory = new RegexTripleParserImpl(REGEX_MATCHER_FACTORY,
graph.getTripleFactory(), nodeMaps);
return new NamespaceAwareTripleParser(REGEX_MATCHER_FACTORY, blankNodeParser, regexTripleFactory);
}