TripleTable extends TableBase { public boolean add( Triple triple ) { return add(triple.getSubject(), triple.getPredicate(), triple.getObject()) ; } TripleTable(TupleIndex[] indexes, NodeTable nodeTable, DatasetControl policy); boolean add( Triple triple ); boolean add(Node s, Node p, Node o); boolean delete( Triple triple ); boolean delete(Node s, Node p, Node o); Iterator<Triple> find(Node s, Node p, Node o); void clearTriples();  }
@Test public void add1() { TripleTable table = createTripleTableMem() ; table.add(new Triple(n1,n2,n3)) ; }
@Test public void find1() { TripleTable table = createTripleTableMem() ; add(table, n1, n2, n3) ; contains(table, n1, n2, n3) ; notMatch(table, n1, n2, n4) ; }
@Test public void find2() { TripleTable table = createTripleTableMem() ; add(table, n1, n2, n3) ; add(table, n1, n2, n4) ; contains(table, n1, n2, n3) ; contains(table, n1, n2, n4) ; }
@Test public void find3() { TripleTable table = createTripleTableMem() ; add(table, n1, n2, n3) ; add(table, n4, n5, n6) ; contains(table, n1, n2, n3) ; contains(table, n4, n5, n6) ; notMatch(table, n1, n2, n4) ; }
@Test public void find4() { TripleTable table = createTripleTableMem() ; add(table, n1, n2, n3) ; add(table, n4, n5, n6) ; match(table, Node.ANY, n2, n3) ; match(table, null, n2, n3) ; match(table, null, null, null) ; }