use of org.apache.jena.rdf.model.RDFReaderF in project jena by apache.
the class TestIO_JenaReaders method wireIntoJena.
@Test
public void wireIntoJena() {
IO_Jena.wireIntoJena();
RDFReaderF readerF = new RDFReaderFImpl();
assertEquals(RDFReaderRIOT.class, readerF.getReader().getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("RDF/XML").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("RDF/XML-ABBREV").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("N-TRIPLES").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("N-Triples").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("N-TRIPLE").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("N3").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("TURTLE").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("Turtle").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("TTL").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("JSON-LD").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("JSONLD").getClass());
assertEquals(RDFReaderRIOT.class, readerF.getReader("RDF/JSON").getClass());
}
use of org.apache.jena.rdf.model.RDFReaderF in project jena by apache.
the class TestIO_JenaReaders method resetJena.
@Test
public void resetJena() {
IO_Jena.wireIntoJena();
IO_Jena.resetJena();
RDFReaderF readerF = new RDFReaderFImpl();
assertNotEquals(RDFReaderRIOT.class, readerF.getReader().getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("RDF/XML").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("RDF/XML-ABBREV").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("N-TRIPLES").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("N-Triples").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("N-TRIPLE").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("N3").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("TURTLE").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("Turtle").getClass());
assertNotEquals(RDFReaderRIOT.class, readerF.getReader("TTL").getClass());
try {
readerF.getReader("NT");
fail("Exception expected");
} catch (NoReaderForLangException e) {
}
try {
readerF.getReader("JSON_LD");
fail("Exception expected");
} catch (NoReaderForLangException e) {
}
try {
readerF.getReader("RDF/JSON");
fail("Exception expected");
} catch (NoReaderForLangException e) {
}
IO_Jena.wireIntoJena();
}
Aggregations