use of org.apache.jena.tdb.store.tupletable.TupleIndex in project jena by apache.
the class AbstractTestTupleIndex method TupleIndexRecordFindNot_2.
@Test
public void TupleIndexRecordFindNot_2() {
TupleIndex index = createIndex("SPO");
add(index, n1, n2, n3);
Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, n5, n6);
Iterator<Tuple<NodeId>> iter = index.find(tuple2);
assertFalse(iter.hasNext());
}
use of org.apache.jena.tdb.store.tupletable.TupleIndex in project jena by apache.
the class AbstractTestTupleIndex method TupleIndexRecordSPO_3.
@Test
public void TupleIndexRecordSPO_3() {
TupleIndex index = createIndex("SPO");
add(index, n1, n2, n3);
Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, null, n3);
Iterator<Tuple<NodeId>> iter = index.find(tuple2);
assertTrue(iter.hasNext());
iter.next();
assertFalse(iter.hasNext());
}
use of org.apache.jena.tdb.store.tupletable.TupleIndex in project jena by apache.
the class AbstractTestTupleIndex method TupleIndexRecordSPO_7.
@Test
public void TupleIndexRecordSPO_7() {
TupleIndex index = createIndex("SPO");
add(index, n1, n2, n3);
add(index, n1, n2, n4);
Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, NodeId.NodeIdAny, NodeId.NodeIdAny);
Iterator<Tuple<NodeId>> iter = index.find(tuple2);
Set<Tuple<NodeId>> x = Iter.toSet(iter);
assertEquals(2, x.size());
assertTrue(x.contains(TupleFactory.tuple(n1, n2, n3)));
assertTrue(x.contains(TupleFactory.tuple(n1, n2, n4)));
}
use of org.apache.jena.tdb.store.tupletable.TupleIndex in project jena by apache.
the class AbstractTestTupleIndex method TupleIndexRecordFindNot_5.
@Test
public void TupleIndexRecordFindNot_5() {
TupleIndex index = createIndex("SPO");
add(index, n1, n2, n3);
add(index, n1, n5, n6);
Tuple<NodeId> tuple2 = TupleFactory.tuple(n2, n5, n6);
Iterator<Tuple<NodeId>> iter = index.find(tuple2);
assertFalse(iter.hasNext());
}
use of org.apache.jena.tdb.store.tupletable.TupleIndex in project jena by apache.
the class AbstractTestTupleIndex method TupleIndexRecordFindNot_3.
@Test
public void TupleIndexRecordFindNot_3() {
TupleIndex index = createIndex("SPO");
add(index, n1, n2, n3);
Tuple<NodeId> tuple2 = TupleFactory.tuple(n1, null, n6);
Iterator<Tuple<NodeId>> iter = index.find(tuple2);
assertFalse(iter.hasNext());
}
Aggregations