Package org.openrdf.query.algebra

Examples of org.openrdf.query.algebra.ValueExpr


  @Override
  public IsBNode visit(ASTIsBlank node, Object data)
    throws VisitorException
  {
    ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null);
    return new IsBNode(arg);
  }
View Full Code Here


  @Override
  public IsLiteral visit(ASTIsLiteral node, Object data)
    throws VisitorException
  {
    ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null);
    return new IsLiteral(arg);
  }
View Full Code Here

  @Override
  public Object visit(ASTRegexExpression node, Object data)
    throws VisitorException
  {
    ValueExpr arg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null);
    ValueExpr pattern = (ValueExpr)node.jjtGetChild(1).jjtAccept(this, null);
    ValueExpr flags = null;
    if (node.jjtGetNumChildren() > 2) {
      flags = (ValueExpr)node.jjtGetChild(2).jjtAccept(this, null);
    }
    return new Regex(arg, pattern, flags);
  }
View Full Code Here

  @Override
  public void meet(MathExpr node)
    throws UnsupportedRdbmsOperatorException
  {
    boolean divide = node.getOperator().equals(MathExpr.MathOp.DIVIDE);
    ValueExpr left = node.getLeftArg();
    ValueExpr right = node.getRightArg();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(in(str(DOUBLE), type(left), type(right)), str(DOUBLE));
    sqlCase.when(in(str(FLOAT), type(left), type(right)), str(FLOAT));
    sqlCase.when(in(str(DECIMAL), type(left), type(right)), str(DECIMAL));
    sqlCase.when(new TrueValue(), divide ? str(DECIMAL) : str(INTEGER));
View Full Code Here

  @Override
  public void meet(Compare compare)
    throws UnsupportedRdbmsOperatorException
  {
    ValueExpr left = compare.getLeftArg();
    ValueExpr right = compare.getRightArg();
    CompareOp op = compare.getOperator();
    switch (op) {
      case EQ:
        if (isTerm(left) && isTerm(right)) {
          result = termsEqual(left, right);
View Full Code Here

  @Override
  public void meet(LangMatches node)
    throws UnsupportedRdbmsOperatorException
  {
    ValueExpr left = node.getLeftArg();
    ValueExpr right = node.getRightArg();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(eq(label(right), str("*")), neq(label(left), str("")));
    SqlExpr pattern = concat(lowercase(label(right)), str("%"));
    sqlCase.when(new TrueValue(), like(label(left), pattern));
    result = sqlCase;
View Full Code Here

  @Override
  public void meet(SameTerm node)
    throws UnsupportedRdbmsOperatorException, RdbmsException
  {
    ValueExpr left = node.getLeftArg();
    ValueExpr right = node.getRightArg();
    boolean leftIsVar = left instanceof Var;
    boolean rightIsVar = right instanceof Var;
    boolean leftIsConst = left instanceof ValueConstant;
    boolean rightIsConst = right instanceof ValueConstant;
    if (leftIsVar && rightIsVar) {
View Full Code Here

  @Override
  public void meet(Str str)
    throws UnsupportedRdbmsOperatorException
  {
    ValueExpr arg = str.getArg();
    result = coalesce(uri(arg), createLabelExpr(arg));
  }
View Full Code Here

  public void run() {
    evaluationThread = Thread.currentThread();
    try {
      BindingSet leftBindings;
      ValueExpr condition = join.getCondition();
      while (!closed && (leftBindings = leftIter.next()) != null) {
        Cursor<BindingSet> result = strategy.evaluate(join.getRightArg(), leftBindings);
        if (condition != null) {
          result = new FilterCursor(result, condition, scopeBindingNames, strategy);
        }
View Full Code Here

    String left = leftIter.toString().replace("\n", "\n\t");
    String right = join.getRightArg().toString();
    if (rightIter != null) {
      right = rightIter.toString();
    }
    ValueExpr condition = join.getCondition();
    String filter = "";
    if (condition != null) {
      filter = condition.toString().trim().replace("\n", "\n\t");
    }
    return "ParallelLeftJoin " + filter + "\n\t" + left + "\n\t" + right.replace("\n", "\n\t");
  }
View Full Code Here

TOP

Related Classes of org.openrdf.query.algebra.ValueExpr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.