use of org.apache.jena.rdf.model.RDFReaderI in project jena by apache.
the class TestReaders method testGetNTripleReader.
/**
* Test to ensure that the reader is set.
*/
public void testGetNTripleReader() {
final RDFReaderI reader = model.getReader("N-TRIPLE");
Assert.assertNotNull(reader);
}
use of org.apache.jena.rdf.model.RDFReaderI in project jena by apache.
the class TestTurtleReader method test0.
public void test0() {
RDFReaderI r = ModelFactory.createDefaultModel().getReader("Turtle");
assertNotNull(r);
}
use of org.apache.jena.rdf.model.RDFReaderI in project jena by apache.
the class TestTurtle method runTest.
@Override
public void runTest() {
Model model = ModelFactory.createDefaultModel();
RDFReaderI t = new TurtleReader();
try {
if (baseIRI != null)
t.read(model, FileManager.getInternal().open(input), baseIRI);
else
t.read(model, input);
// "http://www.w3.org/2001/sw/DataAccess/df1/tests/rdfq-results.ttl"
String syntax = FileUtils.guessLang(output, FileUtils.langNTriple);
@SuppressWarnings("deprecation") Model results = FileManager.getInternal().loadModel(output, syntax);
boolean b = model.isIsomorphicWith(results);
if (!b)
assertTrue("Models not isomorphic", b);
} catch (TurtleParseException ex) {
throw ex;
}
}
Aggregations