Search in sources :

Example 1 with Index

use of org.apache.jena.dboe.index.Index in project jena by apache.

the class BuildTestLib method makeNodeTableBase.

public static NodeTable makeNodeTableBase(Location location, String basename, StoreParams params) {
    RecordFactory recordFactory = new RecordFactory(SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId);
    FileSet fs = new FileSet(location, basename);
    Index index = buildRangeIndex(fs, recordFactory, params);
    BinaryDataFile bdf = createBinaryDataFile(location, basename + "-data");
    NodeTable nt = new NodeTableTRDF(index, bdf);
    return nt;
}
Also used : NodeTableTRDF(org.apache.jena.tdb2.store.nodetable.NodeTableTRDF) RecordFactory(org.apache.jena.dboe.base.record.RecordFactory) RangeIndex(org.apache.jena.dboe.index.RangeIndex) Index(org.apache.jena.dboe.index.Index) NodeTable(org.apache.jena.tdb2.store.nodetable.NodeTable)

Example 2 with Index

use of org.apache.jena.dboe.index.Index in project jena by apache.

the class IndexTestLib method testInsert.

public static Index testInsert(IndexMaker maker, int[] keys) {
    Index index = maker.makeIndex();
    testInsert(index, keys);
    return index;
}
Also used : RangeIndex(org.apache.jena.dboe.index.RangeIndex) Index(org.apache.jena.dboe.index.Index)

Example 3 with Index

use of org.apache.jena.dboe.index.Index in project jena by apache.

the class IndexTestLib method buildIndex.

// ---------- Utilities
// public static RangeIndex buildRangeIndex(RangeIndexMaker maker, int[]
// keys)
// {
// RangeIndex index = maker.make();
// IndexTestLib.add(index, keys);
// return index;
// }
public static Index buildIndex(IndexMaker maker, int[] keys) {
    Index index = maker.makeIndex();
    IndexTestLib.add(index, keys);
    return index;
}
Also used : RangeIndex(org.apache.jena.dboe.index.RangeIndex) Index(org.apache.jena.dboe.index.Index)

Example 4 with Index

use of org.apache.jena.dboe.index.Index in project jena by apache.

the class AbstractTestIndex method index_find_2.

@Test
public void index_find_2() {
    int[] keys = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    Index index = test(keys);
    Record r = intToRecord(20, RecordLib.TestRecordLength);
    r = index.find(r);
    assertNull(r);
}
Also used : Index(org.apache.jena.dboe.index.Index) RecordLib.intToRecord(org.apache.jena.dboe.test.RecordLib.intToRecord) Record(org.apache.jena.dboe.base.record.Record) Test(org.junit.Test)

Example 5 with Index

use of org.apache.jena.dboe.index.Index in project jena by apache.

the class AbstractTestIndex method index_find_1.

@Test
public void index_find_1() {
    int[] keys = { 1 };
    Index index = test(keys);
    Record r = intToRecord(1, RecordLib.TestRecordLength);
    r = index.find(r);
    assertNotNull(r);
}
Also used : Index(org.apache.jena.dboe.index.Index) RecordLib.intToRecord(org.apache.jena.dboe.test.RecordLib.intToRecord) Record(org.apache.jena.dboe.base.record.Record) Test(org.junit.Test)

Aggregations

Index (org.apache.jena.dboe.index.Index)7 RangeIndex (org.apache.jena.dboe.index.RangeIndex)5 NodeTableTRDF (org.apache.jena.tdb2.store.nodetable.NodeTableTRDF)3 Record (org.apache.jena.dboe.base.record.Record)2 RecordFactory (org.apache.jena.dboe.base.record.RecordFactory)2 RecordLib.intToRecord (org.apache.jena.dboe.test.RecordLib.intToRecord)2 TupleIndex (org.apache.jena.tdb2.store.tupletable.TupleIndex)2 Test (org.junit.Test)2 BPlusTree (org.apache.jena.dboe.trans.bplustree.BPlusTree)1 TransBinaryDataFile (org.apache.jena.dboe.trans.data.TransBinaryDataFile)1 NodeTable (org.apache.jena.tdb2.store.nodetable.NodeTable)1