Show / Hide Table of Contents

Class QNameFormatter

Abstract Base Class for Formatters that can compress URIs to QNames.

Inheritance
System.Object
BaseFormatter
QNameFormatter
TurtleFormatter
Implements
INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
INamespaceFormatter
Inherited Members
BaseFormatter.FormatName
BaseFormatter.Format(INode, TripleSegment?)
BaseFormatter.Format(INode)
BaseFormatter.Format(Triple)
BaseFormatter.Format(Triple, IRefNode)
BaseFormatter.FormatUri(string)
BaseFormatter.FormatUri(Uri)
BaseFormatter.FormatBlankNode(IBlankNode, TripleSegment?)
BaseFormatter.FormatTripleNode(ITripleNode, TripleSegment?)
BaseFormatter.FormatVariableNode(IVariableNode, TripleSegment?)
BaseFormatter.FormatGraphLiteralNode(IGraphLiteralNode, TripleSegment?)
BaseFormatter.FormatChar(char)
BaseFormatter.FormatChar(char[])
BaseFormatter.Format(ISparqlResult)
BaseFormatter.FormatBooleanResult(bool)
BaseFormatter.Escape(string, List<string[]>)
BaseFormatter.ToString()
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 Source

QNameFormatter(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.

| Improve this Doc View Source

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 Source

FormatLiteralNode(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
BaseFormatter.FormatLiteralNode(ILiteralNode, TripleSegment?)
| Improve this Doc View Source

FormatNamespace(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
| Improve this Doc View Source

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
BaseFormatter.FormatUriNode(IUriNode, TripleSegment?)
| Improve this Doc View Source

IsValidQName(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

Implements

INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
INamespaceFormatter

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • QNameFormatter(string, QNameOutputMapper, bool)
    • QNameFormatter(string, QNameOutputMapper)
  • Fields
    • _qnameMapper
  • Methods
    • FormatLiteralNode(ILiteralNode, TripleSegment?)
    • FormatNamespace(string, Uri)
    • FormatUriNode(IUriNode, TripleSegment?)
    • IsValidQName(string)
  • Implements
  • Extension Methods
Back to top Generated by DocFX