Examples of FunctionEnvBase


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

    }

    private static void testString(String string, String string2)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( env, new FunctionEnvBase()) ;
        assertTrue(v.isString()) ;
        assertEquals(string2, v.getString()) ;
    }
View Full Code Here

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

    }

    private static void testString(String string)
    {
        Expr expr = parse(string) ;
        NodeValue v = expr.eval( env, new FunctionEnvBase()) ;
        assertTrue(v.isString()) ;
    }
View Full Code Here

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

        test(string, r);
    }

    private static void test(String string, Node result) {
        Expr expr = ExprUtils.parse(string, pmap);
        NodeValue nv = expr.eval(null, new FunctionEnvBase());
        NodeValue nvr = NodeValue.makeNode(result);

        // Note that we don't test lexical form because we can get mismatches
        // between how things like doubles are expressed
        assertTrue("Not same value: Expected: " + nvr + " : Actual = " + nv, NodeValue.sameAs(nvr, nv));
View Full Code Here

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

    }
   
    public BindingComparator(List<SortCondition> _conditions)
    {
        conditions = _conditions ;
        this.env = new FunctionEnvBase();
    }
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

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
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.