use of org.apache.jena.tdb.index.IndexParams in project jena by apache.
the class IndexAssembler method open.
@Override
public TupleIndex open(Assembler a, Resource root, Mode mode) {
exactlyOneProperty(root, pDescription);
String desc = getAsStringValue(root, pDescription).toUpperCase(Locale.ENGLISH);
exactlyOneProperty(root, pFile);
String filename = getAsStringValue(root, pFile);
// Need to get location from the enclosing PGraphAssembler
if (location != null)
filename = location.absolute(filename);
String primary = null;
RecordFactory rf = null;
switch(desc.length()) {
case 3:
primary = Names.primaryIndexTriples;
rf = SystemTDB.indexRecordTripleFactory;
break;
case 4:
primary = Names.primaryIndexQuads;
rf = SystemTDB.indexRecordQuadFactory;
break;
default:
throw new TDBException("Bad length for index description: " + desc);
}
// Problems with spotting the index technology.
// FileSet.fromFilename(filename) ;
FileSet fileset = null;
IndexParams idxParams = StoreParams.getDftStoreParams();
RangeIndex rIndex = IndexFactory.buildRangeIndex(fileset, rf, idxParams);
return new TupleIndexRecord(desc.length(), new ColumnMap(primary, desc), desc, rf, rIndex);
}
use of org.apache.jena.tdb.index.IndexParams in project jena by apache.
the class TestTupleIndexRecord method createIndex.
@Override
protected TupleIndexRecord createIndex(String description) {
IndexParams indexParams = StoreParams.getDftStoreParams();
RangeIndex rIdx = IndexFactory.buildRangeIndex(FileSet.mem(), factory, indexParams);
ColumnMap cmap = new ColumnMap("SPO", description);
TupleIndexRecord index = new TupleIndexRecord(3, cmap, description, factory, rIdx);
return index;
}
use of org.apache.jena.tdb.index.IndexParams in project jena by apache.
the class TestTupleIndexRecordDirect method create.
static TupleIndexRecord create(String description) {
IndexParams indexParams = StoreParams.getDftStoreParams();
RangeIndex rIdx = IndexFactory.buildRangeIndex(FileSet.mem(), factory, indexParams);
ColumnMap cmap = new ColumnMap("SPO", description);
TupleIndexRecord index = new TupleIndexRecord(3, cmap, description, factory, rIdx);
return index;
}
Aggregations