Show / Hide Table of Contents

Class QNameFormatter

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

Inheritance
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

| Edit this page 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.

| Edit this page 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.

bool allowAKeyword

Whether the 'a' keyword can be used for the RDF type predicate.

Fields

| Edit this page View Source

_qnameMapper

QName Map used for compressing URIs to QNames.

Declaration
protected QNameOutputMapper _qnameMapper
Field Value
Type Description
QNameOutputMapper

Methods

| Edit this page 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?)
| Edit this page 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.

Uri namespaceUri

Namespace URI.

Returns
Type Description
string
| Edit this page 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?)
| Edit this page 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
bool

Implements

INodeFormatter
ITripleFormatter
IUriFormatter
ICharFormatter
IResultFormatter
INamespaceFormatter

Extension Methods

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