use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class TDB2StorageBuilder method buildPrefixTable.
private StoragePrefixesTDB buildPrefixTable(NodeTable prefixNodes) {
String primary = params.getPrimaryIndexPrefix();
String[] indexes = params.getPrefixIndexes();
TupleIndex[] prefixIndexes = makeTupleIndexes(primary, indexes);
if (prefixIndexes.length != 1)
error(log, "Wrong number of triple table tuples indexes: " + prefixIndexes.length);
// No cache - the prefix mapping is a cache
// NodeTable prefixNodes = makeNodeTable(location, pnNode2Id, pnId2Node, -1, -1, -1);
NodeTupleTable prefixTable = new NodeTupleTableConcrete(primary.length(), prefixIndexes, prefixNodes);
StoragePrefixesTDB x = new StoragePrefixesTDB(txnSystem, prefixTable);
// DatasetPrefixesTDB prefixes = new DatasetPrefixesTDB(prefixTable);
log.debug("Prefixes: " + primary + " :: " + String.join(",", indexes));
return x;
}
use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class TestNodeTableStored method createEmptyNodeTable.
@Override
protected NodeTable createEmptyNodeTable() {
FileOps.ensureDir(location.getDirectoryPath());
FileOps.clearDirectory(location.getDirectoryPath());
StoreParams params = StoreParamsBuilder.create().nodeId2NodeCacheSize(10).node2NodeIdCacheSize(10).nodeMissCacheSize(10).build();
return BuildTestLib.makeNodeTable(location, "test", params);
}
use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class DataToTuples method nodes.
private static Tuple<NodeId> nodes(NodeTable nt, Quad quad) {
NodeId g = idForNode(nt, quad.getGraph());
NodeId s = idForNode(nt, quad.getSubject());
NodeId p = idForNode(nt, quad.getPredicate());
NodeId o = idForNode(nt, quad.getObject());
return TupleFactory.tuple(g, s, p, o);
}
use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class DataToTuples method nodes.
private static Tuple<NodeId> nodes(NodeTable nt, Triple triple) {
NodeId s = idForNode(nt, triple.getSubject());
NodeId p = idForNode(nt, triple.getPredicate());
NodeId o = idForNode(nt, triple.getObject());
return TupleFactory.tuple(s, p, o);
}
use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class DataToTuplesInlineSingle method nodes.
private static Tuple<NodeId> nodes(NodeTable nt, Quad quad) {
NodeId g = idForNode(nt, quad.getGraph());
NodeId s = idForNode(nt, quad.getSubject());
NodeId p = idForNode(nt, quad.getPredicate());
NodeId o = idForNode(nt, quad.getObject());
return TupleFactory.tuple(g, s, p, o);
}
Aggregations