Package org.openrdf.query.algebra

Examples of org.openrdf.query.algebra.TupleExpr


        List<ValueExpr> constraints = new ArrayList<ValueExpr>(16);
        getConjunctiveConstraints(condition, constraints);

        for (int i = constraints.size() - 1; i >= 0; i--) {
          ValueExpr constraint = constraints.get(i);
          TupleExpr right = node.getRightArg();
          Set<String> filterVars = new VarFinder(constraint).getVars();
          if (right.getBindingNames().containsAll(filterVars)) {
            node.setRightArg(new Filter(right.clone(), constraint.clone()));
          }
          else {
            and.addArg(constraint);
          }
        }
View Full Code Here


      super.meet(filter);

      List<ValueExpr> conjunctiveConstraints = new ArrayList<ValueExpr>(16);
      getConjunctiveConstraints(filter.getCondition(), conjunctiveConstraints);

      TupleExpr filterArg = filter.getArg();

      for (int i = conjunctiveConstraints.size() - 1; i >= 1; i--) {
        Filter newFilter = new Filter(filterArg, conjunctiveConstraints.get(i));
        filterArg = newFilter;
      }
View Full Code Here

  @Override
  public TupleExpr visit(ASTTupleUnion node, Object data)
    throws VisitorException
  {
    TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);

    TupleExpr result = new Union(leftArg, rightArg);

    if (node.isDistinct()) {
      result = new Distinct(result);
    }
View Full Code Here

  @Override
  public TupleExpr visit(ASTTupleMinus node, Object data)
    throws VisitorException
  {
    TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);

    return new Difference(leftArg, rightArg);
  }
View Full Code Here

  @Override
  public TupleExpr visit(ASTTupleIntersect node, Object data)
    throws VisitorException
  {
    TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);

    return new Intersection(leftArg, rightArg);
  }
View Full Code Here

  @Override
  public TupleExpr visit(ASTGraphUnion node, Object data)
    throws VisitorException
  {
    TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);

    TupleExpr result = new Union(leftArg, rightArg);

    if (node.isDistinct()) {
      result = new Distinct(result);
    }
View Full Code Here

  @Override
  public TupleExpr visit(ASTGraphMinus node, Object data)
    throws VisitorException
  {
    TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);

    return new Difference(leftArg, rightArg);
  }
View Full Code Here

  @Override
  public TupleExpr visit(ASTGraphIntersect node, Object data)
    throws VisitorException
  {
    TupleExpr leftArg = (TupleExpr)node.getLeftArg().jjtAccept(this, null);
    TupleExpr rightArg = (TupleExpr)node.getRightArg().jjtAccept(this, null);

    return new Intersection(leftArg, rightArg);
  }
View Full Code Here

  @Override
  public TupleExpr visit(ASTSelectQuery node, Object data)
    throws VisitorException
  {
    TupleExpr tupleExpr;

    ASTQueryBody queryBodyNode = node.getQueryBody();

    if (queryBodyNode != null) {
      // Build tuple expression for query body
View Full Code Here

  @Override
  public TupleExpr visit(ASTSelect node, Object data)
    throws VisitorException
  {
    TupleExpr result = (TupleExpr)data;

    Extension extension = new Extension();
    ProjectionElemList projElemList = new ProjectionElemList();

    for (ASTProjectionElem projElemNode : node.getProjectionElemList()) {
View Full Code Here

TOP

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

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.