// URILiterals
// to be applicable
// later on
for (final String name : this.root.namedGraphs) {
final Indices indices = this.root.dataset
.getNamedGraphIndices(LiteralFactory
.createURILiteralWithoutLazyLiteral(name));
final URILiteral rdfName = indices
.getRdfName();
if (namedGraphs.contains(rdfName)) {
final TriplePattern ztp = new TriplePattern(
graphConstraint.equals(tp
.getPos(0)) ? rdfName
: tp.getPos(0),
graphConstraint.equals(tp
.getPos(1)) ? rdfName
: tp.getPos(1),
graphConstraint.equals(tp
.getPos(2)) ? rdfName
: tp.getPos(2));
final Triple zkey = getKey(ztp, null);
final Triple keyMinimum = this.getKey(ztp,
null, minima);
final Triple keyMaximum = this.getKey(ztp,
null, maxima);
final VarBucket vb = this.getVarBucket(v,
ztp, zkey, keyMinimum,
keyMaximum,
(SixIndices) indices);
if (vb != null) {
final VarBucket previous_vb = result
.get(v);
if (previous_vb != null) {
vb.add(previous_vb);
}
vb.minimum = (minima == null) ? null
: minima.get(v);
vb.maximum = (maxima == null) ? null
: maxima.get(v);
result.put(v, vb);
}
}
}
}
// otherwise there might have been named graphs
// added
// during the evaluation
else {
// get all indices of named graphs and bind them
// to
// the graph constraint
final Collection<Indices> dataSetIndices = this.root.dataset
.getNamedGraphIndices();
if (dataSetIndices != null) {
for (final Indices indices : dataSetIndices) {
final TriplePattern ztp = new TriplePattern(
graphConstraint.equals(tp
.getPos(0)) ? indices
.getRdfName() : tp
.getPos(0),
graphConstraint.equals(tp
.getPos(1)) ? indices
.getRdfName() : tp
.getPos(1),
graphConstraint.equals(tp
.getPos(2)) ? indices
.getRdfName() : tp
.getPos(2));
final Triple zkey = getKey(ztp, null);
final Triple keyMinimum = this.getKey(ztp,
null, minima);
final Triple keyMaximum = this.getKey(ztp,
null, maxima);
final VarBucket vb = this.getVarBucket(v,
ztp, zkey, keyMinimum,
keyMaximum,
(SixIndices) indices);
if (vb != null) {
final VarBucket previous_vb = result
.get(v);
if (previous_vb != null) {
vb.add(previous_vb);
}
vb.minimum = (minima == null) ? null
: minima.get(v);
vb.maximum = (maxima == null) ? null
: maxima.get(v);
result.put(v, vb);
}
}
}
}
}
// if the graph constraint is an URILiteral fetch the
// matching indices object
// but do not bind anything
else {
final Triple keyMinimum = this.getKey(tp, null, minima);
final Triple keyMaximum = this.getKey(tp, null, maxima);
for (final Indices indices : indicesC) {
final URILiteral rdfName = indices.getRdfName();
if (namedGraphs.contains(rdfName)) {
final VarBucket vb = this.getVarBucket(v, tp,
key, keyMinimum, keyMaximum,
(SixIndices) indices);
if (vb != null) {