Search in sources :

Example 21 with SDBConnection

use of org.apache.jena.sdb.sql.SDBConnection 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)

Aggregations

SDBConnection (org.apache.jena.sdb.sql.SDBConnection)21 StoreDesc (org.apache.jena.sdb.StoreDesc)18 Store (org.apache.jena.sdb.Store)5 DatasetStore (org.apache.jena.sdb.store.DatasetStore)2 Test (org.junit.Test)2 Graph (org.apache.jena.graph.Graph)1 Triple (org.apache.jena.graph.Triple)1 Model (org.apache.jena.rdf.model.Model)1 Property (org.apache.jena.rdf.model.Property)1 Resource (org.apache.jena.rdf.model.Resource)1