Class TurtleFormatter
Formatter which formats Turtle with QName compression.
Inheritance
System.Object
TurtleFormatter
Implements
Inherited Members
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 SourceTurtleFormatter()
Creates a new Turtle Formatter.
Declaration
public TurtleFormatter()
TurtleFormatter(String)
Creates a new Turtle Formatter.
Declaration
protected TurtleFormatter(string formatName)
Parameters
Type | Name | Description |
---|---|---|
System.String | formatName | Format Name. |
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. |
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. |
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. |
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)
Creates a new Turtle Formatter for the given Namespace Map.
Declaration
public TurtleFormatter(INamespaceMapper nsmap)
Parameters
Type | Name | Description |
---|---|---|
INamespaceMapper | nsmap | Namespace Map. |
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[]> |
_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 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 |
---|---|
System.String |
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
| Improve this Doc View SourceFormatLiteralNode(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
| Improve this Doc View SourceFormatNamespace(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 |