Search in sources :

Example 1 with E_Bound

use of org.apache.jena.sparql.expr.E_Bound in project jena by apache.

the class ExprFactoryTest method boundTest_Object.

public void boundTest_Object() {
    Expr e = factory.bound("hello");
    assertTrue(e instanceof E_Bound);
    assertEquals("?hello", e.getVarName());
}
Also used : Expr(org.apache.jena.sparql.expr.Expr) E_Bound(org.apache.jena.sparql.expr.E_Bound)

Example 2 with E_Bound

use of org.apache.jena.sparql.expr.E_Bound in project jena by apache.

the class ExprFactoryTest method boundTest_ExprVar.

public void boundTest_ExprVar() {
    ExprVar ev = new ExprVar("hello");
    Expr e = factory.bound(ev);
    assertTrue(e instanceof E_Bound);
    assertEquals("?hello", e.getVarName());
}
Also used : ExprVar(org.apache.jena.sparql.expr.ExprVar) Expr(org.apache.jena.sparql.expr.Expr) E_Bound(org.apache.jena.sparql.expr.E_Bound)

Example 3 with E_Bound

use of org.apache.jena.sparql.expr.E_Bound in project jena by apache.

the class ExprFactoryTest method boundTest_Var.

// expr 1 functions
@Test
public void boundTest_Var() {
    Expr e = factory.bound(Var.alloc("hello"));
    assertTrue(e instanceof E_Bound);
    assertEquals("?hello", ((E_Bound) e).getArg().toString());
}
Also used : Expr(org.apache.jena.sparql.expr.Expr) E_Bound(org.apache.jena.sparql.expr.E_Bound) Test(org.junit.Test)

Aggregations

E_Bound (org.apache.jena.sparql.expr.E_Bound)3 Expr (org.apache.jena.sparql.expr.Expr)3 ExprVar (org.apache.jena.sparql.expr.ExprVar)1 Test (org.junit.Test)1