Show / Hide Table of Contents

Class TurtleFormatter

Formatter which formats Turtle with QName compression.
Inheritance
System.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, Nullable<TripleSegment>)
BaseFormatter.FormatName
BaseFormatter.Format(INode, Nullable<TripleSegment>)
BaseFormatter.Format(INode)
BaseFormatter.Format(Triple)
BaseFormatter.FormatUri(String)
BaseFormatter.FormatUri(Uri)
BaseFormatter.FormatVariableNode(IVariableNode, Nullable<TripleSegment>)
BaseFormatter.FormatGraphLiteralNode(IGraphLiteralNode, Nullable<TripleSegment>)
BaseFormatter.FormatChar(Char)
BaseFormatter.FormatChar(Char[])
BaseFormatter.Format(SparqlResult)
BaseFormatter.FormatBooleanResult(Boolean)
BaseFormatter.Escape(String, List<String[]>)
BaseFormatter.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Writing.Formatting
Assembly: dotNetRDF.dll
Syntax
public class TurtleFormatter : QNameFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter, INamespaceFormatter, IBaseUriFormatter

Constructors

| Improve this Doc View Source

TurtleFormatter()

Creates a new Turtle Formatter.
Declaration
public TurtleFormatter()
| Improve this Doc View Source

TurtleFormatter(String)

Creates a new Turtle Formatter.
Declaration
protected TurtleFormatter(string formatName)
Parameters
Type Name Description
System.String formatName Format Name.
| Improve this Doc View Source

TurtleFormatter(String, IGraph)

Creates a new Turtle Formatter.
Declaration
protected TurtleFormatter(string formatName, IGraph g)
Parameters
Type Name Description
System.String formatName Format Name.
IGraph g Graph.
| Improve this Doc View Source

TurtleFormatter(String, INamespaceMapper)

Creates a new Turtle Formatter.
Declaration
protected TurtleFormatter(string formatName, INamespaceMapper nsmap)
Parameters
Type Name Description
System.String formatName Format Name.
INamespaceMapper nsmap Namespace Map.
| Improve this Doc View Source

TurtleFormatter(String, QNameOutputMapper)

Creates a new Turtle Formatter.
Declaration
protected TurtleFormatter(string formatName, QNameOutputMapper qnameMapper)
Parameters
Type Name Description
System.String formatName Format Name.
QNameOutputMapper qnameMapper QName Map.
| Improve this Doc 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.
| Improve this Doc View Source

TurtleFormatter(INamespaceMapper)

Creates a new Turtle Formatter for the given Namespace Map.
Declaration
public TurtleFormatter(INamespaceMapper nsmap)
Parameters
Type Name Description
INamespaceMapper nsmap Namespace Map.
| Improve this Doc 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

| Improve this Doc View Source

_litMustEscape

Set of characters that must be escaped for Literals.
Declaration
protected List<string[]> _litMustEscape
Field Value
Type Description
System.Collections.Generic.List<System.String[]>
| Improve this Doc View Source

_longLitMustEscape

Set of characters that must be escaped for Long Literals.
Declaration
protected List<string[]> _longLitMustEscape
Field Value
Type Description
System.Collections.Generic.List<System.String[]>

Methods

| Improve this Doc View Source

FormatBaseUri(Uri)

Formats a Base URI declaration as a @base declaration.
Declaration
public virtual string FormatBaseUri(Uri u)
Parameters
Type Name Description
System.Uri u Base URI.
Returns
Type Description
System.String
| Improve this Doc View Source

FormatBlankNode(IBlankNode, Nullable<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.
System.Nullable<TripleSegment> segment Triple Segment.
Returns
Type Description
System.String
Overrides
BaseFormatter.FormatBlankNode(IBlankNode, Nullable<TripleSegment>)
| Improve this Doc View Source

FormatLiteralNode(ILiteralNode, Nullable<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.
System.Nullable<TripleSegment> segment Triple Segment.
Returns
Type Description
System.String
Overrides
QNameFormatter.FormatLiteralNode(ILiteralNode, Nullable<TripleSegment>)
| Improve this Doc View Source

FormatNamespace(String, Uri)

Formats a Namespace Decalaration as a @prefix declaration.
Declaration
public override string FormatNamespace(string prefix, Uri namespaceUri)
Parameters
Type Name Description
System.String prefix Namespace Prefix.
System.Uri namespaceUri Namespace URI.
Returns
Type Description
System.String
Overrides
QNameFormatter.FormatNamespace(String, Uri)

Implements

INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
INamespaceFormatter
IBaseUriFormatter

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • TurtleFormatter()
    • TurtleFormatter(String)
    • TurtleFormatter(String, IGraph)
    • TurtleFormatter(String, INamespaceMapper)
    • TurtleFormatter(String, QNameOutputMapper)
    • TurtleFormatter(IGraph)
    • TurtleFormatter(INamespaceMapper)
    • TurtleFormatter(QNameOutputMapper)
  • Fields
    • _litMustEscape
    • _longLitMustEscape
  • Methods
    • FormatBaseUri(Uri)
    • FormatBlankNode(IBlankNode, Nullable<TripleSegment>)
    • FormatLiteralNode(ILiteralNode, Nullable<TripleSegment>)
    • FormatNamespace(String, Uri)
  • Implements
  • Extension Methods
Back to top Generated by DocFX