Package com.hp.hpl.jena.reasoner

Examples of com.hp.hpl.jena.reasoner.InfGraph.find()


            "[r1: (a p b ) <- (a r b) ]"
        );
        Reasoner reasoner =  createReasoner(rules);
        InfGraph infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
            infgraph.find(a, null, null),
            new Object[] {
                new Triple(a, p, b),
                new Triple(a, r, b)
            } );
    }
View Full Code Here


        data.add(new Triple(b, p, c));
        data.add(new Triple(b, p, d));
        Reasoner reasoner =  createReasoner(rules);
        InfGraph infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
            infgraph.find(null, r, null),
            new Object[] {
                new Triple(a, r, c),
                new Triple(a, r, d)
            } );
        Graph ndata = Factory.createGraphMem();
View Full Code Here

        Graph ndata = Factory.createGraphMem();
        ndata.add(new Triple(a, p, d));
        ndata.add(new Triple(d, p, b));
        infgraph.rebind(ndata);
        TestUtil.assertIteratorValues(this,
            infgraph.find(null, r, null),
            new Object[] {
                new Triple(a, r, b)
            } );

    }
View Full Code Here

        "[rdfs7:  (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf ?a)]"
                        );       
        Reasoner reasoner =  createReasoner(rules);
        InfGraph infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
            infgraph.find(null, sC, null),
            new Object[] {
                new Triple(C1, sC, C2),
                new Triple(C1, sC, C3),
                new Triple(C1, sC, C1),
                new Triple(C2, sC, C3),
View Full Code Here

        "[rdfs7:  (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf ?a)]"
                        );       
        Reasoner reasoner =  createReasoner(rules);
        InfGraph infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
            infgraph.find(a, ty, null),
            new Object[] {
                new Triple(a, ty, C1),
                new Triple(a, ty, C2),
                new Triple(a, ty, C3)
            } );
View Full Code Here

                new Triple(a, ty, C1),
                new Triple(a, ty, C2),
                new Triple(a, ty, C3)
            } );
        TestUtil.assertIteratorValues(this,
            infgraph.find(C1, sC, a),
            new Object[] {
            } );
    }

    /**
 
View Full Code Here

            "[r2: (?y p f(a ?y)) <- (c q ?y)]"
                          );       
        Reasoner reasoner =  createReasoner(rules);
        InfGraph infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
              infgraph.find(c, r, null), new Object[] { } );
             
        data.add(new Triple(c, q, a));
        rules = Rule.parseRules(
        "[r1: (c r ?x) <- (?x p f(?x a))]" +
        "[r2: (?y p f(a ?y)) <- (c q ?y)]"
View Full Code Here

        "[r2: (?y p f(a ?y)) <- (c q ?y)]"
                          );       
        reasoner =  createReasoner(rules);
        infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
              infgraph.find(c, r, null),
              new Object[] {
                  new Triple(c, r, a)
              } );
           
        data = Factory.createGraphMem();
View Full Code Here

          "[r2: (?x p ?y) <- (a q ?x), (b q ?y)]"
                          );       
        reasoner =  createReasoner(rules);
        infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
              infgraph.find(c, r, null),
              new Object[] {
                  new Triple(c, r, b)
              } );
             
        rules = Rule.parseRules(
View Full Code Here

          "[r2: (a p ?x) <- (a q ?x)]"
                          );       
        reasoner =  createReasoner(rules);
        infgraph = reasoner.bind(data);
        TestUtil.assertIteratorValues(this,
              infgraph.find(c, r, null),
              new Object[] {
                  new Triple(c, r, a)
              } );
    }
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.