use of org.apache.jena.riot.ReaderRIOT in project jena by apache.
the class TestTriXReader method trix_direct.
@Test
public void trix_direct() {
ReaderRIOT r = new ReaderTriX(RiotLib.dftProfile(), ErrorHandlerFactory.errorHandlerNoWarnings);
InputStream in = IO.openFile(fInput);
DatasetGraph dsg = DatasetGraphFactory.create();
//StreamRDF stream = StreamRDFLib.writer(System.out) ;
StreamRDF stream = StreamRDFLib.dataset(dsg);
stream.start();
r.read(in, null, null, stream, null);
stream.finish();
if (fExpected != null) {
DatasetGraph dsg2 = RDFDataMgr.loadDatasetGraph(fExpected);
boolean b = IsoMatcher.isomorphic(dsg, dsg2);
if (!b) {
Assert.fail("Not isomorphic");
}
}
}
Aggregations