Package org.openrdf.rio.helpers

Examples of org.openrdf.rio.helpers.StatementCollector


    @BeforeClass
    public void init() throws SAXException {
        model = new LinkedHashModel();
       
        streamProcessor = new StreamProcessor(RdfaParser.connect(SesameSink.connect(new StatementCollector(model))));
        streamProcessor.setProperty(RdfaParser.ENABLE_VOCAB_EXPANSION, true);
    }
View Full Code Here


    @BeforeClass
    public void init() {
        nTriplesParserTest = new NTriplesParserTest();
        nTriplesParserTest.init();
        model = new LinkedHashModel();
        sp = new StreamProcessor(NTriplesParser.connect(SesameSink.connect(new StatementCollector(model))));
    }
View Full Code Here

        final Graph graph = new LinkedHashModel();
        final ParseErrorCollector parseErrorListener = new ParseErrorCollector();
        final ParserConfig parserConfig = new ParserConfig();
        final SesameTripleCallback callback = new SesameTripleCallback(
                new StatementCollector(graph), ValueFactoryImpl.getInstance(), parserConfig,
                parseErrorListener);

        JsonLdProcessor.toRDF(input, callback);

        final Iterator<Statement> statements = graph.iterator();
View Full Code Here

        config.set(BasicParserSettings.FAIL_ON_UNKNOWN_DATATYPES, true);
        config.set(BasicParserSettings.FAIL_ON_UNKNOWN_LANGUAGES, true);
        rdfParser.setParserConfig(config);
        rdfParser.setValueFactory(vf);
        final Model model = new LinkedHashModel();
        rdfParser.setRDFHandler(new StatementCollector(model));

        rdfParser.parse(in, "foo:bar");

        assertEquals("Unexpected number of statements", 6, model.size());
        final Model bnodeModel = model.filter(null, uri1,
View Full Code Here

    private ParserConfig parserConfig;

    private final ParseErrorListener parseErrorListener;

    public SesameTripleCallback() {
        this(new StatementCollector(new LinkedHashModel()));
    }
View Full Code Here

TOP

Related Classes of org.openrdf.rio.helpers.StatementCollector

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.