Search in sources :

Example 1 with TcProvider

use of org.apache.clerezza.rdf.core.access.TcProvider in project stanbol by apache.

the class TestClerezzaInputSources method fromInputStreamInSimpleTcProvider.

/*
     * An ontology input source created using a custom TC Provider should create a non-null Origin (i.e. the
     * name of the generated graph) and increase the triple collection count by 1.
     */
@Test
public void fromInputStreamInSimpleTcProvider() throws Exception {
    InputStream in = getClass().getResourceAsStream(dummy_RdfXml);
    TcProvider tcp = new SimpleTcProvider();
    assertSame(0, tcp.listGraphs().size());
    int before = tcp.listGraphs().size();
    src = new GraphContentInputSource(in, tcp);
    checkOntology(true);
    assertSame(before + 1, tcp.listGraphs().size());
}
Also used : InputStream(java.io.InputStream) SimpleTcProvider(org.apache.clerezza.rdf.simple.storage.SimpleTcProvider) SimpleTcProvider(org.apache.clerezza.rdf.simple.storage.SimpleTcProvider) TcProvider(org.apache.clerezza.rdf.core.access.TcProvider) Test(org.junit.Test)

Aggregations

InputStream (java.io.InputStream)1 TcProvider (org.apache.clerezza.rdf.core.access.TcProvider)1 SimpleTcProvider (org.apache.clerezza.rdf.simple.storage.SimpleTcProvider)1 Test (org.junit.Test)1