/// <summary> /// Makes triple from expression arguments /// </summary> /// <param name="m">method call arguments</param> /// <returns></returns> private Triple MakeTripleFromArguments(MethodCallExpression m) { return(SPARQL.Triple((string)((ConstantExpression)m.Arguments[1]).Value, new List <string>() { string.Concat((string)((ConstantExpression)m.Arguments[2]).Value, " ", ((ConstantExpression)m.Arguments[3]).Value.ToString()) })); }
/// <summary> /// Evaluates Group expression /// </summary> /// <param name="m">method call expression</param> /// <returns>SPARQL Where clause item</returns> private IWhereItem VisitGroup(MethodCallExpression m) { var group = new Group( SPARQL.Triple((string)((ConstantExpression)m.Arguments[1]).Value, new List <string>() { string.Concat((string)((ConstantExpression)m.Arguments[2]).Value, " ", (string)((ConstantExpression)m.Arguments[3]).Value) }) ); return(group); }
/// <summary> /// Evaluates Either expression /// </summary> /// <param name="m">method call expression</param> /// <returns>SPARQL Where clause item</returns> private IWhereItem VisitEither(MethodCallExpression m) { var union = new Union( new Group( SPARQL.Triple((string)((ConstantExpression)m.Arguments[1]).Value, new List <string>() { string.Concat((string)((ConstantExpression)m.Arguments[2]).Value, " ", (string)((ConstantExpression)m.Arguments[3]).Value) }) ), null ); return(union); }