Package org.openrdf.query.algebra

Examples of org.openrdf.query.algebra.ValueExpr


    throws VisitorException
  {
    Or or = new Or();

    for (ASTBooleanExpr expr : node.getOperandList()) {
      ValueExpr arg = (ValueExpr)expr.jjtAccept(this, null);
      or.addArg(arg);
    }

    return or;
  }
View Full Code Here


    throws VisitorException
  {
    And and = new And();

    for (ASTBooleanExpr expr : node.getOperandList()) {
      ValueExpr arg = (ValueExpr)expr.jjtAccept(this, null);
      and.addArg(arg);
    }

    return and;
  }
View Full Code Here

  @Override
  public Compare visit(ASTCompare node, Object data)
    throws VisitorException
  {
    ValueExpr leftArg = (ValueExpr)node.getLeftOperand().jjtAccept(this, null);
    ValueExpr rightArg = (ValueExpr)node.getRightOperand().jjtAccept(this, null);
    CompareOp operator = node.getOperator().getValue();

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

  @Override
  public CompareAny visit(ASTCompareAny node, Object data)
    throws VisitorException
  {
    ValueExpr valueExpr = (ValueExpr)node.getLeftOperand().jjtAccept(this, null);
    TupleExpr tupleExpr = (TupleExpr)node.getRightOperand().jjtAccept(this, null);
    CompareOp op = node.getOperator().getValue();

    return new CompareAny(valueExpr, tupleExpr, op);
  }
View Full Code Here

  @Override
  public CompareAll visit(ASTCompareAll node, Object data)
    throws VisitorException
  {
    ValueExpr valueExpr = (ValueExpr)node.getLeftOperand().jjtAccept(this, null);
    TupleExpr tupleExpr = (TupleExpr)node.getRightOperand().jjtAccept(this, null);
    CompareOp op = node.getOperator().getValue();

    return new CompareAll(valueExpr, tupleExpr, op);
  }
View Full Code Here

  @Override
  public Regex visit(ASTLike node, Object data)
    throws VisitorException
  {
    ValueExpr expr = (ValueExpr)node.getValueExpr().jjtAccept(this, null);
    String pattern = (String)node.getPattern().jjtAccept(this, null);
    boolean caseSensitive = !node.ignoreCase();

    return new Regex(expr, pattern, caseSensitive);
  }
View Full Code Here

  @Override
  public In visit(ASTIn node, Object data)
    throws VisitorException
  {
    ValueExpr valueExpr = (ValueExpr)node.getLeftOperand().jjtAccept(this, null);
    TupleExpr tupleExpr = (TupleExpr)node.getRightOperand().jjtAccept(this, null);
    return new In(valueExpr, tupleExpr);
  }
View Full Code Here

    throws ValueExprEvaluationException, StoreException
  {
    Value arg = evaluate(node.getArg(), bindings);
    Value parg = evaluate(node.getPatternArg(), bindings);
    Value farg = null;
    ValueExpr flagsArg = node.getFlagsArg();
    if (flagsArg != null) {
      farg = evaluate(flagsArg, bindings);
    }

    if (QueryEvaluationUtil.isSimpleLiteral(arg) && QueryEvaluationUtil.isSimpleLiteral(parg)
View Full Code Here

    if (constraints.isEmpty()) {
      optTE = new OptionalTupleExpr(tupleExpr);
    }
    else {
      ValueExpr constraint = new And(constraints);

      optTE = new OptionalTupleExpr(tupleExpr, constraint);
    }

    optionalTEs.add(optTE);
View Full Code Here

      if (filter.getCondition() instanceof SameTerm) {
        // SameTerm applies to the filter's argument
        SameTerm sameTerm = (SameTerm)filter.getCondition();
        TupleExpr filterArg = filter.getArg();

        ValueExpr leftArg = sameTerm.getLeftArg();
        ValueExpr rightArg = sameTerm.getRightArg();

        // Verify that vars are (potentially) bound by filterArg
        Set<String> bindingNames = filterArg.getBindingNames();
        if (leftArg instanceof Var && !bindingNames.contains(((Var)leftArg).getName())
            || rightArg instanceof Var && !bindingNames.contains(((Var)rightArg).getName()))
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.