Class QNameFormatter
Abstract Base Class for Formatters that can compress URIs to QNames.
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 abstract class QNameFormatter : BaseFormatter, INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter, INamespaceFormatter
Constructors
| Improve this Doc View SourceQNameFormatter(String, QNameOutputMapper)
Creates a new QName Formatter.
Declaration
public QNameFormatter(string formatName, QNameOutputMapper qnameMapper)
Parameters
Type | Name | Description |
---|---|---|
System.String | formatName | Format Name. |
QNameOutputMapper | qnameMapper | QName Map. |
QNameFormatter(String, QNameOutputMapper, Boolean)
Creates a new QName Formatter.
Declaration
public QNameFormatter(string formatName, QNameOutputMapper qnameMapper, bool allowAKeyword)
Parameters
Type | Name | Description |
---|---|---|
System.String | formatName | Format Name. |
QNameOutputMapper | qnameMapper | QName Map. |
System.Boolean | allowAKeyword | Whether the 'a' keyword can be used for the RDF type predicate. |
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, Nullable<TripleSegment>)
Formats a Literal Node using QName compression for the datatype if possible.
Declaration
protected abstract 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 as a String.
Declaration
public abstract 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 |
FormatUriNode(IUriNode, Nullable<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. |
System.Nullable<TripleSegment> | segment | Triple Segment. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | value | Value. |
Returns
Type | Description |
---|---|
System.Boolean |