Show / Hide Table of Contents

Class NTriplesFormatter

Formatter for formatting as NTriples.

Inheritance
object
BaseFormatter
NTriplesFormatter
NQuadsFormatter
NTriples11Formatter
UncompressedTurtleFormatter
UncompressedTurtleStarFormatter
Implements
INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
ICommentFormatter
Inherited Members
BaseFormatter.FormatName
BaseFormatter.Format(INode, TripleSegment?)
BaseFormatter.Format(INode)
BaseFormatter.Format(Triple)
BaseFormatter.FormatVariableNode(IVariableNode, TripleSegment?)
BaseFormatter.FormatGraphLiteralNode(IGraphLiteralNode, TripleSegment?)
BaseFormatter.Format(ISparqlResult)
BaseFormatter.FormatBooleanResult(bool)
BaseFormatter.Escape(string, List<string[]>)
BaseFormatter.ToString()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Writing.Formatting
Assembly: dotNetRdf.dll
Syntax
public class NTriplesFormatter : BaseFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter, ICommentFormatter

Constructors

| Edit this page View Source

NTriplesFormatter()

Creates a new NTriples Formatter.

Declaration
public NTriplesFormatter()
| Edit this page View Source

NTriplesFormatter(string)

Creates a new NTriples Formatter.

Declaration
protected NTriplesFormatter(string formatName)
Parameters
Type Name Description
string formatName

Format Name.

| Edit this page View Source

NTriplesFormatter(NTriplesSyntax)

Creates a new NTriples Formatter.

Declaration
public NTriplesFormatter(NTriplesSyntax syntax)
Parameters
Type Name Description
NTriplesSyntax syntax
| Edit this page View Source

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 Source

Syntax

Gets the NTriples syntax being used.

Declaration
public NTriplesSyntax Syntax { get; }
Property Value
Type Description
NTriplesSyntax

Methods

| Edit this page View Source

Format(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
BaseFormatter.Format(Triple, IRefNode)
| Edit this page View Source

FormatBlankNode(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
BaseFormatter.FormatBlankNode(IBlankNode, TripleSegment?)
| Edit this page View Source

FormatChar(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
BaseFormatter.FormatChar(char)
| Edit this page View Source

FormatChar(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
BaseFormatter.FormatChar(char[])
| Edit this page View Source

FormatComment(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.

| Edit this page View Source

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
| Edit this page View Source

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
BaseFormatter.FormatLiteralNode(ILiteralNode, TripleSegment?)
| Edit this page View Source

FormatTripleNode(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
BaseFormatter.FormatTripleNode(ITripleNode, TripleSegment?)
| Edit this page View Source

FormatUri(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
BaseFormatter.FormatUri(string)
| Edit this page View Source

FormatUri(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
BaseFormatter.FormatUri(Uri)
| Edit this page View Source

FormatUriNode(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
Overrides
BaseFormatter.FormatUriNode(IUriNode, TripleSegment?)

Implements

INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
ICommentFormatter

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • NTriplesFormatter()
    • NTriplesFormatter(string)
    • NTriplesFormatter(NTriplesSyntax)
    • NTriplesFormatter(NTriplesSyntax, string)
  • Properties
    • Syntax
  • Methods
    • Format(Triple, IRefNode)
    • FormatBlankNode(IBlankNode, TripleSegment?)
    • FormatChar(char)
    • FormatChar(char[])
    • FormatComment(string)
    • FormatDatatype(Uri)
    • FormatLiteralNode(ILiteralNode, TripleSegment?)
    • FormatTripleNode(ITripleNode, TripleSegment?)
    • FormatUri(string)
    • FormatUri(Uri)
    • FormatUriNode(IUriNode, TripleSegment?)
  • Implements
  • Extension Methods
Back to top Generated by DocFX