Class TurtleWriter
Class for generating RDF in Turtle Syntax.
Inherited Members
Namespace: VDS.RDF.Writing
Assembly: dotNetRdf.dll
Syntax
[Obsolete("Deprecated in favour of the CompressingTurtleWriter which uses a much fuller range of syntax compressions", true)]
public class TurtleWriter : BaseRdfWriter, IRdfWriter, IPrettyPrintingWriter, IHighSpeedWriter, IFormatterBasedWriter
Remarks
Similar in speed to the CompressingTurtleWriter but doesn't use the full Blank Node and Collection syntax compressions.
Constructors
| Edit this page View SourceTurtleWriter()
Creates a new Turtle Writer.
Declaration
public TurtleWriter()
TurtleWriter(TurtleSyntax)
Creates a new Turtle Writer.
Declaration
public TurtleWriter(TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
TurtleSyntax | syntax | Turtle Syntax. |
Properties
| Edit this page View SourceHighSpeedModePermitted
Gets/Sets whether the Writer is allowed to use High Speed write mode.
Declaration
public bool HighSpeedModePermitted { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
High Speed Write Mode is engaged when the Writer determines that the contents of the Graph are not well suited to Turtle syntax compressions. Usually the writer compresses triples into groups by Subject using Predicate-Object lists to output the Triples relating to each Subject. If the number of distinct Subjects is greater than 75% of the Triples in the Graph then High Speed write mode will be used, in High Speed mode all Triples are written fully and no grouping of any sort is done.
PrettyPrintMode
Gets/Sets whether Pretty Printing is used.
Declaration
public bool PrettyPrintMode { get; set; }
Property Value
Type | Description |
---|---|
bool |
TripleFormatterType
Gets the type of the Triple Formatter used by this writer.
Declaration
public Type TripleFormatterType { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
| Edit this page View SourceSaveInternal(IGraph, TextWriter)
Saves a Graph using an arbitrary TextWriter.
Declaration
protected override void SaveInternal(IGraph g, TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
TextWriter | output | Writer to save using. |
Overrides
| Edit this page View SourceToString()
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 which is raised when a non-fatal issue with the Graph being serialized is encountered
Declaration
public override event RdfWriterWarning Warning
Event Type
Type | Description |
---|---|
RdfWriterWarning |