Show / Hide Table of Contents

Class SparqlExpressionFactory

Factory Class for generating Expressions for Sparql Extension Functions.

Inheritance
System.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

| Improve this Doc View Source

Factories

Gets the Global Custom Expression Factories that are in use.

Declaration
public static IEnumerable<ISparqlCustomExpressionFactory> Factories { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><ISparqlCustomExpressionFactory>
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.

Methods

| Improve this Doc 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.

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.

| Improve this Doc 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
System.Uri u

Function Uri.

System.Collections.Generic.List<T><ISparqlExpression> args

List of Argument Expressions.

System.Boolean 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.

| Improve this Doc 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
System.Uri u

Function Uri.

System.Collections.Generic.List<T><ISparqlExpression> args

List of Argument Expressions.

System.Collections.Generic.Dictionary<TKey, TValue><string, ISparqlExpression> scalarArgs

Scalar Arguments.

System.Collections.Generic.IEnumerable<T><ISparqlCustomExpressionFactory> factories

Enumeration of locally scoped expression factories to use.

System.Boolean 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.

| Improve this Doc 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
System.Uri u

Function Uri.

System.Collections.Generic.List<T><ISparqlExpression> args

List of Argument Expressions.

System.Collections.Generic.IEnumerable<T><ISparqlCustomExpressionFactory> factories

Enumeration of locally scoped expression factories to use.

System.Boolean 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.

  • Improve this Doc
  • 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