Class SparqlExpressionFactory
Factory Class for generating Expressions for Sparql Extension Functions.
Inherited Members
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
Add
Properties
| Edit this page View SourceFactories
Gets the Global Custom Expression Factories that are in use.
Declaration
public static IEnumerable<ISparqlCustomExpressionFactory> Factories { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ISparql |
Methods
| Edit this page View SourceAddCustomFactory(ISparqlCustomExpressionFactory)
Registers a Custom Expression Factory.
Declaration
public static void AddCustomFactory(ISparqlCustomExpressionFactory factory)
Parameters
Type | Name | Description |
---|---|---|
ISparql |
factory | A Custom Expression Factory. |
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<ISparql |
args | List of Argument Expressions. |
bool | allowUnknownFunctions | Specifies whether functions that cannot be parsed into expressions should be represented by the Unknown |
Returns
Type | Description |
---|---|
ISparql |
Remarks
Uses only the globally scoped custom expression factories.
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<ISparql |
args | List of Argument Expressions. |
Dictionary<string, ISparql |
scalarArgs | Scalar Arguments. |
IEnumerable<ISparql |
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 Unknown |
Returns
Type | Description |
---|---|
ISparql |
Remarks
Globally scoped custom expression factories are tried first and then any locally scoped expression factories are used.
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<ISparql |
args | List of Argument Expressions. |
IEnumerable<ISparql |
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 Unknown |
Returns
Type | Description |
---|---|
ISparql |
Remarks
Globally scoped custom expression factories are tried first and then any locally scoped expression factories are used.