Class BaseFormatter
Abstract Base Class for Formatters.
Inheritance
System.Object
BaseFormatter
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)
Assembly: dotNetRDF.dll
public abstract class BaseFormatter : INodeFormatter, ITripleFormatter, IUriFormatter, ICharFormatter, IResultFormatter
Constructors
|
Improve this Doc
View Source
Creates a new Formatter.
Declaration
public BaseFormatter(string formatName)
Parameters
Type |
Name |
Description |
System.String |
formatName |
Format Name. |
Properties
|
Improve this Doc
View Source
Gets the Format Name.
Declaration
public string FormatName { get; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
Applies escapes to the given value.
Declaration
protected string Escape(string value, List<string[]> escapes)
Parameters
Type |
Name |
Description |
System.String |
value |
Value. |
System.Collections.Generic.List<System.String[]> |
escapes |
Escapes. |
Returns
Type |
Description |
System.String |
Escaped string. |
|
Improve this Doc
View Source
Formats a Node as a String.
Declaration
public virtual string Format(INode n)
Parameters
Type |
Name |
Description |
INode |
n |
Node. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Node as a String.
Declaration
public virtual string Format(INode n, TripleSegment? segment)
Parameters
Type |
Name |
Description |
INode |
n |
Node. |
System.Nullable<TripleSegment> |
segment |
Triple Segment. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a SPARQL Result for the given format.
Declaration
public virtual string Format(SparqlResult result)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Triple as a String.
Declaration
public virtual string Format(Triple t)
Parameters
Type |
Name |
Description |
Triple |
t |
Triple. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Blank Node as a String for the given Format.
Declaration
protected virtual string FormatBlankNode(IBlankNode b, TripleSegment? segment)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a SPARQL Boolean Result for the given format.
Declaration
public virtual string FormatBooleanResult(bool result)
Parameters
Type |
Name |
Description |
System.Boolean |
result |
Boolean Result. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Character for the given Format.
Declaration
[Obsolete("This form of the FormatChar() method is considered obsolete as it is inefficient", false)]
public virtual string FormatChar(char c)
Parameters
Type |
Name |
Description |
System.Char |
c |
Character. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a sequence of characters as a String.
Declaration
public virtual string FormatChar(char[] cs)
Parameters
Type |
Name |
Description |
System.Char[] |
cs |
Characters. |
Returns
Type |
Description |
System.String |
String. |
|
Improve this Doc
View Source
Formats a Graph Literal Node as a String for the given Format.
Declaration
protected virtual string FormatGraphLiteralNode(IGraphLiteralNode glit, TripleSegment? segment)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Literal Node as a String for the given Format.
Declaration
protected abstract string FormatLiteralNode(ILiteralNode l, TripleSegment? segment)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a URI as a String for full Output.
Declaration
public virtual string FormatUri(string u)
Parameters
Type |
Name |
Description |
System.String |
u |
URI. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a URI as a String for full Output.
Declaration
public virtual string FormatUri(Uri u)
Parameters
Type |
Name |
Description |
System.Uri |
u |
URI. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a URI Node as a String for the given Format.
Declaration
protected abstract string FormatUriNode(IUriNode u, TripleSegment? segment)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Variable Node as a String for the given Format.
Declaration
protected virtual string FormatVariableNode(IVariableNode v, TripleSegment? segment)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Gets the Name of the Format this Format uses.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Implements
Extension Methods