Class StringWriter
Static Helper class for the writing of RDF Graphs and SPARQL Result Sets to Strings rather than Streams/Files.
Inherited Members
Namespace: VDS.RDF.Writing
Assembly: dotNetRdf.dll
Syntax
public static class StringWriter
Methods
| Edit this page View SourceWrite(IGraph, IRdfWriter)
Writes the Graph to a String and returns the output in your chosen concrete RDF Syntax.
Declaration
public static string Write(IGraph g, IRdfWriter writer)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
IRdf |
writer | Writer to use to generate the concrete RDF Syntax. |
Returns
Type | Description |
---|---|
string |
Remarks
Since the API allows for any Text
Write(ITripleStore, IStoreWriter)
Writes the given Triple Store to a String and returns the output in your chosen concrete RDF dataset syntax.
Declaration
public static string Write(ITripleStore store, IStoreWriter writer)
Parameters
Type | Name | Description |
---|---|---|
ITriple |
store | Triple Store. |
IStore |
writer | Writer to use to generate conrete RDF Syntax. |
Returns
Type | Description |
---|---|
string |
Write(SparqlResultSet, ISparqlResultsWriter)
Writes the SPARQL Result Set to a String and returns the Output in your chosen format.
Declaration
public static string Write(SparqlResultSet results, ISparqlResultsWriter writer)
Parameters
Type | Name | Description |
---|---|---|
Sparql |
results | SPARQL Result Set. |
ISparql |
writer | Writer to use to generate the SPARQL Results output. |
Returns
Type | Description |
---|---|
string |