dotnetrdf
ドキュメントに従って、データをVirtuoso Serverに保存しようとしました。
これが私がすることです:
public void LoadGraph()
{
//Create our Storage Provider - this example uses Virtuoso Universal Server
VirtuosoManager virtuoso = new VirtuosoManager("creativeartefact.org", 1111, "DB", "user", "password");
//Load the Graph into an ordinary graph instance first
Graph g = new Graph();
virtuoso.LoadGraph(g, new Uri("http://creativeartefact.org/"));
//Then place the Graph into a wrapper
StoreGraphPersistenceWrapper wrapper = new StoreGraphPersistenceWrapper(virtuoso, g);
//Now make changes to this Graph as desired...
g.Assert(g.CreateUriNode(new Uri("http://creativeartefact.org/testB/123")), g.CreateUriNode("rdf:Type"), g.CreateUriNode(new Uri("http://creativeartefact.org/ontology/Artist")));
wrapper.Flush(); // mandatory, but doesn't help either
//Remember to call Dispose() to ensure changes get persisted when you are done
wrapper.Dispose();
}
ただし、データは保存されず、例外もスローされません。トリプルを挿入した後、予想どおりトリプル カウントが 1 増えますが、データベースには反映されません。コードを再実行すると、トリプル カウントは古い値に戻ります。ユーザー アカウントにはwrite
アクセス許可があります。
私が見逃しているものはありますか?
前もってありがとう、
フランク