public void AddNamedGraphToCurrentNodes(string namedGraphUri) { //as we're using named graphs now, we must use TRIG format if (this._outputFormat != ERdfFormat.TriG && this._outputFormat != ERdfFormat.NQuads) { this._outputFormat = ERdfFormat.TriG; Console.WriteLine("Format set to TriG as namedgraph has been asserted."); } //Load the nodes into a graph, and name it var g = GetXmlDocumentAsGraph(); g.BaseUri = new Uri(namedGraphUri); //add to triple store if (_store == null) { _store = new TripleStore(); } _store.Add(g, true); //empty the current XmlDocument and restart InitialiseRdfOutput(_namespaces); }
public RdfOutput(string outputPath, Dictionary <string, string> namespaces, ERdfFormat outputFormat) { _outputPath = outputPath; InitialiseRdfOutput(namespaces); _outputFormat = outputFormat; }
public RdfOutput(string outputPath, Dictionary<string, string> namespaces,ERdfFormat outputFormat) { _outputPath = outputPath; InitialiseRdfOutput(namespaces); _outputFormat = outputFormat; }
public void AddNamedGraphToCurrentNodes(string namedGraphUri) { //as we're using named graphs now, we must use TRIG format if (this._outputFormat != ERdfFormat.TriG && this._outputFormat != ERdfFormat.NQuads) { this._outputFormat = ERdfFormat.TriG; Console.WriteLine("Format set to TriG as namedgraph has been asserted."); } //Load the nodes into a graph, and name it var g = GetXmlDocumentAsGraph(); g.BaseUri = new Uri(namedGraphUri); //add to triple store if (_store == null) _store = new TripleStore(); _store.Add(g, true); //empty the current XmlDocument and restart InitialiseRdfOutput(_namespaces); }