Package org.semarglproject.source

Examples of org.semarglproject.source.StreamProcessor


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


    @BeforeClass
    public void init() {
        rdfXmlParserTest = new RdfXmlParserTest();
        rdfXmlParserTest.init();
        model = ModelFactory.createDefaultModel();
        streamProcessor = new StreamProcessor(RdfXmlParser.connect(JenaSink.connect(model)));
    }
View Full Code Here

     * <p>
     * Supported settings can be found using {@link #getSupportedSettings()} and can be modified using
     * the {@link ParserConfig} object returned from the {@link #getParserConfig()} method.
     */
    public SesameRDFaParser() {
        streamProcessor = new StreamProcessor(RdfaParser.connect(SesameSink.connect(null)));
        streamProcessor.setProperty(StreamProcessor.PROCESSOR_GRAPH_HANDLER_PROPERTY, this);
        setParserConfig(new ParserConfig());
        // by default this would be set to false if not set here
        setPreserveBNodeIDs(true);
        parseErrorListener = null;
View Full Code Here

        TcManager tcManager = TcManager.getInstance();
        if (tcManager.listMGraphs().contains(graphUri)) {
            tcManager.deleteTripleCollection(graphUri);
        }
        graph = tcManager.createMGraph(graphUri);
        sp = new StreamProcessor(NTriplesParser.connect(ClerezzaSink.connect(graph)));
    }
View Full Code Here

        if (MANAGER.listMGraphs().contains(graphUri)) {
            MANAGER.deleteTripleCollection(graphUri);
        }
        graph = MANAGER.createMGraph(graphUri);

        streamProcessor = new StreamProcessor(RdfaParser.connect(ClerezzaSink.connect(graph)));
        streamProcessor.setProperty(RdfaParser.ENABLE_VOCAB_EXPANSION, true);
    }
View Full Code Here

        if (MANAGER.listMGraphs().contains(graphUri)) {
            MANAGER.deleteTripleCollection(graphUri);
        }
        graph = MANAGER.createMGraph(graphUri);

        streamProcessor = new StreamProcessor(RdfXmlParser.connect(ClerezzaSink.connect(graph)));
    }
View Full Code Here

    @BeforeClass
    public void init() throws SAXException, InterruptedException {
//        TestSuiteDownloadHelper.downloadAll(4);

        charOutputSink = new CharOutputSink("UTF-8");
        streamProcessor = new StreamProcessor(RdfaParser.connect(TurtleSerializer.connect(charOutputSink)));
    }
View Full Code Here

        if (expansions == null) {
            expansions = new HashMap<String, Collection<String>>();
            terms = new HashSet<String>();
        }

        StreamProcessor rdfaSp = new StreamProcessor(RdfaParser.connect(vocabParser));
        rdfaSp.setProperty(RdfaParser.ENABLE_VOCAB_EXPANSION, false);
        parseVocabWithDp(vocabUrl, rdfaSp);

        if (!terms.isEmpty() || !expansions.isEmpty()) {
            return;
        }

        // TODO: add format detection
        StreamProcessor rdfXmlSp = new StreamProcessor(RdfXmlParser.connect(vocabParser));
        rdfaSp.setProperty(RdfaParser.ENABLE_VOCAB_EXPANSION, false);
        parseVocabWithDp(vocabUrl, rdfXmlSp);

        if (terms.isEmpty() && expansions.isEmpty()) {
            terms = null;
View Full Code Here

    @BeforeClass
    public void init() {
        sth = new SesameTestHelper(TEST_OUTPUT_DIR, LOCAL_MIRRORS);
        charOutputSink = new CharOutputSink("UTF-8");
        streamProcessorTtl = new StreamProcessor(RdfXmlParser.connect(TurtleSerializer.connect(charOutputSink)));
        streamProcessorNt = new StreamProcessor(RdfXmlParser.connect(NTriplesSerializer.connect(charOutputSink)));
        streamProcessorNq = new StreamProcessor(RdfXmlParser.connect(NQuadsSerializer.connect(charOutputSink)));
    }
View Full Code Here

    @BeforeClass
    public void init() {
        sth = new SesameTestHelper(TEST_OUTPUT_DIR, LOCAL_MIRRORS);
        charOutputSink = new CharOutputSink("UTF-8");
        streamProcessorTtl = new StreamProcessor(NTriplesParser.connect(TurtleSerializer.connect(charOutputSink)));
        streamProcessorNt = new StreamProcessor(NTriplesParser.connect(NTriplesSerializer.connect(charOutputSink)));
        streamProcessorNq = new StreamProcessor(NTriplesParser.connect(NQuadsSerializer.connect(charOutputSink)));
    }
View Full Code Here

TOP

Related Classes of org.semarglproject.source.StreamProcessor

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.