• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Op2类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Op2类属于com.hp.hpl.jena.sparql.algebra.op包,在下文中一共展示了Op2类的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类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Json类代码示例发布时间:2022-05-22
下一篇:
Java ByteArray类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap