import org.jrdf.util.boundary.RegexMatcherFactoryImpl;
public class NTriplesParserFactory implements LineHandlerFactory {
public LineHandler createParser(final Graph newGraph, final MapFactory newMapFactory) {
final NodeParsersFactory parsersFactory = new NodeParsersFactoryImpl(newGraph, newMapFactory);
final RegexMatcherFactory matcherFactory = new RegexMatcherFactoryImpl();
final NodeMaps nodeMaps = new NodeMapsImpl(parsersFactory.getUriReferenceParser(),
parsersFactory.getBlankNodeParser(), parsersFactory.getLiteralParser());
final RegexTripleParser parser = new RegexTripleParserImpl(matcherFactory, newGraph.getTripleFactory(),
nodeMaps);
final TripleParser tripleParser = new TripleParserImpl(matcherFactory, parsersFactory.getBlankNodeParser(),