Class SparqlRdfWriter
Class for saving SPARQL Result Sets in the RDF serialization in the RDF format of your choice (default Turtle).
Implements
Inherited Members
Namespace: VDS.RDF.Writing
Assembly: dotNetRdf.dll
Syntax
public class SparqlRdfWriter : ISparqlResultsWriter
Constructors
| Edit this page View SourceSparqlRdfWriter()
Creates a new SPARQL RDF Writer which will save Result Sets in the RDF serialization using Turtle syntax.
Declaration
public SparqlRdfWriter()
SparqlRdfWriter(IRdfWriter)
Creates a new SPARQL RDF Writer which will save Result Sets in the RDF serialization in your chosen RDF Syntax.
Declaration
public SparqlRdfWriter(IRdfWriter writer)
Parameters
Type | Name | Description |
---|---|---|
IRdfWriter | writer | RDF Writer to use. |
Methods
| Edit this page View SourceGenerateOutput(SparqlResultSet)
Method which generates the RDF Graph of a SPARQL Result Set.
Declaration
public IGraph GenerateOutput(SparqlResultSet results)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | Result Set. |
Returns
Type | Description |
---|---|
IGraph |
Save(SparqlResultSet, TextWriter)
Saves the SPARQL Result Set to the given Stream.
Declaration
public void Save(SparqlResultSet results, TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | Result Set to save. |
TextWriter | output | Stream to save to. |
Save(SparqlResultSet, string)
Saves the SPARQL Result Set to the given File.
Declaration
public void Save(SparqlResultSet results, string filename)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | Result Set to save. |
string | filename | File to save to. |
Save(SparqlResultSet, string, Encoding)
Saves the SPARQL Result Set to the given File.
Declaration
public void Save(SparqlResultSet results, string filename, Encoding fileEncoding)
Parameters
Type | Name | Description |
---|---|---|
SparqlResultSet | results | Result Set to save. |
string | filename | File to save to. |
Encoding | fileEncoding | The text encoding to use for the output file. |
ToString()
Gets the String representation of the writer which is a description of the syntax it produces.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Events
| Edit this page View SourceWarning
Event raised when a non-fatal issue with the SPARQL Results being written is detected
Declaration
public event SparqlWarning Warning
Event Type
Type | Description |
---|---|
SparqlWarning |