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
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
System.Boolean |
SortTriples
Gets/Sets whether Triples are sorted before being Output.
Declaration
public bool SortTriples { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 |
---|---|
System.Type |
Methods
| Improve this Doc 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
| Improve this Doc 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. |
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 |
---|---|
string |
Overrides
Events
| Improve this Doc 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 |