Class IfElseFunction
Class representing the SPARQL IF function.
Implements
Inherited Members
Namespace: VDS.RDF.Query.Expressions.Functions.Sparql
Assembly: dotNetRdf.dll
Syntax
public class IfElseFunction : ISparqlExpression
Constructors
| Edit this page View SourceIfElseFunction(ISparqlExpression, ISparqlExpression, ISparqlExpression)
Creates a new IF function.
Declaration
public IfElseFunction(ISparqlExpression condition, ISparqlExpression ifBranch, ISparqlExpression elseBranch)
Parameters
| Type | Name | Description |
|---|---|---|
| ISparqlExpression | condition | Condition. |
| ISparqlExpression | ifBranch | Expression to evaluate if condition evaluates to true. |
| ISparqlExpression | elseBranch | Expression to evalaute if condition evaluates to false/error. |
Properties
| Edit this page View SourceArguments
Gets the Arguments of the Expression.
Declaration
public IEnumerable<ISparqlExpression> Arguments { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<ISparqlExpression> |
CanParallelise
Gets whether an expression can safely be evaluated in parallel.
Declaration
public virtual bool CanParallelise { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ConditionExpression
Get the condition to test.
Declaration
public ISparqlExpression ConditionExpression { get; }
Property Value
| Type | Description |
|---|---|
| ISparqlExpression |
FalseBranchExpression
Get the expression to evaluate if ConditionExpression evaluates to false.
Declaration
public ISparqlExpression FalseBranchExpression { get; }
Property Value
| Type | Description |
|---|---|
| ISparqlExpression |
Functor
Gets the Functor for the Expression.
Declaration
public string Functor { get; }
Property Value
| Type | Description |
|---|---|
| string |
TrueBranchExpression
Get the expression to evaluate if ConditionExpression evaluates to true.
Declaration
public ISparqlExpression TrueBranchExpression { get; }
Property Value
| Type | Description |
|---|---|
| ISparqlExpression |
Type
Gets the Expression Type.
Declaration
public SparqlExpressionType Type { get; }
Property Value
| Type | Description |
|---|---|
| SparqlExpressionType |
Variables
Gets the enumeration of variables used in the expression.
Declaration
public IEnumerable<string> Variables { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<string> |
Methods
| Edit this page View SourceAccept<T>(ISparqlExpressionVisitor<T>)
Accept a ISparqlExpressionVisitor<T> by calling the appropriate method on its interface for this expression.
Declaration
public T Accept<T>(ISparqlExpressionVisitor<T> visitor)
Parameters
| Type | Name | Description |
|---|---|---|
| ISparqlExpressionVisitor<T> | visitor | The visitor to be invoked. |
Returns
| Type | Description |
|---|---|
| T | The result of calling the method on the visitor. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of result that the called method returns. |
Accept<TResult, TContext, TBinding>(ISparqlExpressionProcessor<TResult, TContext, TBinding>, TContext, TBinding)
Accept a ISparqlExpressionProcessor<TResult, TContext, TBinding> by calling the appropriate method on its interface for this expression.
Declaration
public TResult Accept<TResult, TContext, TBinding>(ISparqlExpressionProcessor<TResult, TContext, TBinding> processor, TContext context, TBinding binding)
Parameters
| Type | Name | Description |
|---|---|---|
| ISparqlExpressionProcessor<TResult, TContext, TBinding> | processor | The processor to be invoked. |
| TContext | context | The context object to use for processing. |
| TBinding | binding | The binding to be processed. |
Returns
| Type | Description |
|---|---|
| TResult |
Type Parameters
| Name | Description |
|---|---|
| TResult | Type of result that the process method returns. |
| TContext | The type of the context parameter to the process method. |
| TBinding | The type of the binding parameter of the process method. |
ToString()
Gets the String representation of the function.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
| Edit this page View SourceTransform(IExpressionTransformer)
Transforms the Expression using the given Transformer.
Declaration
public ISparqlExpression Transform(IExpressionTransformer transformer)
Parameters
| Type | Name | Description |
|---|---|---|
| IExpressionTransformer | transformer | Expression Transformer. |
Returns
| Type | Description |
|---|---|
| ISparqlExpression |