Class QNameFormatter
Abstract Base Class for Formatters that can compress URIs to QNames.
Implements
Inherited Members
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 abstract class QNameFormatter : BaseFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter, INamespaceFormatter
Constructors
| Improve this Doc View SourceQNameFormatter(string, QNameOutputMapper, bool)
Creates a new QName Formatter.
Declaration
public QNameFormatter(string formatName, QNameOutputMapper qnameMapper, bool allowAKeyword)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
QNameOutputMapper | qnameMapper | QName Map. |
System.Boolean | allowAKeyword | Whether the 'a' keyword can be used for the RDF type predicate. |
QNameFormatter(string, QNameOutputMapper)
Creates a new QName Formatter.
Declaration
public QNameFormatter(string formatName, QNameOutputMapper qnameMapper)
Parameters
Type | Name | Description |
---|---|---|
string | formatName | Format Name. |
QNameOutputMapper | qnameMapper | QName Map. |
Fields
| Improve this Doc View Source_qnameMapper
QName Map used for compressing URIs to QNames.
Declaration
protected QNameOutputMapper _qnameMapper
Field Value
Type | Description |
---|---|
QNameOutputMapper |
Methods
| Improve this Doc View SourceFormatLiteralNode(ILiteralNode, TripleSegment?)
Formats a Literal Node using QName compression for the datatype if possible.
Declaration
protected override abstract 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 as a String.
Declaration
public abstract string FormatNamespace(string prefix, Uri namespaceUri)
Parameters
Type | Name | Description |
---|---|---|
string | prefix | Namespace Prefix. |
System.Uri | namespaceUri | Namespace URI. |
Returns
Type | Description |
---|---|
string |
FormatUriNode(IUriNode, TripleSegment?)
Formats a URI Node using QName compression if possible.
Declaration
protected override string FormatUriNode(IUriNode u, TripleSegment? segment)
Parameters
Type | Name | Description |
---|---|---|
IUriNode | u | URI. |
TripleSegment? | segment | Triple Segment. |
Returns
Type | Description |
---|---|
string |
Overrides
| Improve this Doc View SourceIsValidQName(string)
Determines whether a QName is valid.
Declaration
protected virtual bool IsValidQName(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | Value. |
Returns
Type | Description |
---|---|
System.Boolean |