SemWeb.IO.N3Writer

SemWeb : SemWeb.IO Namespace
N3Writer

Writes out RDF statements to a stream in Notation 3 or NTriples format.

public class N3Writer : SemWeb.RdfWriter

Remarks
None.
Members

See Also: Inherited members from SemWeb.RdfWriter.

Constructors

N3Writer (System.IO.TextWriter) Creates an N3Writer that outputs statements to a TextWriter.
N3Writer (string) Creates an N3Writer that outputs statements to a file.
N3Writer (System.IO.TextWriter, SemWeb.NamespaceManager) Creates an N3Writer that outputs statements to a TextWriter, using a list of namespace prefixes.
N3Writer (string, SemWeb.NamespaceManager) Creates an N3Writer that outputs statements to a file, using a list of namespace prefixes.

Properties

NTriples | bool . Gets or sets whether the writer will output strict NTriples, or full N3.

Member Details
N3Writer Constructor
public N3Writer (string file)

Creates an N3Writer that outputs statements to a file.

Parameters

file
  The path to a file where the statements will be stored, or "-" to output to Console.Out.

Remarks
None.

N3Writer Constructor
public N3Writer (string file, SemWeb.NamespaceManager ns)

Creates an N3Writer that outputs statements to a file, using a list of namespace prefixes.

Parameters

file
  The path to a file where the statements will be stored, or "-" to output to Console.Out.
ns
  A NamespaceManager containing a mapping from prefixes to namespace URIs.

Remarks
A "@prefix" directive is written for each prefix in the NamespaceManager, if SemWeb.IO.N3Writer.NTriples is `false`, which is the default. The NamespaceManager should not be modified once statements have been written.

N3Writer Constructor
public N3Writer (System.IO.TextWriter writer)

Creates an N3Writer that outputs statements to a TextWriter.

Parameters

writer
  The TextWriter to which statements will be written.

Remarks
None.

N3Writer Constructor
public N3Writer (System.IO.TextWriter writer, SemWeb.NamespaceManager ns)

Creates an N3Writer that outputs statements to a TextWriter, using a list of namespace prefixes.

Parameters

writer
  The TextWriter to which statements will be written.
ns
  A NamespaceManager containing a mapping from prefixes to namespace URIs.

Remarks
A "@prefix" directive is written for each prefix in the NamespaceManager, if SemWeb.IO.N3Writer.NTriples is `false`, which is the default. The NamespaceManager should not be modified once statements have been written.

NTriples
public bool NTriples { set; get; }

Gets or sets whether the writer will output strict NTriples, or full N3.

Value
True if the write will output strict NTriples, false to output full N3.
Remarks
The default value is `false`.