Class NTriplesFormatter
Formatter for formatting as NTriples.
Inheritance
Inherited Members
Namespace: VDS.RDF.Writing.Formatting
Assembly: dotNetRdf.dll
Syntax
public class NTriplesFormatter : BaseFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter
Constructors
| Improve this Doc 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, 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. |
NTriplesFormatter(NTriplesSyntax)
Creates a new NTriples Formatter.
Declaration
public NTriplesFormatter(NTriplesSyntax syntax)
Parameters
Type | Name | Description |
---|---|---|
NTriplesSyntax | syntax |
Fields
| Improve this Doc View Source_litEscapes
Set of characters which must be escaped in Literals.
Declaration
protected readonly List<string[]> _litEscapes
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<T><string[]> |
Properties
| Improve this Doc View SourceSyntax
Gets the NTriples syntax being used.
Declaration
public NTriplesSyntax Syntax { get; }
Property Value
Type | Description |
---|---|
NTriplesSyntax |
Methods
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc View SourceFormatDatatype(Uri)
Format the datatype specification for a literal value.
Declaration
protected virtual string FormatDatatype(Uri datatypeUri)
Parameters
Type | Name | Description |
---|---|---|
System.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
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc View SourceFormatUri(Uri)
Formats a URI as a String for full Output.
Declaration
public override string FormatUri(Uri u)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | u | URI. |
Returns
Type | Description |
---|---|
string |
Overrides
| Improve this Doc 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 |