This project has moved. For the latest updates, please go here.

Open existing RDF store

Oct 13, 2015 at 5:51 PM
This works if the store doesn't exist...

var client = BrightstarService.GetClient( "Type=embedded;StoresDirectory=c:\Brightstar\Bob");
        string storeName = "Store";
        client.CreateStore(storeName);
But fails if the store does exist...

There doesn't appear to be a client.OpenStore method...

What did I miss....
Coordinator
Oct 14, 2015 at 11:24 AM
There isn't an explicit OpenStore method. Instead you just pass the name of the store in as the first parameter to most of the client operations:
client.ExecuteTransaction(storeName, transactionData);
var sparqlResult = client.ExecuteQuery(storeName, sparqlQuery);
When using the embedded store, BrightstarDB will automatically open the store and start a background thread for processing writes. To exit cleanly you should ensure you call BrightstardService.Shutdown() when the application exits - this will just signal the background threads to terminate and block until they do (and if you aren't using the embedded store, it is basically a no-op).

There is more on the APIs here: http://brightstardb.readthedocs.org/en/latest/RDF_Client_API

Hope this helps!

Kal