dotNetRDF API Documentation

TriGWriter Class

Class for writing a Triple Store in named Graph TriG syntax to a file/stream

For a list of all members of this type, see TriGWriter Members .

System.Object
   TriGWriter

public class TriGWriter : IStoreWriter, IHighSpeedWriter, IPrettyPrintingWriter, ICompressingWriter, IMultiThreadedWriter

Thread Safety

Designed to be Thread Safe - should be able to call Save() from several threads with no issue. See Remarks for potential performance impact of this.

Remarks

For efficiency the TriG Writer splits it's writing over several threads (currently 4), these threads share a reference to a Context object which gives Global writing context eg. the target TextWriter being written to. Each thread generates temporary local writing contexts as it goes along, each of these is scoped to writing a specific Graph. Graphs are written to a StringWriter so the output for each Graph is built completely and then written in one go to the TextWriter specified as the target of the writing in the global context.

Requirements

Namespace: VDS.RDF.Writing

Assembly: dotNetRDF (in dotNetRDF.dll)

See Also

TriGWriter Members | VDS.RDF.Writing Namespace