Search in sources :

Example 1 with SailRepositoryFactory

use of org.openrdf.repository.sail.config.SailRepositoryFactory in project incubator-rya by apache.

the class RyaAccumuloSailFactoryTest method testAddStatement.

@Ignore
@Test
public void testAddStatement() throws Exception {
    SailRepositoryFactory f = new SailRepositoryFactory();
    Repository r = f.getRepository(getConfig());
    r.initialize();
    RepositoryConnection rc = r.getConnection();
    ValueFactory vf = rc.getValueFactory();
    Statement s = vf.createStatement(vf.createURI("u:a"), vf.createURI("u:b"), vf.createURI("u:c"));
    assertFalse(rc.hasStatement(s, false));
    rc.add(s);
    Assert.assertTrue(rc.hasStatement(s, false));
    rc.close();
}
Also used : RepositoryConnection(org.openrdf.repository.RepositoryConnection) Repository(org.openrdf.repository.Repository) Statement(org.openrdf.model.Statement) ValueFactory(org.openrdf.model.ValueFactory) SailRepositoryFactory(org.openrdf.repository.sail.config.SailRepositoryFactory) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 2 with SailRepositoryFactory

use of org.openrdf.repository.sail.config.SailRepositoryFactory in project incubator-rya by apache.

the class RyaAccumuloSailFactoryTest method testCreateAccumuloSail.

@Ignore
@Test
public void testCreateAccumuloSail() throws Exception {
    SailRepositoryFactory f = new SailRepositoryFactory();
    Repository r = f.getRepository(getConfig());
    r.initialize();
    RepositoryConnection rc = r.getConnection();
    rc.close();
}
Also used : RepositoryConnection(org.openrdf.repository.RepositoryConnection) Repository(org.openrdf.repository.Repository) SailRepositoryFactory(org.openrdf.repository.sail.config.SailRepositoryFactory) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Ignore (org.junit.Ignore)2 Test (org.junit.Test)2 Repository (org.openrdf.repository.Repository)2 RepositoryConnection (org.openrdf.repository.RepositoryConnection)2 SailRepositoryFactory (org.openrdf.repository.sail.config.SailRepositoryFactory)2 Statement (org.openrdf.model.Statement)1 ValueFactory (org.openrdf.model.ValueFactory)1