当前位置: 首页>>代码示例>>Java>>正文


Java LeftJoin.getCondition方法代码示例

本文整理汇总了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));
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:21,代码来源:FilterFunctionOptimizer.java

示例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));
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:12,代码来源:FlattenedOptional.java

示例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);
}
 
开发者ID:dkmfbk,项目名称:knowledgestore,代码行数:12,代码来源:SPARQLRenderer.java


注:本文中的org.openrdf.query.algebra.LeftJoin.getCondition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。