Examples of FunctionEnvBase


Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

    }

    private static void testNumeric(String string, int i)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( BindingFactory.binding() , new FunctionEnvBase()) ;
        assertTrue(v.isInteger()) ;
        assertEquals(i, v.getInteger().intValue()) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

    }
   
    private static void testNumeric(String string, BigDecimal decimal)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( BindingFactory.binding() , new FunctionEnvBase()) ;
        assertTrue(v.isDecimal()) ;
        assertEquals(decimal, v.getDecimal()) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

    }

    private static void testNumeric(String string, BigInteger integer)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( BindingFactory.binding() , new FunctionEnvBase()) ;
        assertTrue(v.isInteger()) ;
        assertEquals(integer, v.getInteger()) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

        assertEquals(integer, v.getInteger()) ;
    }
    private static void testNumeric(String string, double d)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( BindingFactory.binding(), new FunctionEnvBase()) ;
        assertTrue(v.isDouble()) ;
        assertEquals(d, v.getDouble(),0) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

    }

    private static void testEval(String string)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( BindingFactory.binding(), new FunctionEnvBase()) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

    }

    private static void testBoolean(String string, boolean b, Binding env)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( env, new FunctionEnvBase()) ;
        assertTrue(v.isBoolean()) ;
        assertEquals(b, v.getBoolean()) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

    private static PrefixMapping pmap = ARQConstants.getGlobalPrefixMap() ;
   
    private static void test(String string, String result)
    {
        Expr expr = ExprUtils.parse(string, pmap) ;
        NodeValue nv = expr.eval(null, new FunctionEnvBase()) ;
        Node r = NodeFactory.parseNode(result) ;
        NodeValue nvr = NodeValue.makeNode(r) ;
       
        assertTrue("Not same value: Expected: "+nvr+" : Actual = "+nv, NodeValue.sameAs(nvr, nv))
        // test result must be lexical form exact.
View Full Code Here

Examples of com.hp.hpl.jena.sparql.function.FunctionEnvBase

    private static PrefixMapping pmap = ARQConstants.getGlobalPrefixMap() ;
   
    private static void test(String string, String result)
    {
        Expr expr = ExprUtils.parse(string, pmap) ;
        NodeValue nv = expr.eval(null, new FunctionEnvBase()) ;
        Node r = NodeFactoryExtra.parseNode(result) ;
        NodeValue nvr = NodeValue.makeNode(r) ;
       
        assertTrue("Not same value: Expected: "+nvr+" : Actual = "+nv, NodeValue.sameAs(nvr, nv))
        // test result must be lexical form exact.
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.