use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class SDBTestUtils method createInMemoryStore.
/** Create an HSQLDB-backed in-memory store for testing. */
public static Store createInMemoryStore() {
SDBConnection conn = SDBFactory.createConnection("jdbc:hsqldb:mem:test", "sa", "");
StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.HSQLDB);
Store store = SDBFactory.connectStore(conn, desc);
store.getTableFormatter().create();
store.getTableFormatter().truncate();
return store;
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class TestAssembler method pool_1.
@Test
public void pool_1() {
// Connection
Connection conn = SDBFactory.createSqlConnection(dir + "connection.ttl");
// Store
StoreDesc desc = StoreDesc.read(dir + "dataset2.ttl");
Store store = SDBFactory.connectStore(conn, desc);
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class StoreCreator method getHashSQLServer.
public static Store getHashSQLServer() {
if (sdbssh == null) {
JDBC.loadDriverSQLServer();
SDBConnection sdb = SDBFactory.createConnection(MSSQL_url + "test2-hash", MSSQL_user, MSSQL_password);
StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.SQLServer);
sdbssh = new StoreTriplesNodesHashSQLServer(sdb, desc);
sdbssh.getTableFormatter().create();
} else
sdbssh.getTableFormatter().truncate();
return sdbssh;
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class StoreCreator method getHashOracle.
public static Store getHashOracle() {
if (sdboh == null) {
JDBC.loadDriverOracle();
// "jena", "swara"
String url = JDBC.makeURL("oracle:thin", "localhost:1521", "XE");
SDBConnection sdb = new SDBConnection(url, "test2-hash", "test2-hash");
StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.Oracle);
sdboh = new StoreTriplesNodesHashOracle(sdb, desc);
sdboh.getTableFormatter().create();
} else
sdboh.getTableFormatter().truncate();
return sdboh;
}
use of org.apache.jena.sdb.StoreDesc in project jena by apache.
the class StoreCreator method getIndexDerby.
public static Store getIndexDerby() {
if (sdbdi == null) {
JDBC.loadDriverDerby();
String url = JDBC.makeURL("derby", "localhost", "DB/test2-index");
SDBConnection sdb = new SDBConnection(url, null, null);
StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.Derby);
sdbdi = new StoreTriplesNodesIndexDerby(sdb, desc);
sdbdi.getTableFormatter().create();
} else
sdbdi.getTableFormatter().truncate();
return sdbdi;
}
Aggregations