use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class LoaderOps method ntBPTree.
/**
* Get the BPlusTree index for a {@Link NodeTable}
*/
public static BPlusTree ntBPTree(NodeTable nt) {
NodeTableTRDF ntt = (NodeTableTRDF) (nt.baseNodeTable());
Index idx = ntt.getIndex();
return (BPlusTree) idx;
}
use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class LoaderOps method ntDataFile.
/**
* Get the node storage for a {@Link NodeTable}
*/
public static TransBinaryDataFile ntDataFile(NodeTable nt) {
NodeTableTRDF ntt = (NodeTableTRDF) (nt.baseNodeTable());
BinaryDataFile bdf = ntt.getData();
TransBinaryDataFile tbdf = (TransBinaryDataFile) bdf;
return tbdf;
}
use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class DataToTuplesInline method startBulk.
@Override
public void startBulk() {
coordinator = CoLib.newCoordinator();
CoLib.add(coordinator, nodeTable);
// Prefixes
NodeTupleTable p = prefixes.getNodeTupleTable();
CoLib.add(coordinator, p.getNodeTable());
CoLib.add(coordinator, p.getTupleTable().getIndexes());
CoLib.start(coordinator);
transaction = coordinator.begin(TxnType.WRITE);
}
use of org.apache.jena.tdb2.store.nodetable.NodeTable in project jena by apache.
the class DataToTuplesInline 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 NodeTableOps method bulkNodeIdToNodeImpl.
/**
* Convert a bulk operation into a loop
*/
public static List<Node> bulkNodeIdToNodeImpl(NodeTable nt, List<NodeId> nodeIds) {
List<Node> nodes = new ArrayList<>(nodeIds.size());
for (NodeId nodeId : nodeIds) {
Node n = nt.getNodeForNodeId(nodeId);
nodes.add(n);
}
return nodes;
}
Aggregations