Package org.openrdf.query.algebra

Examples of org.openrdf.query.algebra.And


      optTE = new OptionalTupleExpr(tupleExpr);
    }
    else {
      ValueExpr constraint = constraints.get(0);
      for (int i = 1; i < constraints.size(); i++) {
        constraint = new And(constraint, constraints.get(i));
      }

      optTE = new OptionalTupleExpr(tupleExpr, constraint);
    }
View Full Code Here


      filter.setArg(filterArg);
    }

    protected void getConjunctiveConstraints(ValueExpr valueExpr, List<ValueExpr> conjunctiveConstraints) {
      if (valueExpr instanceof And) {
        And and = (And)valueExpr;
        getConjunctiveConstraints(and.getLeftArg(), conjunctiveConstraints);
        getConjunctiveConstraints(and.getRightArg(), conjunctiveConstraints);
      }
      else {
        conjunctiveConstraints.add(valueExpr);
      }
    }
View Full Code Here

    ValueExpr result = (ValueExpr)iter.next().jjtAccept(this, null);

    while (iter.hasNext()) {
      ValueExpr operand = (ValueExpr)iter.next().jjtAccept(this, null);
      result = new And(result, operand);
    }

    return result;
  }
View Full Code Here

        catch (UnsupportedRdbmsOperatorException e) {
          if (condition == null) {
            condition = expr;
          }
          else {
            condition = new And(condition, expr);
          }
        }
      }
      if (condition == null) {
        node.replaceWith(node.getArg());
View Full Code Here

    return flatten(condition, new ArrayList<ValueExpr>());
  }

  private List<ValueExpr> flatten(ValueExpr condition, List<ValueExpr> conditions) {
    if (condition instanceof And) {
      And and = (And)condition;
      flatten(and.getLeftArg(), conditions);
      flatten(and.getRightArg(), conditions);
    }
    else {
      conditions.add(condition);
    }
    return conditions;
View Full Code Here

      leftJoin = new LeftJoin(leftArg, rightArg);
    }
    else {
      ValueExpr constraint = constraints.get(0);
      for (int i = 1; i < constraints.size(); i++) {
        constraint = new And(constraint, constraints.get(i));
      }

      leftJoin = new LeftJoin(leftArg, rightArg, constraint);
    }
View Full Code Here

  public Object visit(ASTAnd node, Object data)
    throws VisitorException
  {
    ValueExpr leftArg = (ValueExpr)node.jjtGetChild(0).jjtAccept(this, null);
    ValueExpr rightArg = (ValueExpr)node.jjtGetChild(1).jjtAccept(this, null);
    return new And(leftArg, rightArg);
  }
View Full Code Here

TOP

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

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.