Class SparqlFormatter
Formatter for formatting Nodes for use in SPARQL and for formatting SPARQL Queries.
Inheritance
System.Object
SparqlFormatter
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 class SparqlFormatter : TurtleFormatter, ITripleFormatter, ICharFormatter, INamespaceFormatter, IBaseUriFormatter, IQueryFormatter, INodeFormatter, IUriFormatter, IResultFormatter
Constructors
|
Improve this Doc
View Source
Creates a new SPARQL Formatter.
Declaration
|
Improve this Doc
View Source
Creates a new SPARQL Formatter using the given Graph.
Declaration
public SparqlFormatter(IGraph g)
Parameters
Type |
Name |
Description |
IGraph |
g |
Graph. |
|
Improve this Doc
View Source
Creates a new SPARQL Formatter using the given Namespace Map.
Declaration
public SparqlFormatter(INamespaceMapper nsmap)
Parameters
Methods
|
Improve this Doc
View Source
Formats a Graph Pattern in nicely formatted SPARQL syntax.
Declaration
public virtual string Format(GraphPattern gp)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Triple Pattern in nicely formatted SPARQL syntax.
Declaration
public virtual string Format(ITriplePattern tp)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Pattern Item in nicely formatted SPARQL syntax.
Declaration
public virtual string Format(PatternItem item, TripleSegment? segment)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Query in nicely formatted SPARQL syntax.
Declaration
public virtual string Format(SparqlQuery query)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a SPARQL Result using this Formatter to format the Node values for each Variable.
Declaration
public override string Format(SparqlResult result)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
Formats a SPARQL Aggregate.
Declaration
protected virtual string FormatAggregate(ISparqlAggregate agg)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Base URI Declaration.
Declaration
public override string FormatBaseUri(Uri u)
Parameters
Type |
Name |
Description |
System.Uri |
u |
Base URI. |
Returns
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
Formats a Boolean Result.
Declaration
public override string FormatBooleanResult(bool result)
Parameters
Type |
Name |
Description |
System.Boolean |
result |
Boolean Result. |
Returns
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
Formats the Variable/QName/URI for a SPARQL DESCRIBE Query.
Declaration
protected virtual string FormatDescribeVariablesList(SparqlQuery q)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a SPARQL Expression.
Declaration
protected virtual string FormatExpression(ISparqlExpression expr)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a SPARQL GROUP BY Clause.
Declaration
protected virtual string FormatGroupBy(ISparqlGroupBy groupBy)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats the Inline Data portion of a Query.
Declaration
protected virtual string FormatInlineData(BindingsPattern data)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Namespace Declaration.
Declaration
public override 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 |
|
Overrides
|
Improve this Doc
View Source
Formats a SPARQL ORDER BY Clause.
Declaration
protected virtual string FormatOrderBy(ISparqlOrderBy orderBy)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a SPARQL Property Path.
Declaration
protected virtual string FormatPath(ISparqlPath path)
Parameters
Type |
Name |
Description |
ISparqlPath |
path |
SPARQL Property Path. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Formats a Variable Node in SPARQL Syntax.
Declaration
protected override string FormatVariableNode(IVariableNode v, TripleSegment? segment)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
Formats the Variable List for a SPARQL Query.
Declaration
protected virtual string FormatVariablesList(IEnumerable<SparqlVariable> vars)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<SparqlVariable> |
vars |
Variables. |
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Determines whether a QName is valid.
Declaration
protected override bool IsValidQName(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
Value. |
Returns
Type |
Description |
System.Boolean |
|
Overrides
Implements
Extension Methods