Search in sources :

Example 16 with Store

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

the class sdbtuple method execLoad.

private void execLoad(String tableName) {
    cmdError("Tuple load - not implemented (yet)", true);
    Store store = getStore();
    TupleTable table = null;
    if (tableName.equalsIgnoreCase(store.getNodeTableDesc().getTableName()))
        cmdError("Can't load the node table as a tupole table");
    else
        table = new TupleTable(store, tableName);
}
Also used : Store(org.apache.jena.sdb.Store) TupleTable(org.apache.jena.sdb.store.TupleTable)

Example 17 with Store

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

Example 18 with Store

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

the class TestAssembler method model_6.

@Test
public void model_6() {
    Model assem = FileManager.get().loadModel(dir + "graph-assembler.ttl");
    Resource xNamed = assem.getResource("http://example/test#graphNamed");
    Store store = create(assem);
    // Named graph: Check they are connected to the same place in the store 
    Model model2 = (Model) Assembler.general.open(xNamed);
    Model model3 = (Model) Assembler.general.open(xNamed);
    Resource s = model2.createResource();
    Property p = model2.createProperty("http://example/p");
    // Check two models connected to the same graph 
    Literal o2 = model2.createLiteral("xyz");
    model2.add(s, p, o2);
    assertTrue(model3.contains(s, p, o2));
}
Also used : Literal(org.apache.jena.rdf.model.Literal) Model(org.apache.jena.rdf.model.Model) Resource(org.apache.jena.rdf.model.Resource) Store(org.apache.jena.sdb.Store) Property(org.apache.jena.rdf.model.Property) Test(org.junit.Test)

Aggregations

Store (org.apache.jena.sdb.Store)18 Test (org.junit.Test)8 Model (org.apache.jena.rdf.model.Model)6 Resource (org.apache.jena.rdf.model.Resource)5 SDBConnection (org.apache.jena.sdb.sql.SDBConnection)5 Property (org.apache.jena.rdf.model.Property)4 StoreDesc (org.apache.jena.sdb.StoreDesc)4 Literal (org.apache.jena.rdf.model.Literal)3 DatasetStore (org.apache.jena.sdb.store.DatasetStore)3 TupleTable (org.apache.jena.sdb.store.TupleTable)2 Connection (java.sql.Connection)1 Graph (org.apache.jena.graph.Graph)1 Triple (org.apache.jena.graph.Triple)1 Dataset (org.apache.jena.query.Dataset)1 Statement (org.apache.jena.rdf.model.Statement)1 StmtIterator (org.apache.jena.rdf.model.StmtIterator)1 DatasetGraphSDB (org.apache.jena.sdb.store.DatasetGraphSDB)1 TableDesc (org.apache.jena.sdb.store.TableDesc)1 BeforeClass (org.junit.BeforeClass)1