Search in sources :

Example 26 with StoreDesc

use of org.apache.jena.sdb.StoreDesc in project jena by apache.

the class StoreCreator method getHashDB2.

public static Store getHashDB2() {
    if (sdbdb2h == null) {
        JDBC.loadDriverDB2();
        String url = JDBC.makeURL("db2", "sweb-sdb-4:50000", "TEST2H");
        SDBConnection sdb = new SDBConnection(url, "user", "password");
        StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.DB2);
        sdbdb2h = new StoreTriplesNodesHashDB2(sdb, desc);
        sdbdb2h.getTableFormatter().create();
    } else
        sdbdb2h.getTableFormatter().truncate();
    return sdbdb2h;
}
Also used : StoreDesc(org.apache.jena.sdb.StoreDesc) SDBConnection(org.apache.jena.sdb.sql.SDBConnection)

Example 27 with StoreDesc

use of org.apache.jena.sdb.StoreDesc in project jena by apache.

the class TestPrefixMappingSDB method setUpClass.

@BeforeClass
public static void setUpClass() {
    JDBC.loadDriverHSQL();
    //SDB.init() ;
    sdb = SDBFactory.createConnection(hsql, "sa", "");
    StoreDesc desc = new StoreDesc("Layout2", "HSQLDB", null);
    Store store = SDBFactory.connectStore(sdb, desc);
    store.getTableFormatter().format();
// Make a store and format it.
}
Also used : StoreDesc(org.apache.jena.sdb.StoreDesc) Store(org.apache.jena.sdb.Store) BeforeClass(org.junit.BeforeClass)

Aggregations

StoreDesc (org.apache.jena.sdb.StoreDesc)27 SDBConnection (org.apache.jena.sdb.sql.SDBConnection)19 Store (org.apache.jena.sdb.Store)4 Resource (org.apache.jena.rdf.model.Resource)3 Connection (java.sql.Connection)2 CmdException (jena.cmd.CmdException)1 TestSuite (junit.framework.TestSuite)1 Graph (org.apache.jena.graph.Graph)1 Dataset (org.apache.jena.query.Dataset)1 SDBException (org.apache.jena.sdb.SDBException)1 SDBConnectionDesc (org.apache.jena.sdb.sql.SDBConnectionDesc)1 DatasetStore (org.apache.jena.sdb.store.DatasetStore)1 Feature (org.apache.jena.sdb.store.Feature)1 FeatureSet (org.apache.jena.sdb.store.FeatureSet)1 BeforeClass (org.junit.BeforeClass)1 Test (org.junit.Test)1