Examples of when()


Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

  private SqlExpr effectiveBooleanValue(ValueExpr v)
    throws UnsupportedRdbmsOperatorException
  {
    String bool = XMLSchema.BOOLEAN.stringValue();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(eq(type(v), str(bool)), eq(label(v), str("true")));
    sqlCase.when(simple(type(v)), not(eq(label(v), str(""))));
    sqlCase.when(isNotNull(numeric(v)), not(eq(numeric(v), num(0))));
    return sqlCase;
  }
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

    throws UnsupportedRdbmsOperatorException
  {
    String bool = XMLSchema.BOOLEAN.stringValue();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(eq(type(v), str(bool)), eq(label(v), str("true")));
    sqlCase.when(simple(type(v)), not(eq(label(v), str(""))));
    sqlCase.when(isNotNull(numeric(v)), not(eq(numeric(v), num(0))));
    return sqlCase;
  }

  private SqlExpr equal(ValueExpr left, ValueExpr right)
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

  {
    String bool = XMLSchema.BOOLEAN.stringValue();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(eq(type(v), str(bool)), eq(label(v), str("true")));
    sqlCase.when(simple(type(v)), not(eq(label(v), str(""))));
    sqlCase.when(isNotNull(numeric(v)), not(eq(numeric(v), num(0))));
    return sqlCase;
  }

  private SqlExpr equal(ValueExpr left, ValueExpr right)
    throws UnsupportedRdbmsOperatorException
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

    throws UnsupportedRdbmsOperatorException
  {
    SqlExpr bnodes = eq(bNode(left), bNode(right));
    SqlExpr uris = eq(uri(left), uri(right));
    SqlCase scase = new SqlCase();
    scase.when(or(isNotNull(bNode(left)), isNotNull(bNode(right))), bnodes);
    scase.when(or(isNotNull(uri(left)), isNotNull(uri(right))), uris);
    return literalEqual(left, right, scase);
  }

  private boolean isTerm(ValueExpr node) {
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

  {
    SqlExpr bnodes = eq(bNode(left), bNode(right));
    SqlExpr uris = eq(uri(left), uri(right));
    SqlCase scase = new SqlCase();
    scase.when(or(isNotNull(bNode(left)), isNotNull(bNode(right))), bnodes);
    scase.when(or(isNotNull(uri(left)), isNotNull(uri(right))), uris);
    return literalEqual(left, right, scase);
  }

  private boolean isTerm(ValueExpr node) {
    return node instanceof Var || node instanceof ValueConstant;
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

    throws UnsupportedRdbmsOperatorException
  {
    SqlExpr bnodes = eqIfNotNull(bNode(left), bNode(right));
    SqlExpr uris = eqIfNotNull(uri(left), uri(right));
    SqlCase scase = new SqlCase();
    scase.when(or(isNotNull(bNode(left)), isNotNull(bNode(right))), bnodes);
    scase.when(or(isNotNull(uri(left)), isNotNull(uri(right))), uris);
    return literalEqual(left, right, scase);
  }

  private SqlExpr valueOf(Value value) {
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

  {
    SqlExpr bnodes = eqIfNotNull(bNode(left), bNode(right));
    SqlExpr uris = eqIfNotNull(uri(left), uri(right));
    SqlCase scase = new SqlCase();
    scase.when(or(isNotNull(bNode(left)), isNotNull(bNode(right))), bnodes);
    scase.when(or(isNotNull(uri(left)), isNotNull(uri(right))), uris);
    return literalEqual(left, right, scase);
  }

  private SqlExpr valueOf(Value value) {
    if (value instanceof Literal) {
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

  @Override
  public void meet(Lang node)
    throws UnsupportedRdbmsOperatorException
  {
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(isNotNull(lang(node.getArg())), lang(node.getArg()));
    sqlCase.when(isNotNull(createLabelExpr(node.getArg())), str(""));
    result = sqlCase;
  }

  @Override
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

  public void meet(Lang node)
    throws UnsupportedRdbmsOperatorException
  {
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(isNotNull(lang(node.getArg())), lang(node.getArg()));
    sqlCase.when(isNotNull(createLabelExpr(node.getArg())), str(""));
    result = sqlCase;
  }

  @Override
  public void meet(MathExpr node)
View Full Code Here

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.when()

  @Override
  public void meet(Datatype node)
    throws UnsupportedRdbmsOperatorException
  {
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(isNotNull(type(node.getArg())), type(node.getArg()));
    sqlCase.when(and(isNull(lang(node.getArg())), isNotNull(label(node.getArg()))),
        str(XMLSchema.STRING.stringValue()));
    result = sqlCase;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.