Search in sources :

Example 21 with StoreDesc

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

the class StoreCreator method getIndexMySQL.

public static Store getIndexMySQL() {
    if (sdbmsi == null) {
        JDBC.loadDriverMySQL();
        SDBConnection sdb = SDBFactory.createConnection(// "sdb_test", "jena", "swara"
        "jdbc:mysql://localhost/test2-index", "user", "password");
        StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.MySQL);
        sdbmsi = new StoreTriplesNodesIndexMySQL(sdb, desc);
        sdbmsi.getTableFormatter().create();
    } else
        sdbmsi.getTableFormatter().truncate();
    return sdbmsi;
}
Also used : StoreDesc(org.apache.jena.sdb.StoreDesc) SDBConnection(org.apache.jena.sdb.sql.SDBConnection)

Example 22 with StoreDesc

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

the class StoreCreator method getHashMySQL.

public static Store getHashMySQL() {
    if (sdbmsh == null) {
        JDBC.loadDriverMySQL();
        SDBConnection sdb = SDBFactory.createConnection("jdbc:mysql://localhost/test2-hash", "user", "password");
        StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.MySQL);
        sdbmsh = new StoreTriplesNodesHashMySQL(sdb, desc);
        sdbmsh.getTableFormatter().create();
    } else
        sdbmsh.getTableFormatter().truncate();
    return sdbmsh;
}
Also used : StoreDesc(org.apache.jena.sdb.StoreDesc) SDBConnection(org.apache.jena.sdb.sql.SDBConnection)

Example 23 with StoreDesc

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

the class StoreCreator method getHashHSQL.

public static Store getHashHSQL() {
    if (sdbhsh == null) {
        JDBC.loadDriverHSQL();
        SDBConnection sdb = SDBFactory.createConnection("jdbc:hsqldb:mem:bname", "sa", "");
        StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.HSQLDB);
        sdbhsh = new StoreTriplesNodesHashHSQL(sdb, desc);
        sdbhsh.getTableFormatter().create();
    } else
        sdbhsh.getTableFormatter().truncate();
    return sdbhsh;
}
Also used : StoreDesc(org.apache.jena.sdb.StoreDesc) SDBConnection(org.apache.jena.sdb.sql.SDBConnection)

Example 24 with StoreDesc

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

the class StoreCreator method getIndexSAP.

public static Store getIndexSAP() {
    if (sdbsapi == null) {
        JDBC.loadDriverSAP();
        SDBConnection sdb = SDBFactory.createConnection("jdbc:sap://localhost/test2-index", "user", "password");
        StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesIndex, DatabaseType.SAP);
        sdbsapi = new StoreTriplesNodesIndexSAP(sdb, desc);
        sdbsapi.getTableFormatter().create();
    } else
        sdbsapi.getTableFormatter().truncate();
    return sdbsapi;
}
Also used : StoreDesc(org.apache.jena.sdb.StoreDesc) SDBConnection(org.apache.jena.sdb.sql.SDBConnection)

Example 25 with StoreDesc

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

the class StoreCreator method getHashPgSQL.

public static Store getHashPgSQL() {
    if (sdbpgh == null) {
        JDBC.loadDriverPGSQL();
        SDBConnection sdb = SDBFactory.createConnection("jdbc:postgresql://localhost/test2-hash", "user", "password");
        StoreDesc desc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.PostgreSQL);
        sdbpgh = new StoreTriplesNodesHashPGSQL(sdb, desc);
        sdbpgh.getTableFormatter().create();
    } else
        sdbpgh.getTableFormatter().truncate();
    return sdbpgh;
}
Also used : StoreDesc(org.apache.jena.sdb.StoreDesc) SDBConnection(org.apache.jena.sdb.sql.SDBConnection)

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