Search in sources :

Example 16 with SDBConnection

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

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

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

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

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

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