Class TurtleW3CFormatter
Formatter which formats Turtle with QName compression using the newer W3C syntax which permits a wider range of valid QNames.
Implements
Inherited Members
Namespace: VDS.RDF.Writing.Formatting
Assembly: dotNetRdf.dll
Syntax
public class TurtleW3CFormatter : TurtleFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter, INamespaceFormatter, IBaseUriFormatter
Constructors
| Improve this Doc View SourceTurtleW3CFormatter()
Creates a new Turtle Formatter.
Declaration
public TurtleW3CFormatter()
TurtleW3CFormatter(string, IGraph)
Creates a new Turtle Formatter.
Declaration
protected TurtleW3CFormatter(string formatName, IGraph g)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
IGraph | g | Graph. |
TurtleW3CFormatter(string, INamespaceMapper, IUriFactory)
Creates a new Turtle Formatter.
Declaration
protected TurtleW3CFormatter(string formatName, INamespaceMapper nsmap, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
INamespaceMapper | nsmap | Namespace Map. |
IUriFactory | uriFactory | The factory to use when creating new Uri instances. |
TurtleW3CFormatter(string, INamespaceMapper)
Creates a new Turtle Formatter.
Declaration
protected TurtleW3CFormatter(string formatName, INamespaceMapper nsmap)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
INamespaceMapper | nsmap | Namespace Map. |
TurtleW3CFormatter(string, IUriFactory)
Creates a new Turtle Formatter.
Declaration
protected TurtleW3CFormatter(string formatName, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
IUriFactory | uriFactory | The factory to use when creating new Uri instances. |
TurtleW3CFormatter(string, QNameOutputMapper)
Creates a new Turtle Formatter.
Declaration
protected TurtleW3CFormatter(string formatName, QNameOutputMapper qnameMapper)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
QNameOutputMapper | qnameMapper | QName Map. |
TurtleW3CFormatter(string)
Creates a new Turtle Formatter.
Declaration
protected TurtleW3CFormatter(string formatName)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
TurtleW3CFormatter(IGraph)
Creates a new Turtle Formatter for the given Graph.
Declaration
public TurtleW3CFormatter(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
TurtleW3CFormatter(INamespaceMapper, IUriFactory)
Creates a new Turtle Formatter for the given Namespace Map.
Declaration
public TurtleW3CFormatter(INamespaceMapper nsmap, IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
INamespaceMapper | nsmap | Namespace Map. |
IUriFactory | uriFactory | The factory to use when creating new Uri instances. |
TurtleW3CFormatter(INamespaceMapper)
Creates a new Turtle Formatter for the given Namespace Map.
Declaration
public TurtleW3CFormatter(INamespaceMapper nsmap)
Parameters
Type | Name | Description |
---|---|---|
INamespaceMapper | nsmap | Namespace Map. |
TurtleW3CFormatter(IUriFactory)
Creates a new Turtle Formatter.
Declaration
public TurtleW3CFormatter(IUriFactory uriFactory)
Parameters
Type | Name | Description |
---|---|---|
IUriFactory | uriFactory | The factory to use when creating new Uri instances. |
TurtleW3CFormatter(QNameOutputMapper)
Creates a new Turtle Formatter that uses the given QName mapper.
Declaration
public TurtleW3CFormatter(QNameOutputMapper qnameMapper)
Parameters
Type | Name | Description |
---|---|---|
QNameOutputMapper | qnameMapper | QName Mapper. |
Methods
| Improve this Doc View SourceFormatTripleNode(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
Remarks
This method should be overridden in formatters that support serializing ITripleNodes.
IsValidQName(string)
Gets whether a QName is valid in Turtle as specified by the W3C.
Declaration
protected override bool IsValidQName(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | QName. |
Returns
Type | Description |
---|---|
System.Boolean |