Show / Hide Table of Contents

Class SparqlExpressionFactory

Factory Class for generating Expressions for Sparql Extension Functions.

Inheritance
object
SparqlExpressionFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query.Expressions
Assembly: dotNetRdf.dll
Syntax
public static class SparqlExpressionFactory
Remarks

Allows for users of the Library to implement and register Custom Expression Factories which can generate Expressions for their own Extension functions which they wish to use in their SPARQL queries. Custom factories may be globally scoped by registering them with the AddCustomFactory() method or locally by passing them to the four argument constructor of the CreateExpression() method.

Properties

| Edit this page View Source

Factories

Gets the Global Custom Expression Factories that are in use.

Declaration
public static IEnumerable<ISparqlCustomExpressionFactory> Factories { get; }
Property Value
Type Description
IEnumerable<ISparqlCustomExpressionFactory>

Methods

| Edit this page View Source

AddCustomFactory(ISparqlCustomExpressionFactory)

Registers a Custom Expression Factory.

Declaration
public static void AddCustomFactory(ISparqlCustomExpressionFactory factory)
Parameters
Type Name Description
ISparqlCustomExpressionFactory factory

A Custom Expression Factory.

| Edit this page View Source

CreateExpression(Uri, List<ISparqlExpression>, bool)

Tries to create an Expression from the given function Uri and list of argument expressions.

Declaration
public static ISparqlExpression CreateExpression(Uri u, List<ISparqlExpression> args, bool allowUnknownFunctions)
Parameters
Type Name Description
Uri u

Function Uri.

List<ISparqlExpression> args

List of Argument Expressions.

bool allowUnknownFunctions

Specifies whether functions that cannot be parsed into expressions should be represented by the UnknownFunction.

Returns
Type Description
ISparqlExpression
Remarks

Uses only the globally scoped custom expression factories.

| Edit this page View Source

CreateExpression(Uri, List<ISparqlExpression>, Dictionary<string, ISparqlExpression>, IEnumerable<ISparqlCustomExpressionFactory>, bool)

Tries to create an Expression from the given function Uri and list of argument expressions.

Declaration
public static ISparqlExpression CreateExpression(Uri u, List<ISparqlExpression> args, Dictionary<string, ISparqlExpression> scalarArgs, IEnumerable<ISparqlCustomExpressionFactory> factories, bool allowUnknownFunctions)
Parameters
Type Name Description
Uri u

Function Uri.

List<ISparqlExpression> args

List of Argument Expressions.

Dictionary<string, ISparqlExpression> scalarArgs

Scalar Arguments.

IEnumerable<ISparqlCustomExpressionFactory> factories

Enumeration of locally scoped expression factories to use.

bool allowUnknownFunctions

Specifies whether functions that cannot be parsed into expressions should be represented by the UnknownFunction.

Returns
Type Description
ISparqlExpression
Remarks

Globally scoped custom expression factories are tried first and then any locally scoped expression factories are used.

| Edit this page View Source

CreateExpression(Uri, List<ISparqlExpression>, IEnumerable<ISparqlCustomExpressionFactory>, bool)

Tries to create an Expression from the given function Uri and list of argument expressions.

Declaration
public static ISparqlExpression CreateExpression(Uri u, List<ISparqlExpression> args, IEnumerable<ISparqlCustomExpressionFactory> factories, bool allowUnknownFunctions)
Parameters
Type Name Description
Uri u

Function Uri.

List<ISparqlExpression> args

List of Argument Expressions.

IEnumerable<ISparqlCustomExpressionFactory> factories

Enumeration of locally scoped expression factories to use.

bool allowUnknownFunctions

Specifies whether functions that cannot be parsed into expressions should be represented by the UnknownFunction.

Returns
Type Description
ISparqlExpression
Remarks

Globally scoped custom expression factories are tried first and then any locally scoped expression factories are used.

  • Edit this page
  • View Source
In this article
  • Properties
    • Factories
  • Methods
    • AddCustomFactory(ISparqlCustomExpressionFactory)
    • CreateExpression(Uri, List<ISparqlExpression>, bool)
    • CreateExpression(Uri, List<ISparqlExpression>, Dictionary<string, ISparqlExpression>, IEnumerable<ISparqlCustomExpressionFactory>, bool)
    • CreateExpression(Uri, List<ISparqlExpression>, IEnumerable<ISparqlCustomExpressionFactory>, bool)
Back to top Generated by DocFX