This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assuming we already have a StardogConnector in the variable stardog | |
IGraph g = new Graph(); | |
// The graph gets populated with data somehow... | |
// Set the name for the graph | |
g.BaseUri = new Uri("http://example.org/name"); | |
// Save to Stardog | |
stardog.SaveGraph(g); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StardogConnector stardog = new StardogConnector("http://localhost:5820", "db", StardogReasoningMode.QL, | |
"admin", "admin"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StardogConnector stardog = new StardogConnector("http://localhost:5820", "db", "admin", "admin"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Servers are IDisposable so either wrap usage in a using block or remember to call Dispose() when done | |
// Connect to the server | |
using (StardogServer stardogServer = new StardogServer("http://localhost:5820", "admin", "admin")) | |
{ | |
// Create a template for configuring our desired options | |
BaseStardogTemplate template = new StardogDiskTemplate("id"); | |
template.IcvEnabled = true; | |
template.IcvReasoningMode = StardogReasoningMode.QL; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Servers are IDisposable so either wrap usage in a using block or remember to call Dispose() when done | |
// Connect to the server | |
using (StardogServer stardogServer = new StardogServer("http://localhost:5820", "admin", "admin")) | |
{ | |
// Create a template for configuring our desired options | |
BaseStardogTemplate template = new StardogDiskTemplate("id"); | |
template.FullTextSearch = true; | |
template.DurableTransactions = true; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Servers are IDisposable so either wrap usage in a using block or remember to call Dispose() when done | |
// Connect to the server | |
using (StardogServer stardogServer = new StardogServer("http://localhost:5820", "admin", "admin")) | |
{ | |
// Get a default template for creating a DB with the given ID | |
IStoreTemplate template = stardogServer.GetDefaultTemplate("id"); | |
// A true return indicates the DB was successfully created | |
if (stardogServer.CreateStore(template)) |
NewerOlder