本文整理汇总了Java中com.hp.hpl.jena.sparql.expr.ExprList.size方法的典型用法代码示例。如果您正苦于以下问题:Java ExprList.size方法的具体用法?Java ExprList.size怎么用?Java ExprList.size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hp.hpl.jena.sparql.expr.ExprList
的用法示例。
在下文中一共展示了ExprList.size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transform
import com.hp.hpl.jena.sparql.expr.ExprList; //导入方法依赖的package包/类
@Override
public Op transform(OpFilter opFilter, Op subOp) {
if ( ! (subOp instanceof OpBGP) )
return super.transform(opFilter, subOp);
ExprList exprs = opFilter.getExprs();
Op op = subOp;
// Variables set
Set<Var> patternVars = OpVars.visibleVars(op);
// Any assignments must go inside filters so the filters see the assignments.
ExprList exprs2 = new ExprList();
for ( Expr e : exprs.getList() ) {
Op op2 = processFilterWorker(e, op, patternVars);
if ( op2 == null )
exprs2.add(e);
else
op = op2;
}
// Place any filter expressions around the processed sub op.
if ( exprs2.size() > 0 )
op = OpFilter.filter(exprs2, op);
return op;
}
示例2: transform
import com.hp.hpl.jena.sparql.expr.ExprList; //导入方法依赖的package包/类
@Override
public Op transform(OpFilter opFilter, Op subOp) {
if ( ! (subOp instanceof OpBGP) )
return super.transform(opFilter, subOp);
ExprList exprs = opFilter.getExprs();
Op op = subOp;
// Variables set
Set<Var> patternVars = OpVars.visibleVars(op);
// Any assignments must go inside filters so the filters see the assignments.
ExprList exprs2 = new ExprList();
for ( Expr e : exprs.getList() ) {
Op op2 = processFilterWorker(e, op, patternVars);
if ( op2 == null )
exprs2.add(e);
else
op = op2;
}
// Place any filter expressions around the processed sub op.
if ( exprs2.size() > 0 )
op = OpFilter.filter(exprs2, op);
return op;
}
示例3: transform
import com.hp.hpl.jena.sparql.expr.ExprList; //导入方法依赖的package包/类
public Op transform(OpFilter opFilter, Op subOp) {
ExprList exprList = ExprList.splitConjunction(opFilter.getExprs());
ExprList cnfExprList = ExprList.splitConjunction(
TransformFilterCNF.translateFilterExpressionsToCNF(opFilter));
if (cnfExprList.size() > exprList.size()) {
return OpFilter.filter(cnfExprList, subOp);
}
return OpFilter.filter(exprList, subOp);
}