Show / Hide Table of Contents

Class NTriplesWriter

Class for generating RDF in NTriples Concrete Syntax.

Inheritance
object
BaseRdfWriter
NTriplesWriter
Implements
IRdfWriter
IFormatterBasedWriter
IRdfStarCapableWriter
Inherited Members
BaseRdfWriter.Save(IGraph, string, Encoding)
BaseRdfWriter.Save(IGraph, TextWriter)
BaseRdfWriter.Save(IGraph, TextWriter, bool)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Writing
Assembly: dotNetRdf.dll
Syntax
public class NTriplesWriter : BaseRdfWriter, IRdfWriter, IFormatterBasedWriter, IRdfStarCapableWriter

Constructors

| Edit this page View Source

NTriplesWriter()

Creates a new writer.

Declaration
public NTriplesWriter()
| Edit this page View Source

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 Source

CanWriteTripleNodes

Gets whether the current syntax mode supports writing RDF-Star triple nodes or not.

Declaration
public bool CanWriteTripleNodes { get; }
Property Value
Type Description
bool
| Edit this page View Source

SortTriples

Gets/Sets whether Triples are sorted before being Output.

Declaration
public bool SortTriples { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Syntax

Gets/Sets the NTriples syntax mode.

Declaration
public NTriplesSyntax Syntax { get; set; }
Property Value
Type Description
NTriplesSyntax
| Edit this page View Source

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 Source

Save(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
BaseRdfWriter.Save(IGraph, string)
| Edit this page View Source

SaveInternal(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
BaseRdfWriter.SaveInternal(IGraph, TextWriter)
| Edit this page 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
string
Overrides
object.ToString()

Events

| Edit this page View Source

Warning

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

Implements

IRdfWriter
IFormatterBasedWriter
IRdfStarCapableWriter

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • NTriplesWriter()
    • NTriplesWriter(NTriplesSyntax)
  • Properties
    • CanWriteTripleNodes
    • SortTriples
    • Syntax
    • TripleFormatterType
  • Methods
    • Save(IGraph, string)
    • SaveInternal(IGraph, TextWriter)
    • ToString()
  • Events
    • Warning
  • Implements
  • Extension Methods
Back to top Generated by DocFX