use of org.apache.jena.riot.lang.StreamRDFCounting in project jena by apache.
the class TestStreamRDF method stream_count_01.
@Test
public void stream_count_01() {
StreamRDFCounting stream = StreamRDFLib.count();
stream.start();
assertEquals(0, stream.count());
stream.triple(triple1);
assertEquals(1, stream.count());
stream.triple(triple1);
assertEquals(2, stream.count());
stream.finish();
assertEquals(2, stream.count());
assertEquals(2, stream.countTriples());
assertEquals(0, stream.countQuads());
}
use of org.apache.jena.riot.lang.StreamRDFCounting in project jena by apache.
the class TestStreamRDF method stream_count_02.
@Test
public void stream_count_02() {
StreamRDFCounting stream = StreamRDFLib.count();
stream.start();
stream.triple(triple1);
stream.quad(quad1);
assertEquals(2, stream.count());
assertEquals(1, stream.countTriples());
assertEquals(1, stream.countQuads());
stream.finish();
}
Aggregations