Class NTriplesWriter
Class for generating RDF in NTriples Concrete Syntax.
Inherited Members
Namespace: VDS.RDF.Writing
Assembly: dotNetRdf.dll
Syntax
public class NTriplesWriter : BaseRdfWriter, IRdfWriter, IFormatterBasedWriter, IRdfStarCapableWriter
Constructors
| Edit this page View SourceNTriplesWriter()
Creates a new writer.
Declaration
public NTriplesWriter()
NTriplesWriter(NTriplesSyntax)
Creates a new writer.
Declaration
public NTriplesWriter(NTriplesSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
NTriplesSyntax | syntax | NTriples Syntax Mode. |
Properties
| Edit this page View SourceCanWriteTripleNodes
Gets whether the current syntax mode supports writing RDF-Star triple nodes or not.
Declaration
public bool CanWriteTripleNodes { get; }
Property Value
Type | Description |
---|---|
bool |
SortTriples
Gets/Sets whether Triples are sorted before being Output.
Declaration
public bool SortTriples { get; set; }
Property Value
Type | Description |
---|---|
bool |
Syntax
Gets/Sets the NTriples syntax mode.
Declaration
public NTriplesSyntax Syntax { get; set; }
Property Value
Type | Description |
---|---|
NTriplesSyntax |
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 SourceSave(IGraph, string)
Saves the Graph in NTriples Syntax to the given stream.
Declaration
public override void Save(IGraph g, string filename)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
string | filename | File to save to. |
Overrides
| Edit this page View SourceSaveInternal(IGraph, TextWriter)
Saves the Graph in NTriples Syntax to the given stream.
Declaration
protected override void SaveInternal(IGraph g, TextWriter output)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
TextWriter | output | Stream to save to. |
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 there is an issue with the Graph being serialized that doesn't prevent serialization but the user should be aware of
Declaration
public override event RdfWriterWarning Warning
Event Type
Type | Description |
---|---|
RdfWriterWarning |