Class CompressingTurtleWriter
Class for generating Turtle Concrete RDF Syntax which provides varying levels of Syntax Compression.
Implements
Inherited Members
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
public class CompressingTurtleWriter : BaseRdfWriter, IRdfWriter, IPrettyPrintingWriter, IHighSpeedWriter, ICompressingWriter, INamespaceWriter, IFormatterBasedWriter
Remarks
Similar in speed to the standard TurtleWriter but capable of using more syntax compressions depending on the Compression level set.
Constructors
| Improve this Doc View SourceCompressingTurtleWriter()
Creates a new Compressing Turtle Writer which uses the Default Compression Level.
Declaration
public CompressingTurtleWriter()
CompressingTurtleWriter(Int32)
Creates a new Compressing Turtle Writer which uses the given Compression Level.
Declaration
public CompressingTurtleWriter(int compressionLevel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | compressionLevel | Desired Compression Level. |
Remarks
See Remarks for this classes CompressionLevel property to see what effect different compression levels have.
|
Improve this Doc
View Source
CompressingTurtleWriter(Int32, TurtleSyntax)
Creates a new Compressing Turtle Writer which uses the given Compression Level and Syntax Level.
Declaration
public CompressingTurtleWriter(int compressionLevel, TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | compressionLevel | Desired Compression Level. |
TurtleSyntax | syntax | Syntax Level. |
Remarks
See Remarks for this classes CompressionLevel property to see what effect different compression levels have.
|
Improve this Doc
View Source
CompressingTurtleWriter(TurtleSyntax)
Creates a new compressing Turtle writer using the given syntax level.
Declaration
public CompressingTurtleWriter(TurtleSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
TurtleSyntax | syntax | Syntax Level. |
Properties
| Improve this Doc View SourceCompressionLevel
Gets/Sets the Compression Level to be used.
Declaration
public int CompressionLevel { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
If the Compression Level is set to None then High Speed mode will always be used regardless of the input Graph and the HighSpeedModePermitted property.
If the Compression Level is set to Minimal or above then full Predicate Object lists will be used for Triples.
If the Compression Level is set to More or above then Blank Node Collections and Collection syntax will be used if the Graph contains Triples that can be compressed in that way.
DefaultNamespaces
Gets/Sets the Default Namespaces that are always available.
Declaration
public INamespaceMapper DefaultNamespaces { get; set; }
Property Value
Type | Description |
---|---|
INamespaceMapper |
HighSpeedModePermitted
Gets/Sets whether High Speed Write Mode should be allowed.
Declaration
public bool HighSpeedModePermitted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PrettyPrintMode
Gets/Sets whether Pretty Printing is used.
Declaration
public bool PrettyPrintMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TripleFormatterType
Gets the type of the Triple Formatter used by the writer.
Declaration
public Type TripleFormatterType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
| Improve this Doc View SourceSave(IGraph, String)
Saves a Graph to a file using Turtle Syntax.
Declaration
public override void Save(IGraph g, string filename)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
System.String | filename | File to save to. |
Overrides
| Improve this Doc View SourceSaveInternal(IGraph, TextWriter)
Saves a Graph to the given Stream using Turtle Syntax.
Declaration
protected override void SaveInternal(IGraph g, TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
System.IO.TextWriter | output | Stream to save to. |
Overrides
| Improve this Doc 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 |
---|---|
System.String |
Overrides
System.Object.ToString()
Events
| Improve this Doc View SourceWarning
Event which is raised when there is a non-fatal issue with the Graph being written
Declaration
public override event RdfWriterWarning Warning
Event Type
Type | Description |
---|---|
RdfWriterWarning |