Show / Hide Table of Contents

Class SparqlExpressionFactory

Factory Class for generating Expressions for Sparql Extension Functions.
Inheritance
System.Object
SparqlExpressionFactory
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)
System.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(ISparqlCustomExpressionFactory) method or locally by passing them to the three argument constructor of the CreateExpression(Uri, List<ISparqlExpression>, IEnumerable<ISparqlCustomExpressionFactory>) 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<ISparqlCustomExpressionFactory>

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

CreateExpression(Uri, List<ISparqlExpression>)

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)
Parameters
Type Name Description
System.Uri u Function Uri.
System.Collections.Generic.List<ISparqlExpression> args List of Argument Expressions.
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>)

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)
Parameters
Type Name Description
System.Uri u Function Uri.
System.Collections.Generic.List<ISparqlExpression> args List of Argument Expressions.
System.Collections.Generic.Dictionary<System.String, ISparqlExpression> scalarArgs Scalar Arguments.
System.Collections.Generic.IEnumerable<ISparqlCustomExpressionFactory> factories Enumeration of locally scoped expression factories to use.
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>)

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)
Parameters
Type Name Description
System.Uri u Function Uri.
System.Collections.Generic.List<ISparqlExpression> args List of Argument Expressions.
System.Collections.Generic.IEnumerable<ISparqlCustomExpressionFactory> factories Enumeration of locally scoped expression factories to use.
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>)
    • CreateExpression(Uri, List<ISparqlExpression>, Dictionary<String, ISparqlExpression>, IEnumerable<ISparqlCustomExpressionFactory>)
    • CreateExpression(Uri, List<ISparqlExpression>, IEnumerable<ISparqlCustomExpressionFactory>)
Back to top Generated by DocFX