SemWeb : SemWeb Namespace
N3Reader Class

Reads RDF statements from a Notation 3 (N3, Turtle, or NTriples) stream.

public class N3Reader : RdfReader

Remarks

Most of the N3 specification is supported, including everything in NTriples and Turtle. Statements are streamed as soon as they are read from the stream.

N3 formula notation with { and } is supported in the following way. For every formula, an anonymous entity is created to represent that graph. Every statement in the formula is imported with the Statement.Meta property set to the anonymous entity (unless it is recursively embedded in another formula, in which case it uses the innermost formula's anonymous entity).

The following example reads a N-Triples, Turtle, or N3 file from disk:

C# Example
using (RdfReader data = new N3Reader("filename.n3")) {
    store.Import(data);
}  

Once the document is fully read, all namespace declarations in the document are available in the RdfReader.Namespaces property and can be copied into the namespace manager of a SemWeb.RdfWriter using the NamespaceManager.AddFrom(NamespaceManager) method.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.0, 1.0.6.2, 1.0.7.0

Members

See Also: Inherited members from RdfReader.

Public Constructors

Creates a new N3 parser for a stream.
Creates a new N3 parser for the given file.

Public Methods

override
Select (StatementSink)
Documentation for this section has not yet been entered.

Protected Methods

override
Dispose ()
Documentation for this section has not yet been entered.

Member Details

N3Reader Constructor

Creates a new N3 parser for a stream.

public N3Reader (System.IO.TextReader source)

Parameters

source
The N3 stream to read.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

N3Reader Constructor

Creates a new N3 parser for the given file.

public N3Reader (string sourcefile)

Parameters

sourcefile
The name of a file, or "-" to read from Console.In.

Remarks

None.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 0.0.0.0, 1.0.6.2, 1.0.7.0

Dispose Method

Documentation for this section has not yet been entered.

protected override void Dispose ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.7.0

Select Method

Documentation for this section has not yet been entered.

public override void Select (StatementSink store)

Parameters

store
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: SemWeb
Assembly: SemWeb (in SemWeb.dll)
Assembly Versions: 1.0.7.0