Package com.hp.hpl.jena.tdb.index

Examples of com.hp.hpl.jena.tdb.index.TupleTable


   
    static private TupleTable create2()
    {
        TupleIndex idxSPO = TestTupleIndexRecord.create("SPO") ;
        TupleIndex x[] = { idxSPO } ;
        TupleTable table = new TupleTable(3, x) ;
        return table ;
    }
View Full Code Here


   
    @Test public void create1() { create() ; }
   
    @Test public void createFind1()
    {
        TupleTable table = create() ;
        add(table, n1, n2, n3) ;
        // Cast removes compile lint warning.
        Tuple<NodeId> pat = Tuple.create((NodeId)null, null, null) ;
        Iterator<Tuple<NodeId>> iter = table.find(pat) ;
        List<Tuple<NodeId>> x = Iter.toList(iter) ;
        int z = x.size() ;
        assertEquals(1, z) ;
        Tuple<NodeId> e1 = x.get(0) ;
        assertEquals(Tuple.create(n1, n2, n3) , e1) ;
View Full Code Here

        assertEquals(Tuple.create(n1, n2, n3) , e1) ;
    }
   
    @Test public void createFind2()
    {
        TupleTable table = create() ;
        add(table, n1, n2, n3) ;
        add(table, n1, n2, n4) ;

        Tuple<NodeId> pat = Tuple.create(null, n2, null) ;
        Iterator<Tuple<NodeId>> iter = table.find(pat) ;
        assertNotNull(iter) ;
        List<Tuple<NodeId>> x = Iter.toList(iter) ;
        int z = x.size() ;
        assertEquals(2, z) ;
       
View Full Code Here

    }
   
    @Test public void createFind3()
    {
        // test scan
        TupleTable table = create2() ;
        add(table, n1, n2, n3) ;
        add(table, n1, n2, n4) ;

        Tuple<NodeId> pat = Tuple.create(n1, null, n3) ;
        Iterator<Tuple<NodeId>> iter = table.find(pat) ;
        assertNotNull(iter) ;
        List<Tuple<NodeId>> x = Iter.toList(iter) ;
        int z = x.size() ;
        assertEquals(1, z) ;
       
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.index.TupleTable

Copyright © 2018 www.massapicom. 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.