Class SparqlOperators
Registry of SPARQL Operators.
Inheritance
Inherited Members
Namespace: VDS.RDF.Query.Operators
Assembly: dotNetRdf.dll
Syntax
public static class SparqlOperators
Methods
| Improve this Doc View SourceAddOperator(ISparqlOperator)
Registers a new operator.
Declaration
public static void AddOperator(ISparqlOperator op)
Parameters
Type | Name | Description |
---|---|---|
ISparqlOperator | op | Operator. |
GetOperators()
Gets all registered Operators.
Declaration
public static IEnumerable<ISparqlOperator> GetOperators()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ISparqlOperator> |
GetOperators(SparqlOperatorType)
Gets all registered operators for the given Operator Type.
Declaration
public static IEnumerable<ISparqlOperator> GetOperators(SparqlOperatorType type)
Parameters
Type | Name | Description |
---|---|---|
SparqlOperatorType | type | Operator Type. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ISparqlOperator> |
IsRegistered(ISparqlOperator)
Returns whether the given operator is registered.
Declaration
public static bool IsRegistered(ISparqlOperator op)
Parameters
Type | Name | Description |
---|---|---|
ISparqlOperator | op | Operator. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Checking is done both by reference and instance type so you can check if an operator is registered even if you don't have the actual reference to the instance that registered.
RemoveOperator(ISparqlOperator)
Removes the registration of an operator by instance reference.
Declaration
public static void RemoveOperator(ISparqlOperator op)
Parameters
Type | Name | Description |
---|---|---|
ISparqlOperator | op | Operator Reference. |
RemoveOperatorByType(ISparqlOperator)
Removes the registration of an operator by instance type of the operator.
Declaration
public static void RemoveOperatorByType(ISparqlOperator op)
Parameters
Type | Name | Description |
---|---|---|
ISparqlOperator | op | Operator. |
Reset()
Resets Operator registry to default state.
Declaration
public static void Reset()
TryGetOperator(SparqlOperatorType, bool, out ISparqlOperator, params IValuedNode[])
Tries to return the operator which applies for the given inputs.
Declaration
public static bool TryGetOperator(SparqlOperatorType type, bool strict, out ISparqlOperator op, params IValuedNode[] ns)
Parameters
Type | Name | Description |
---|---|---|
SparqlOperatorType | type | Operator Type. |
System.Boolean | strict | If true, return only operators specified by the SPARQL specification. If false, also return operators that extend the SPARQL specification. |
ISparqlOperator | op | Operator. |
IValuedNode[] | ns | Inputs. |
Returns
Type | Description |
---|---|
System.Boolean |