Class NTriplesFormatter
Formatter for formatting as NTriples.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Writing.Formatting
Assembly: dotNetRdf.dll
Syntax
public class NTriplesFormatter : BaseFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter, ICommentFormatter
Constructors
| Edit this page View SourceNTriplesFormatter()
Creates a new NTriples Formatter.
Declaration
public NTriplesFormatter()
NTriplesFormatter(string)
Creates a new NTriples Formatter.
Declaration
protected NTriplesFormatter(string formatName)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
NTriplesFormatter(NTriplesSyntax)
Creates a new NTriples Formatter.
Declaration
public NTriplesFormatter(NTriplesSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
NTriplesSyntax | syntax |
NTriplesFormatter(NTriplesSyntax, string)
Creates a new NTriples formatter.
Declaration
public NTriplesFormatter(NTriplesSyntax syntax, string formatName)
Parameters
Type | Name | Description |
---|---|---|
NTriplesSyntax | syntax | NTriples syntax to output. |
string | formatName | Format Name. |
Properties
| Edit this page View SourceSyntax
Gets the NTriples syntax being used.
Declaration
public NTriplesSyntax Syntax { get; }
Property Value
Type | Description |
---|---|
NTriplesSyntax |
Methods
| Edit this page View SourceFormat(Triple, IRefNode)
Formats a triple in the context of a graph as a string.
Declaration
public override string Format(Triple t, IRefNode graph)
Parameters
Type | Name | Description |
---|---|---|
Triple | t | The triple. |
IRefNode | graph | The graph containing the triple. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceFormatBlankNode(IBlankNode, TripleSegment?)
Formats a Blank Node.
Declaration
protected override string FormatBlankNode(IBlankNode b, TripleSegment? segment)
Parameters
Type | Name | Description |
---|---|---|
IBlankNode | b | Blank Node. |
TripleSegment? | segment | Triple Segment. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceFormatChar(char)
Formats a Character.
Declaration
[Obsolete("This form of the FormatChar() method is considered obsolete as it is inefficient", true)]
public override string FormatChar(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceFormatChar(char[])
Formats a sequence of characters as a String.
Declaration
public override string FormatChar(char[] cs)
Parameters
Type | Name | Description |
---|---|---|
char[] | cs | Characters. |
Returns
Type | Description |
---|---|
string | String. |
Overrides
| Edit this page View SourceFormatComment(string)
Formats a String as comment String with the specified text.
Declaration
public virtual string FormatComment(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The comment String text. |
Returns
Type | Description |
---|---|
string | Comment string. |
FormatDatatype(Uri)
Format the datatype specification for a literal value.
Declaration
protected virtual string FormatDatatype(Uri datatypeUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | datatypeUri | The datatype URI. |
Returns
Type | Description |
---|---|
string |
FormatLiteralNode(ILiteralNode, TripleSegment?)
Formats a Literal Node.
Declaration
protected override string FormatLiteralNode(ILiteralNode l, TripleSegment? segment)
Parameters
Type | Name | Description |
---|---|---|
ILiteralNode | l | Literal Node. |
TripleSegment? | segment | Triple Segment. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceFormatTripleNode(ITripleNode, TripleSegment?)
Formats a triple node a a string for the given format.
Declaration
protected override string FormatTripleNode(ITripleNode t, TripleSegment? segment)
Parameters
Type | Name | Description |
---|---|---|
ITripleNode | t | Triple node. |
TripleSegment? | segment | Triple segment being written. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceFormatUri(string)
Formats a URI as a String for full Output.
Declaration
public override string FormatUri(string u)
Parameters
Type | Name | Description |
---|---|---|
string | u | URI. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceFormatUri(Uri)
Formats a URI as a String for full Output.
Declaration
public override string FormatUri(Uri u)
Parameters
Type | Name | Description |
---|---|---|
Uri | u | URI. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceFormatUriNode(IUriNode, TripleSegment?)
Formats a URI Node.
Declaration
protected override string FormatUriNode(IUriNode u, TripleSegment? segment)
Parameters
Type | Name | Description |
---|---|---|
IUriNode | u | URI Node. |
TripleSegment? | segment | Triple Segment. |
Returns
Type | Description |
---|---|
string |