use of org.apache.jena.tdb2.store.NodeId 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.NodeId 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.NodeId 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);
}
use of org.apache.jena.tdb2.store.NodeId in project jena by apache.
the class TupleLib method tuple.
// ---- Tuples and Records
public static Tuple<NodeId> tuple(Record r, TupleMap tMap) {
// Unmapping.
int N = r.getKey().length / NodeId.SIZE;
NodeId[] nodeIds = new NodeId[N];
for (int i = 0; i < N; i++) {
int j = i;
if (tMap != null)
j = tMap.unmapIdx(i);
NodeId id = NodeIdFactory.get(r.getKey(), j * NodeId.SIZE);
nodeIds[i] = id;
}
return TupleFactory.create(nodeIds);
}
use of org.apache.jena.tdb2.store.NodeId in project jena by apache.
the class OpExecutorTDB2 method execute.
@Override
protected QueryIterator execute(OpDatasetNames dsNames, QueryIterator input) {
DatasetGraphTDB ds = (DatasetGraphTDB) execCxt.getDataset();
Predicate<Tuple<NodeId>> filter = QC2.getFilter(execCxt.getContext());
Node gn = dsNames.getGraphNode();
if (Var.isVar(gn))
return SolverLibTDB.graphNames(ds, dsNames.getGraphNode(), input, filter, execCxt);
else
return SolverLibTDB.testForGraphName(ds, dsNames.getGraphNode(), input, filter, execCxt);
}
Aggregations