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


Java Op2.getLeft方法代码示例

本文整理汇总了Java中com.hp.hpl.jena.sparql.algebra.op.Op2.getLeft方法的典型用法代码示例。如果您正苦于以下问题:Java Op2.getLeft方法的具体用法?Java Op2.getLeft怎么用?Java Op2.getLeft使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hp.hpl.jena.sparql.algebra.op.Op2的用法示例。


在下文中一共展示了Op2.getLeft方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: wrapInCurrentFilterAndRecurse

import com.hp.hpl.jena.sparql.algebra.op.Op2; //导入方法依赖的package包/类
private void wrapInCurrentFilterAndRecurse(Op2 op2) {
	List<Expr> retainedFilterExpr = new ArrayList<Expr>(filterExpr);
	filterExpr.clear();
	Op left = null;
	if (op2.getLeft() != null) {
		op2.getLeft().visit(this);
		left = stack.pop();
	}
	Op right = null;
	if (op2.getRight() != null) {
		op2.getRight().visit(this);
		right = stack.pop();
	}
	wrapInFilter(op2.apply(copy, left, right), retainedFilterExpr);
	filterExpr = retainedFilterExpr;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:17,代码来源:PushDownOpFilterVisitor.java

示例2: visit2

import com.hp.hpl.jena.sparql.algebra.op.Op2; //导入方法依赖的package包/类
@Override
   protected void visit2(Op2 op) {
if (op.getLeft() != null)
    op.getLeft().visit(this);
if (op.getRight() != null)
    op.getRight().visit(this);
op.visit(visitor);
   }
 
开发者ID:aschaetzle,项目名称:S2X,代码行数:9,代码来源:AlgebraWalker.java

示例3: visit2

import com.hp.hpl.jena.sparql.algebra.op.Op2; //导入方法依赖的package包/类
@Override
protected void visit2(Op2 op)
{
	if ( topDown ) op.visit(visitor);
	if ( op.getLeft() != null ) op.getLeft().visit(this);
	if ( op.getRight() != null ) op.getRight().visit(this);
	if ( !topDown ) op.visit(visitor);
}
 
开发者ID:aschaetzle,项目名称:Sempala,代码行数:9,代码来源:AlgebraWalker.java

示例4: checkMoveDownFilterExprAndVisitOpDiff

import com.hp.hpl.jena.sparql.algebra.op.Op2; //导入方法依赖的package包/类
/**
 * Checks first if a filterexpression can be moved down. And after visits
 * the operator
 */
private void checkMoveDownFilterExprAndVisitOpDiff(Op2 opDiff) {
	Op left = null;
	Op right = null;
	Op newOp;
	List<Expr> filterExprBeforeOpUnionOpJoin, filterExprAfterOpUnionOpJoin, notMoveableFilterExpr;

	// contains the filterexpressions that are valid before this op2
	filterExprBeforeOpUnionOpJoin = new ArrayList<Expr>(this.filterExpr);
	// contains the filterexpressions that are valid after this op2
	// this is needed because during the bottom-up-stepping all
	// filterexpressions
	// which could not be transformed down, must be inserted by means of an
	// OpFilter
	// above this op2
	filterExprAfterOpUnionOpJoin = new ArrayList<Expr>();

	// check left subtree
	if ((left = opDiff.getLeft()) != null) {
		// calculate the set of filterexpressions that are also valid for
		// the
		// left subtree
		this.filterExpr = calcValidFilterExpr(
				filterExprBeforeOpUnionOpJoin, left);
		filterExprAfterOpUnionOpJoin.addAll(this.filterExpr);
		// step down
		opDiff.getLeft().visit(this);
		left = stack.pop();
	}

	// check the right subtree
	if ((right = opDiff.getRight()) != null) {
		// calculate the set of filterexpressions that are also valid for
		// the
		// right subtree
		this.filterExpr = calcValidFilterExpr(
				filterExprBeforeOpUnionOpJoin, right);
		filterExprAfterOpUnionOpJoin.addAll(this.filterExpr);
		// step down
		opDiff.getRight().visit(this);
		right = stack.pop();
	}

	// note: filterExprAfterOpUnion contains now all filterexpressions which
	// could
	// be moved down
	// now calculate all filterexpressions which were not moveable
	notMoveableFilterExpr = new ArrayList<Expr>(
			filterExprBeforeOpUnionOpJoin);
	notMoveableFilterExpr.removeAll(filterExprAfterOpUnionOpJoin);

	// if there are some filterexpressions which could not be moved down,
	// an opFilter must be inserted that contains this filterexpressions
	if (!notMoveableFilterExpr.isEmpty()) {
		// create the filter
		newOp = OpFilter.filter(OpDiff.create(left, right));
		// add the conditions
		((OpFilter) newOp).getExprs().getList()
				.addAll(notMoveableFilterExpr);
	} else {
		// nothing must be done
		newOp = opDiff;
	}

	// restore filterexpressions
	this.filterExpr = filterExprBeforeOpUnionOpJoin;

	this.stack.push(newOp);
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:73,代码来源:PushDownOpFilterVisitor.java

示例5: substitute

import com.hp.hpl.jena.sparql.algebra.op.Op2; //导入方法依赖的package包/类
private Op substitute(Op2 op, Op left, Op right) {
	if (op.getLeft() == left && op.getRight() == right)
		return op;
	return op.copy(left, right);
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.remediator,代码行数:6,代码来源:Substituter.java


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