use of org.apache.jena.tdb.store.nodetable.NodeTable in project jena by apache.
the class DatasetBuilderStd method makeNodeTable$.
/**
* Make a node table overriding the node->id and id->node table names
*/
private NodeTable makeNodeTable$(Location location, String indexNode2Id, String indexId2Node, StoreParams params) {
FileSet fsNodeToId = new FileSet(location, indexNode2Id);
FileSet fsId2Node = new FileSet(location, indexId2Node);
NodeTable nt = /*nodeTableBuilder.*/
buildNodeTable(fsNodeToId, fsId2Node, params);
return nt;
}
use of org.apache.jena.tdb.store.nodetable.NodeTable in project jena by apache.
the class TDBInternal method getNode.
/**
* Return the node for a NodeId (if any). Returns null if the NodeId does
* not exist in the dataset.
*/
public static Node getNode(DatasetGraphTDB dsg, NodeId nodeId) {
if (dsg == null)
return null;
NodeTable nodeTable = dsg.getQuadTable().getNodeTupleTable().getNodeTable();
Node node = nodeTable.getNodeForNodeId(nodeId);
return node;
}
use of org.apache.jena.tdb.store.nodetable.NodeTable in project jena by apache.
the class DebugTDB method dumpNodeTable.
public static void dumpNodeTable(String label, DatasetGraphTDB dsg) {
NodeTable nt1 = dsg.getTripleTable().getNodeTupleTable().getNodeTable();
NodeTableLib.print(label, nt1);
}
use of org.apache.jena.tdb.store.nodetable.NodeTable in project jena by apache.
the class DebugTDB method lookup.
public static NodeId lookup(DatasetGraphTDB dsg, Node n) {
NodeTable nt = dsg.getTripleTable().getNodeTupleTable().getNodeTable();
NodeId nid = nt.getNodeIdForNode(n);
return nid;
}
use of org.apache.jena.tdb.store.nodetable.NodeTable in project jena by apache.
the class TestQuadFilter method createFilter.
/**
* Create a filter to exclude the graph http://example/g2
*/
private static Predicate<Tuple<NodeId>> createFilter(Dataset dataset) {
return Txn.calculateRead(dataset, () -> {
DatasetGraphTDB dsg = TDBInternal.getDatasetGraphTDB(dataset);
final NodeTable nodeTable = dsg.getQuadTable().getNodeTupleTable().getNodeTable();
final NodeId target = nodeTable.getNodeIdForNode(NodeFactory.createURI(graphToHide));
// Check g slot. Exclude graphToHide
return item -> !(item.len() == 4 && item.get(0).equals(target));
});
}
Aggregations