SemWeb : SemWeb Namespace
N3Writer Class

Writer that outputs triples in Notation3 format.

public class N3Writer : TurtleWriter

Remarks

This class' memory use is proportional to the number of statements written. Intended for pretty printing. Use SemWeb.TurtleWriter or SemWeb.NTriplesWriter for performance.

Requirements

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

Members

See Also: Inherited members from TurtleWriter.

Public Constructors

Initializes a new SemWeb.N3Writer instance.
Initializes a new SemWeb.N3Writer instance.

Protected Fields

static readonly
N3Abbreviations Hashtable . Entity abbreviations.

Protected Properties

[read-only]
override
Abbreviations Hashtable . Gets the namespace abbreviations hashtable.

Public Methods

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

Protected Methods

override
AddFormulaStatement (Statement)
Documentation for this section has not yet been entered.
override
AddStatement (Statement)
Documentation for this section has not yet been entered.
CompareStatementBodies (Statement, Statement) : int
Compares the statement bodies for sorting.
FirstOrDefault<T> (IEnumerable<T>) : T
Returns the first element in the collection or the default value if the collection is empty.
IsFormulaId (Resource) : bool
Determines whether the specified resource is the ID of a formula.
IsListId (Resource) : bool
Determines whether the specified resource is the ID of a list.
Remove (Statement)
Removes the specified statement, marking it as written.
SortEntities (IEnumerable<Entity>) : List<Entity>
Sorts the entities.
override
WriteEntity (Entity)
Documentation for this section has not yet been entered.
WriteFormula (Entity)
Writes the formula identified by the specified ID to the output writer.
WriteFormulaStatement (Statement)
Writes the statement of a formula to the output writer.
WriteList (Entity)
Writes the specified list to the output writer.
WriteStatementBodies (List<Statement>)
Writes the bodies of the specified statements (sharing a subject) to the output writer.
WriteStatements ()
Writes all statements to the output writer, grouped by subject.

Member Details

N3Writer Constructor

Initializes a new SemWeb.N3Writer instance.

public N3Writer (System.IO.TextWriter writer)

Parameters

writer
The writer.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

N3Writer Constructor

Initializes a new SemWeb.N3Writer instance.

public N3Writer (string file)

Parameters

file
The file.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

Abbreviations Property

Gets the namespace abbreviations hashtable.

protected override Hashtable Abbreviations { get; }

Value

A hashtable of URI/abbreviation pairs.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

AddFormulaStatement Method

Documentation for this section has not yet been entered.

protected override void AddFormulaStatement (Statement statement)

Parameters

statement
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

AddStatement Method

Documentation for this section has not yet been entered.

protected override void AddStatement (Statement statement)

Parameters

statement
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

Close Method

Documentation for this section has not yet been entered.

public override void Close ()

Remarks

Documentation for this section has not yet been entered.

Requirements

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

CompareStatementBodies Method

Compares the statement bodies for sorting.

protected virtual int CompareStatementBodies (Statement x, Statement y)

Parameters

x
The first statement.
y
The second statement.

Returns

A number indicating the order of x and y

Remarks

Documentation for this section has not yet been entered.

Requirements

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

FirstOrDefault<T> Generic Method

Returns the first element in the collection or the default value if the collection is empty.

protected T FirstOrDefault<T> (IEnumerable<T> items)

Type Parameters

T
Element type.

Parameters

items
The items.

Returns

The first element or the default value.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

IsFormulaId Method

Determines whether the specified resource is the ID of a formula.

protected bool IsFormulaId (Resource node)

Parameters

node
The node.

Returns

true if the resource is a formula ID; otherwise, false.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

IsListId Method

Determines whether the specified resource is the ID of a list.

protected bool IsListId (Resource node)

Parameters

node
The node.

Returns

true if the resource is a list ID; otherwise, false.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

N3Abbreviations Field

Entity abbreviations.

protected static readonly Hashtable N3Abbreviations

Remarks

Documentation for this section has not yet been entered.

Requirements

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

Remove Method

Removes the specified statement, marking it as written.

protected void Remove (Statement statement)

Parameters

statement
The statement.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

SortEntities Method

Sorts the entities.

protected List<Entity> SortEntities (IEnumerable<Entity> items)

Parameters

items
The items.

Returns

A sorted list of entities.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

WriteEntity Method

Documentation for this section has not yet been entered.

protected override void WriteEntity (Entity entity)

Parameters

entity
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

WriteFormula Method

Writes the formula identified by the specified ID to the output writer.

protected virtual void WriteFormula (Entity formulaId)

Parameters

formulaId
The formula ID.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

WriteFormulaStatement Method

Writes the statement of a formula to the output writer.

protected virtual void WriteFormulaStatement (Statement statement)

Parameters

statement
The statement.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

WriteList Method

Writes the specified list to the output writer.

protected virtual void WriteList (Entity listId)

Parameters

listId
The list ID.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

WriteStatementBodies Method

Writes the bodies of the specified statements (sharing a subject) to the output writer.

protected virtual void WriteStatementBodies (List<Statement> statements)

Parameters

statements
The statements.

Remarks

Documentation for this section has not yet been entered.

Requirements

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

WriteStatements Method

Writes all statements to the output writer, grouped by subject.

protected virtual void WriteStatements ()

Remarks

Documentation for this section has not yet been entered.

Requirements

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