/// <summary> /// Gets the value of the expression as evaluated in the given Context for the given Binding ID /// </summary> /// <param name="context">SPARQL Evaluation Context</param> /// <param name="bindingID">Binding ID</param> /// <returns></returns> public IValuedNode Evaluate(SparqlEvaluationContext context, int bindingID) { IValuedNode result = this._condition.Evaluate(context, bindingID); //Condition evaluated without error so we go to the appropriate branch of the IF ELSE //depending on whether it evaluated to true or false if (result.AsSafeBoolean()) { return(this._ifBranch.Evaluate(context, bindingID)); } else { return(this._elseBranch.Evaluate(context, bindingID)); } }