Package org.openrdf.query.algebra

Examples of org.openrdf.query.algebra.ValueConstant


  @Override
  public ValueConstant visit(ASTBooleanConstant node, Object data)
    throws VisitorException
  {
    return new ValueConstant(valueFactory.createLiteral(node.getValue()));
  }
View Full Code Here


  @Override
  public FunctionCall visit(ASTFunctionCall node, Object data)
    throws VisitorException
  {
    ValueConstant vc = (ValueConstant)node.getURI().jjtAccept(this, null);
    assert vc.getValue() instanceof URI;

    FunctionCall functionCall = new FunctionCall(vc.getValue().toString());

    for (ASTValueExpr argExpr : node.getArgList()) {
      functionCall.addArg((ValueExpr)argExpr.jjtAccept(this, null));
    }
View Full Code Here

  @Override
  public ValueConstant visit(ASTURI node, Object data)
    throws VisitorException
  {
    return new ValueConstant(valueFactory.createURI(node.getValue()));
  }
View Full Code Here

  @Override
  public ValueConstant visit(ASTBNode node, Object data)
    throws VisitorException
  {
    return new ValueConstant(valueFactory.createBNode(node.getID()));
  }
View Full Code Here

    }
    else {
      literal = valueFactory.createLiteral(litNode.getLabel());
    }

    return new ValueConstant(literal);
  }
View Full Code Here

    for (Var var : constructVars) {
      if (var.isAnonymous() && !extElemMap.containsKey(var)) {
        ValueExpr valueExpr;

        if (var.hasValue()) {
          valueExpr = new ValueConstant(var.getValue());
        }
        else {
          valueExpr = new BNodeGenerator();
        }
View Full Code Here

  @Override
  public Object visit(ASTFunctionCall node, Object data)
    throws VisitorException
  {
    ValueConstant uriNode = (ValueConstant)node.jjtGetChild(0).jjtAccept(this, null);
    URI functionURI = (URI)uriNode.getValue();

    FunctionCall functionCall = new FunctionCall(functionURI.toString());

    for (int i = 1; i < node.jjtGetNumChildren(); i++) {
      Node argNode = node.jjtGetChild(i);
View Full Code Here

    catch (IllegalArgumentException e) {
      // invalid URI
      throw new VisitorException(e.getMessage());
    }

    return new ValueConstant(uri);
  }
View Full Code Here

    }
    else {
      literal = valueFactory.createLiteral(label);
    }

    return new ValueConstant(literal);
  }
View Full Code Here

  @Override
  public ValueConstant visit(ASTNumericLiteral node, Object data)
    throws VisitorException
  {
    Literal literal = valueFactory.createLiteral(node.getValue(), node.getDatatype());
    return new ValueConstant(literal);
  }
View Full Code Here

TOP

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

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.