本文整理汇总了Java中org.openrdf.query.algebra.LeftJoin.getCondition方法的典型用法代码示例。如果您正苦于以下问题:Java LeftJoin.getCondition方法的具体用法?Java LeftJoin.getCondition怎么用?Java LeftJoin.getCondition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openrdf.query.algebra.LeftJoin
的用法示例。
在下文中一共展示了LeftJoin.getCondition方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildQuery
import org.openrdf.query.algebra.LeftJoin; //导入方法依赖的package包/类
private void buildQuery(final TupleExpr tupleExpr, final StatementPattern matchStatement) {
//If our IndexerExpr (to be) is the rhs-child of LeftJoin, we can safely make that a Join:
// the IndexerExpr will (currently) not return results that can deliver unbound variables.
//This optimization should probably be generalized into a LeftJoin -> Join optimizer under certain conditions. Until that
// has been done, this code path at least takes care of queries generated by OpenSahara SparqTool that filter on OPTIONAL
// projections. E.g. summary~'full text search' (summary is optional). See #379
if (matchStatement.getParentNode() instanceof LeftJoin) {
final LeftJoin leftJoin = (LeftJoin)matchStatement.getParentNode();
if (leftJoin.getRightArg() == matchStatement && leftJoin.getCondition() == null) {
matchStatement.getParentNode().replaceWith(new Join(leftJoin.getLeftArg(), leftJoin.getRightArg()));
}
}
final FilterFunction fVisitor = new FilterFunction(matchStatement.getObjectVar().getName());
tupleExpr.visit(fVisitor);
final List<IndexingExpr> results = Lists.newArrayList();
for(int i = 0; i < fVisitor.func.size(); i++){
results.add(new IndexingExpr(fVisitor.func.get(i), matchStatement, fVisitor.args.get(i)));
}
removeMatchedPattern(tupleExpr, matchStatement, new IndexerExprReplacer(results));
}
示例2: FlattenedOptional
import org.openrdf.query.algebra.LeftJoin; //导入方法依赖的package包/类
public FlattenedOptional(LeftJoin node) {
rightArgs = getJoinArgs(node.getRightArg(), new HashSet<TupleExpr>());
boundVars = setWithOutConstants(
Sets.intersection(node.getLeftArg().getAssuredBindingNames(), node.getRightArg().getBindingNames()));
unboundVars = setWithOutConstants(Sets.difference(node.getRightArg().getBindingNames(), boundVars));
condition = node.getCondition();
rightArg = node.getRightArg();
getVarCounts(node);
assuredBindingNames = new HashSet<>(leftArgVarCounts.keySet());
bindingNames = new HashSet<>(Sets.union(assuredBindingNames, unboundVars));
}
示例3: meet
import org.openrdf.query.algebra.LeftJoin; //导入方法依赖的package包/类
@Override
public void meet(final LeftJoin n) {
final TupleExpr l = n.getLeftArg();
final TupleExpr r = n.getCondition() == null ? n.getRightArg() : //
new Filter(n.getRightArg(), n.getCondition());
emit(l);
if (!(l instanceof SingletonSet)) {
newline();
}
emit("OPTIONAL ").emit(r, true);
}