Show / Hide Table of Contents

Class TurtleFormatter

Formatter which formats Turtle with QName compression.

Inheritance
object
BaseFormatter
QNameFormatter
TurtleFormatter
Notation3Formatter
SparqlFormatter
TurtleW3CFormatter
Implements
INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
INamespaceFormatter
IBaseUriFormatter
Inherited Members
QNameFormatter._qnameMapper
QNameFormatter.IsValidQName(string)
QNameFormatter.FormatUriNode(IUriNode, TripleSegment?)
BaseFormatter.FormatName
BaseFormatter.Format(INode, TripleSegment?)
BaseFormatter.Format(INode)
BaseFormatter.Format(Triple)
BaseFormatter.Format(Triple, IRefNode)
BaseFormatter.FormatUri(string)
BaseFormatter.FormatUri(Uri)
BaseFormatter.FormatTripleNode(ITripleNode, TripleSegment?)
BaseFormatter.FormatVariableNode(IVariableNode, TripleSegment?)
BaseFormatter.FormatGraphLiteralNode(IGraphLiteralNode, TripleSegment?)
BaseFormatter.FormatChar(char)
BaseFormatter.FormatChar(char[])
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 TurtleFormatter : QNameFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter, INamespaceFormatter, IBaseUriFormatter

Constructors

| Edit this page View Source

TurtleFormatter(string, IGraph)

Creates a new Turtle Formatter.

Declaration
protected TurtleFormatter(string formatName, IGraph g)
Parameters
Type Name Description
string formatName

Format Name.

IGraph g

Graph.

| Edit this page View Source

TurtleFormatter(string, INamespaceMapper, IUriFactory)

Creates a new Turtle Formatter.

Declaration
protected TurtleFormatter(string formatName, INamespaceMapper nsmap, IUriFactory uriFactory = null)
Parameters
Type Name Description
string formatName

Format Name.

INamespaceMapper nsmap

Namespace Map.

IUriFactory uriFactory

The factory to use when creating new Uri instances.

| Edit this page View Source

TurtleFormatter(string, IUriFactory)

Creates a new Turtle Formatter.

Declaration
protected TurtleFormatter(string formatName, IUriFactory uriFactory = null)
Parameters
Type Name Description
string formatName

Format Name.

IUriFactory uriFactory

The factory to use when creating new Uri instances.

| Edit this page View Source

TurtleFormatter(string, QNameOutputMapper)

Creates a new Turtle Formatter.

Declaration
protected TurtleFormatter(string formatName, QNameOutputMapper qnameMapper)
Parameters
Type Name Description
string formatName

Format Name.

QNameOutputMapper qnameMapper

QName Map.

| Edit this page View Source

TurtleFormatter(IGraph)

Creates a new Turtle Formatter for the given Graph.

Declaration
public TurtleFormatter(IGraph g)
Parameters
Type Name Description
IGraph g

Graph.

| Edit this page View Source

TurtleFormatter(INamespaceMapper, IUriFactory)

Creates a new Turtle Formatter for the given Namespace Map.

Declaration
public TurtleFormatter(INamespaceMapper nsmap, IUriFactory uriFactory = null)
Parameters
Type Name Description
INamespaceMapper nsmap

Namespace Map.

IUriFactory uriFactory

The factory to use when creating new Uri instances.

| Edit this page View Source

TurtleFormatter(IUriFactory)

Creates a new Turtle Formatter.

Declaration
public TurtleFormatter(IUriFactory uriFactory = null)
Parameters
Type Name Description
IUriFactory uriFactory

The factory to use when creating new Uri instances.

| Edit this page View Source

TurtleFormatter(QNameOutputMapper)

Creates a new Turtle Formatter that uses the given QName mapper.

Declaration
public TurtleFormatter(QNameOutputMapper qnameMapper)
Parameters
Type Name Description
QNameOutputMapper qnameMapper

QName Mapper.

Fields

| Edit this page View Source

_litMustEscape

Set of characters that must be escaped for Literals.

Declaration
protected List<string[]> _litMustEscape
Field Value
Type Description
List<string[]>
| Edit this page View Source

_longLitMustEscape

Set of characters that must be escaped for Long Literals.

Declaration
protected List<string[]> _longLitMustEscape
Field Value
Type Description
List<string[]>

Methods

| Edit this page View Source

FormatBaseUri(Uri)

Formats a Base URI declaration as a @base declaration.

Declaration
public virtual string FormatBaseUri(Uri u)
Parameters
Type Name Description
Uri u

Base URI.

Returns
Type Description
string
| Edit this page View Source

FormatBlankNode(IBlankNode, TripleSegment?)

Formats a Blank Node as a String.

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

FormatLiteralNode(ILiteralNode, TripleSegment?)

Formats a Literal Node as a String.

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

FormatNamespace(string, Uri)

Formats a Namespace Declaration as a @prefix declaration.

Declaration
public override string FormatNamespace(string prefix, Uri namespaceUri)
Parameters
Type Name Description
string prefix

Namespace Prefix.

Uri namespaceUri

Namespace URI.

Returns
Type Description
string
Overrides
QNameFormatter.FormatNamespace(string, Uri)

Implements

INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
INamespaceFormatter
IBaseUriFormatter

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • TurtleFormatter(string, IGraph)
    • TurtleFormatter(string, INamespaceMapper, IUriFactory)
    • TurtleFormatter(string, IUriFactory)
    • TurtleFormatter(string, QNameOutputMapper)
    • TurtleFormatter(IGraph)
    • TurtleFormatter(INamespaceMapper, IUriFactory)
    • TurtleFormatter(IUriFactory)
    • TurtleFormatter(QNameOutputMapper)
  • Fields
    • _litMustEscape
    • _longLitMustEscape
  • Methods
    • FormatBaseUri(Uri)
    • FormatBlankNode(IBlankNode, TripleSegment?)
    • FormatLiteralNode(ILiteralNode, TripleSegment?)
    • FormatNamespace(string, Uri)
  • Implements
  • Extension Methods
Back to top Generated by DocFX