Class TurtleFormatter
Formatter which formats Turtle with QName compression.
Inheritance
Implements
Inherited Members
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 SourceTurtleFormatter(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. |
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. |
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. |
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. |
TurtleFormatter(IGraph)
Creates a new Turtle Formatter for the given Graph.
Declaration
public TurtleFormatter(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
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. |
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. |
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<T><string[]> |
_longLitMustEscape
Set of characters that must be escaped for Long Literals.
Declaration
protected List<string[]> _longLitMustEscape
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<T><string[]> |
Methods
| Improve this Doc View SourceFormatBaseUri(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 |
---|---|
string |
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
| Improve this Doc View SourceFormatLiteralNode(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
| Improve this Doc View SourceFormatNamespace(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. |
System.Uri | namespaceUri | Namespace URI. |
Returns
Type | Description |
---|---|
string |