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

Java Transformer类代码示例

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

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



Transformer类属于com.hp.hpl.jena.sparql.algebra包,在下文中一共展示了Transformer类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: translate

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
/**
 * Method for translating an operator-tree. Move filter conditions as far as
 * possible down in the tree. In the optimal way, the filter conditions is
 * the parent of an OpBGP.
 */
private Op translate(Op op) {
	if (log.isDebugEnabled()) {
		log.debug("Before translation:\n" + PrintUtils.toString(op));
	}
	// Shape filter expressions to maximize opportunities for pushing them
	// down
	op = Transformer.transform(new TransformFilterCNF(), op);
	// Try to move any filters as far down as possible
	op = PushDownOpFilterVisitor.transform(op);
	// Translate BGPs that have a filter immediately above them
	op = Transformer.transform(new TransformOpBGP(mapping, true), op);
	// Translate BGPs that don't have a filter
	op = Transformer.transform(new TransformOpBGP(mapping, false), op);

	if (log.isDebugEnabled()) {
		log.debug("After translation:\n" + PrintUtils.toString(op));
	}
	return op;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:25,代码来源:QueryEngineD2RQ.java


示例2: modifyOp

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
@Override
protected Op modifyOp(Op op)
{
    // Just property functions
    Transform t = new TransformPropertyFunction(context) ;
    op = Transformer.transform(t, op) ;
    return op ;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.remediator,代码行数:9,代码来源:QueryEngineRemediator.java


示例3: RemediatorQuery

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
public RemediatorQuery(String queryString) {
	super();
	this.queryString = queryString;
	this.originalQuery = QueryFactory.create(this.queryString);
	this.originalOperations = Algebra.compile(this.originalQuery);
	queryVars = new QueryVars(
			OpVars.mentionedVars(this.originalOperations));
	Simplifier  simplifier = new Simplifier();
	this.simplifiedOperations = Transformer.transform(simplifier, this.originalOperations);
	//Create lookup for simplified operations
	for(Triple triple:((OpBGP)this.simplifiedOperations).getPattern().getList()){
		//TODO Should only put in relevant operations for this dataset.
		simplifiedTriples.put(triple.hashCode(), triple);
	}
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.remediator,代码行数:16,代码来源:RemediatorQuery.java


示例4: createQueryClause

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
public Op createQueryClause(RemediatorQuery remediatorQuery,
		QueryVars globalQueryVars) {
	Substituter substituter = new Substituter(globalQueryVars,
			this, remediatorQuery.getSimplifiedTriples());
	Op substitutedOperations = Transformer.transform(substituter,
			remediatorQuery.getOperations());
	//this.setOpService(
	//		substitutedOperations);
	return substitutedOperations;		
	
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.remediator,代码行数:12,代码来源:QueryClause.java


示例5: transform

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
public Op transform(Op op) {
    return Transformer.transform(this, op, visitor, null);
}
 
开发者ID:aschaetzle,项目名称:S2RDF,代码行数:4,代码来源:TransformFilterVarEquality.java


示例6: optimize

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
public Op optimize(Op op) {
    return Transformer.transform(this, op);
}
 
开发者ID:aschaetzle,项目名称:S2RDF,代码行数:4,代码来源:BGPOptimizerNoStats.java


示例7: optimizeAlgebra

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
private Op optimizeAlgebra(Op opRoot) {
	/*
	 * Algebra Optimierer fuehrt High-Level Transformationen aus (z.B. Filter Equalilty)
	 * -> nicht BGP reordering
	 * 
	 * zunaechst muss gesetzt werden was alles optimiert werden soll, z.B.
	 * ARQ.set(ARQ.optFilterEquality, true);
	 * oder
	 * ARQ.set(ARQ.optFilterPlacement, true);
	 * 
	 * Danach kann dann Algebra.optimize(op) aufgerufen werden
	 */

	/*
	 * Algebra.optimize always executes TransformJoinStrategy -> not always wanted
	 * ARQ.set(ARQ.optFilterPlacement, false);
	 * ARQ.set(ARQ.optFilterEquality, true);
	 * ARQ.set(ARQ.optFilterConjunction, true);
	 * ARQ.set(ARQ.optFilterDisjunction, true);
	 * opRoot = Algebra.optimize(opRoot);
	 */

	/*
	 * Reihenfolge der Optimierungen wichtig!
	 * 
	 * 1. Transformationen der SPARQL-Algebra bis auf FilterPlacement -> koennte Kreuzprodukte erzeugen
	 * 2. BGPOptimizer -> Neuanordnung der Triple im BGP zur Vermeidung von Kreuzprodukten und zur Minimierung von Joins
	 * 3. FilterPlacement -> Vorziehen des Filters soweit moeglich
	 */

	// Perform Join optimization only if optimization level is set to ALL
	if (Tags.optimizer == Optimizer.ALL) {
		TransformJoinStrategy joinStrategy = new TransformJoinStrategy();
		opRoot = Transformer.transform(joinStrategy, opRoot);
	}

	// Perform filter optimizations if optimization level is set to FILTER or ALL
	if (Tags.optimizer == Optimizer.FILTER || Tags.optimizer == Optimizer.ALL) {
		// ARQ optimization of Filter conjunction
		TransformFilterConjunction filterConjunction = new TransformFilterConjunction();
		opRoot = Transformer.transform(filterConjunction, opRoot);

		// ARQ optimization of Filter disjunction
		TransformFilterDisjunction filterDisjunction = new TransformFilterDisjunction();
		opRoot = Transformer.transform(filterDisjunction, opRoot);

		// ARQ optimization of Filter equality
		TransformFilterEquality filterEquality = new TransformFilterEquality();
		opRoot = Transformer.transform(filterEquality, opRoot);

		// Own optimization of Filter variable equality
		TransformFilterVarEquality filterVarEquality = new TransformFilterVarEquality();
		opRoot = filterVarEquality.transform(opRoot);
	}

	// Perform BGP optimization if optimization level is set to BGP, FILTER or ALL
	if (Tags.optimizer == Optimizer.BGP || Tags.optimizer == Optimizer.FILTER || Tags.optimizer == Optimizer.ALL) {
		// Own BGP optimizer using variable counting heuristics
		BGPOptimizerNoStats bgpOptimizer = new BGPOptimizerNoStats();
		opRoot = bgpOptimizer.optimize(opRoot);
	}

	// Perform filter optimizations if optimization level is set to FILTER or ALL
	// Filter Placement must be done last!
	if (Tags.optimizer == Optimizer.FILTER || Tags.optimizer == Optimizer.ALL) {
		// ARQ optimization of Filter placement
		TransformFilterPlacement filterPlacement = new TransformFilterPlacement();
		opRoot = Transformer.transform(filterPlacement, opRoot);
	}
	return opRoot;
}
 
开发者ID:aschaetzle,项目名称:PigSPARQL,代码行数:72,代码来源:PigCompiler.java


示例8: transform

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
public Op transform(Op op) {
	return Transformer.transform(this, op, visitor, null);
}
 
开发者ID:aschaetzle,项目名称:Sempala,代码行数:4,代码来源:TransformFilterVarEquality.java


示例9: optimize

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
public Op optimize(Op op) {
	return Transformer.transform(this, op);
}
 
开发者ID:aschaetzle,项目名称:Sempala,代码行数:4,代码来源:BGPOptimizerNoStats.java


示例10: simplify

import com.hp.hpl.jena.sparql.algebra.Transformer; //导入依赖的package包/类
private static Op simplify(Op op) {
    return Transformer.transform(simplify, op) ;
}
 
开发者ID:KMax,项目名称:cqels,代码行数:4,代码来源:LogicCompiler.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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