Examples of BindingVector


Examples of com.hp.hpl.jena.reasoner.rulesys.impl.BindingVector

        doTestUnify(gf, hf1, true, new Node[] {null, null, yh});
        doTestUnify(gf, hf2, false, null);
        doTestUnify(gf, hf3, true, new Node[] {null, b});
       
        // Check binding environment use
        BindingVector env = BindingVector.unify(g2, h1, MAX_VARS);
        env.bind(xh, c);
        assertEquals(env.getBinding(yh), c);
        env = BindingVector.unify(g2, h1, MAX_VARS);
        env.bind(yh, c);
        assertEquals(env.getBinding(xh), c);
    }
View Full Code Here

Examples of com.hp.hpl.jena.reasoner.rulesys.impl.BindingVector

     * @param succeed whether match should succeeed or fail
     * @param env list list of expected environment bindings
     *
     */
    private void doTestUnify(TriplePattern goal, TriplePattern head, boolean succeed, Node[] env) {
        BindingVector result = BindingVector.unify(goal, head, MAX_VARS);
        if (succeed) {
            assertNotNull(result);
            if (env != null) {
                for (int i = 0; i < env.length; i++) {
                    Node n = result.getEnvironment()[i];
                    if (env[i] != null) {
                        assertEquals(env[i], n);
                    } else {
                        assertNull(n);
                    }
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.