Package org.jrdf.parser.n3

Examples of org.jrdf.parser.n3.N3EventReaderFactory


    public LineHandler createParser(final Graph newGraph, final MapFactory mapFactory) {
        final RegexMatcherFactory matcherFactory = new RegexMatcherFactoryImpl();
        final NamespaceListener listener = new MemNamespaceListener();
        final NamespaceAwareNodeParsersFactory parsersFactory = new NamespaceAwareNodeParsersFactoryImpl(newGraph,
            mapFactory, matcherFactory, listener);
        final NodeMaps nodeMaps = new NamespaceAwareNodeMaps(parsersFactory.getUriReferenceParser(),
            parsersFactory.getBlankNodeParser(), parsersFactory.getLiteralParser());
        final RegexTripleParser parser = new RegexTripleParserImpl(matcherFactory, newGraph.getTripleFactory(),
            nodeMaps);
        final TripleParser tripleParser = new NamespaceAwareTripleParser(matcherFactory,
            parsersFactory.getBlankNodeParser(), parser);
View Full Code Here


        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);
    }
View Full Code Here

public class N3ParserFactory implements LineHandlerFactory {
    public LineHandler createParser(final Graph newGraph, final MapFactory mapFactory) {
        final RegexMatcherFactory matcherFactory = new RegexMatcherFactoryImpl();
        final NamespaceListener listener = new MemNamespaceListener();
        final NamespaceAwareNodeParsersFactory parsersFactory = new NamespaceAwareNodeParsersFactoryImpl(newGraph,
            mapFactory, matcherFactory, listener);
        final NodeMaps nodeMaps = new NamespaceAwareNodeMaps(parsersFactory.getUriReferenceParser(),
            parsersFactory.getBlankNodeParser(), parsersFactory.getLiteralParser());
        final RegexTripleParser parser = new RegexTripleParserImpl(matcherFactory, newGraph.getTripleFactory(),
            nodeMaps);
        final TripleParser tripleParser = new NamespaceAwareTripleParser(matcherFactory,
            parsersFactory.getBlankNodeParser(), parser);
        return new N3Parser(new CommentsParserImpl(matcherFactory),
            new PrefixParserImpl(matcherFactory, listener),
            new TriplesParserImpl(tripleParser));
    }
View Full Code Here

        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);
    }
View Full Code Here

public class N3ParserFactory implements LineHandlerFactory {
    public LineHandler createParser(final Graph newGraph, final MapFactory mapFactory) {
        final RegexMatcherFactory matcherFactory = new RegexMatcherFactoryImpl();
        final NamespaceListener listener = new MemNamespaceListener();
        final NamespaceAwareNodeParsersFactory parsersFactory = new NamespaceAwareNodeParsersFactoryImpl(newGraph,
            mapFactory, matcherFactory, listener);
        final NodeMaps nodeMaps = new NamespaceAwareNodeMaps(parsersFactory.getUriReferenceParser(),
            parsersFactory.getBlankNodeParser(), parsersFactory.getLiteralParser());
        final RegexTripleParser parser = new RegexTripleParserImpl(matcherFactory, newGraph.getTripleFactory(),
            nodeMaps);
        final TripleParser tripleParser = new NamespaceAwareTripleParser(matcherFactory,
            parsersFactory.getBlankNodeParser(), parser);
        return new N3Parser(new CommentsParserImpl(matcherFactory),
            new PrefixParserImpl(matcherFactory, listener),
            new TriplesParserImpl(tripleParser));
    }
View Full Code Here

        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);
    }
View Full Code Here

            mapFactory, matcherFactory, listener);
        final NodeMaps nodeMaps = new NamespaceAwareNodeMaps(parsersFactory.getUriReferenceParser(),
            parsersFactory.getBlankNodeParser(), parsersFactory.getLiteralParser());
        final RegexTripleParser parser = new RegexTripleParserImpl(matcherFactory, newGraph.getTripleFactory(),
            nodeMaps);
        final TripleParser tripleParser = new NamespaceAwareTripleParser(matcherFactory,
            parsersFactory.getBlankNodeParser(), parser);
        return new N3Parser(new CommentsParserImpl(matcherFactory),
            new PrefixParserImpl(matcherFactory, listener),
            new TriplesParserImpl(tripleParser));
    }
View Full Code Here

        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);
    }
View Full Code Here

    }

    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);
View Full Code Here

        namespaceListener = newNamespaceListener;
    }

    public RDFEventReader createRDFEventReader(final InputStream stream, final URI baseURI, final Graph graph) {
        final TriplesParser triplesParser = new TriplesParserImpl(init(graph));
        final PrefixParser prefixParser = new PrefixParserImpl(REGEX_MATCHER_FACTORY, namespaceListener);
        final FormatParser parser = new N3FormatParser(triplesParser, prefixParser);
        return new RDFEventReaderImpl(stream, baseURI, parser);
    }
View Full Code Here

TOP

Related Classes of org.jrdf.parser.n3.N3EventReaderFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.