Show / Hide Table of Contents

Class TurtleWriter

Class for generating RDF in Turtle Syntax.
Inheritance
System.Object
BaseRdfWriter
TurtleWriter
Implements
IRdfWriter
IPrettyPrintingWriter
IHighSpeedWriter
IFormatterBasedWriter
Inherited Members
BaseRdfWriter.Save(IGraph, TextWriter)
BaseRdfWriter.Save(IGraph, TextWriter, Boolean)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Writing
Assembly: dotNetRDF.dll
Syntax
[Obsolete("Deprecated in favour of the CompressingTurtleWriter which uses a much fuller range of syntax compressions", false)]
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

| Improve this Doc View Source

TurtleWriter()

Creates a new Turtle Writer.
Declaration
public TurtleWriter()
| Improve this Doc View Source

TurtleWriter(TurtleSyntax)

Creates a new Turtle Writer.
Declaration
public TurtleWriter(TurtleSyntax syntax)
Parameters
Type Name Description
TurtleSyntax syntax Turtle Syntax.

Properties

| Improve this Doc View Source

HighSpeedModePermitted

Gets/Sets whether the Writer is allowed to use High Speed write mode.
Declaration
public bool HighSpeedModePermitted { get; set; }
Property Value
Type Description
System.Boolean
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.
| Improve this Doc View Source

PrettyPrintMode

Gets/Sets whether Pretty Printing is used.
Declaration
public bool PrettyPrintMode { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

TripleFormatterType

Gets the type of the Triple Formatter used by this writer.
Declaration
public Type TripleFormatterType { get; }
Property Value
Type Description
System.Type

Methods

| Improve this Doc View Source

Save(IGraph, String)

Saves a Graph to a File.
Declaration
public override void Save(IGraph g, string filename)
Parameters
Type Name Description
IGraph g Graph to save.
System.String filename Filename to save to.
Overrides
BaseRdfWriter.Save(IGraph, String)
| Improve this Doc View Source

SaveInternal(IGraph, TextWriter)

Saves a Graph using an arbitrary System.IO.TextWriter.
Declaration
protected override void SaveInternal(IGraph g, TextWriter output)
Parameters
Type Name Description
IGraph g Graph to save.
System.IO.TextWriter output Writer to save using.
Overrides
BaseRdfWriter.SaveInternal(IGraph, TextWriter)
| Improve this Doc View Source

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
System.String
Overrides
System.Object.ToString()

Events

| Improve this Doc View Source

Warning

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
Overrides
BaseRdfWriter.Warning

Implements

IRdfWriter
IPrettyPrintingWriter
IHighSpeedWriter
IFormatterBasedWriter

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • TurtleWriter()
    • TurtleWriter(TurtleSyntax)
  • Properties
    • HighSpeedModePermitted
    • PrettyPrintMode
    • TripleFormatterType
  • Methods
    • Save(IGraph, String)
    • SaveInternal(IGraph, TextWriter)
    • ToString()
  • Events
    • Warning
  • Implements
  • Extension Methods
Back to top Generated by DocFX