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

Java Plan类代码示例

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

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



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

示例1: prepareBindings

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
public BindingQueryPlan prepareBindings(GraphQuery q, Node[] variables) {   
	this.variables = variables;
	this.indexes = new HashMap<Node,Integer>();
	for (int i = 0; i < variables.length; i++) {
		indexes.put(variables[i], new Integer(i));
	}
	BasicPattern pattern = new BasicPattern();
	for (Triple t: q.getPattern()) {
		pattern.add(t);
	}
	Plan plan = QueryEngineD2RQ.getFactory().create(new OpBGP(pattern), dataset, null, null);
	final ExtendedIterator<Domain> queryIterator = new Map1Iterator<Binding,Domain>(new BindingToDomain(), plan.iterator());
	return new BindingQueryPlan() {
		public ExtendedIterator<Domain> executeBindings() {
			return queryIterator;
		}
	};
}
 
开发者ID:d2rq,项目名称:r2rml-kit,代码行数:19,代码来源:D2RQQueryHandler.java


示例2: prepareBindings

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
public BindingQueryPlan prepareBindings(Query q, Node[] variables) {   
	this.variables = variables;
	this.indexes = new HashMap<Node,Integer>();
	for (int i = 0; i < variables.length; i++) {
		indexes.put(variables[i], new Integer(i));
	}
	BasicPattern pattern = new BasicPattern();
	for (Triple t: q.getPattern()) {
		pattern.add(t);
	}
	Plan plan = QueryEngineD2RQ.getFactory().create(new OpBGP(pattern), dataset, null, null);
	final ExtendedIterator<Domain> queryIterator = new Map1Iterator<Binding,Domain>(new BindingToDomain(), plan.iterator());
	return new BindingQueryPlan() {
		public ExtendedIterator<Domain> executeBindings() {
			return queryIterator;
		}
	};
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:19,代码来源:D2RQQueryHandler.java


示例3: prepareBindings

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
/**
 * <p>Method that prepares the bindings for a query plan</p>
 * @param q - the input query
 * @param variables - the variables in the given query
 * @return a binding query plan
 * 
 * @see de.fuberlin.wiwiss.d2rq.D2RQQueryHandler#prepareBindings(Query, Node[])
 */
@SuppressWarnings("unchecked")
public BindingQueryPlan prepareBindings(Query q, Node[] variables) 
{   
	this.variables = variables;
	this.indexes = new HashMap();
	for (int i = 0; i < variables.length; i++) { indexes.put(variables[i], new Integer(i)); }
	BasicPattern pattern = new BasicPattern();
	Iterator it = q.getPattern().iterator();
	while (it.hasNext()) 
	{
		Triple t = (Triple) it.next();
		pattern.add(t);
	}
	Plan plan = QueryEngineD2RQ.getFactory().create(new OpBGP(pattern), dataset, null, null);
	final ExtendedIterator queryIterator = new Map1Iterator(new BindingToDomain(), plan.iterator());
	return new BindingQueryPlan() 
	{
		public ExtendedIterator executeBindings() { return queryIterator; }
	};
}
 
开发者ID:vaibhavkhadilkar,项目名称:D2RQ-Update,代码行数:29,代码来源:D2RQRWQueryHandler.java


示例4: execute

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
static void execute(DatasetGraph dsg, Op op, Context context) {
    /*
    Algebra.exec(op, dsg)
    ==>
    QueryEngineFactory f = QueryEngineRegistry.findFactory(op, ds, null) ;
    Plan plan = f.create(op, ds, BindingRoot.create(), null) ;
    return plan.iterator() ;
    */
    
    context = Context.setupContext(context, dsg) ;
    OpExecutorFactory factory = QC.getFactory(context) ;
    if ( factory == null )
        factory = OpExecutor.stdFactory ;
    
    ExecutionContext execCxt = new ExecutionContext(context, dsg.getDefaultGraph(), dsg, factory) ;
    QueryIterator qIterRoot = OpExecutor.createRootQueryIterator(execCxt) ; 
    QueryIterator qIterPlan = QC.execute(op, qIterRoot, execCxt) ;
    Plan plan = new PlanOp(op, null, qIterPlan) ;
    runPlan(plan) ;
    
    /*
    Query query = null ;
    Dataset dataset = null ;
    QueryEngineFactory qefactory = null ;
    @SuppressWarnings("resource")
    QueryExecutionBase queryExecutionBase = new QueryExecutionBase(query, dataset, context, qefactory)  ;
    */
}
 
开发者ID:afs,项目名称:quack,代码行数:29,代码来源:RefactorQueryExecution.java


示例5: runPlan

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
private static void runPlan(Plan plan) {
    //QueryExecUtils.execute(op, dsg)
    List<String> vars = null ;
    ResultsFormat outputFormat = ResultsFormat.FMT_TEXT ;
    
    Op op = plan.getOp();
    if ( op instanceof OpProject )
        vars = Var.varNames(((OpProject)op).getVars()) ;
    else
        vars = Var.varNames(OpVars.visibleVars(op)) ;

    ResultSet results = ResultSetFactory.create(plan.iterator(), vars) ;
    QueryExecUtils.outputResultSet(results, null, outputFormat) ;
}
 
开发者ID:afs,项目名称:quack,代码行数:15,代码来源:RefactorQueryExecution.java


示例6: create

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
@Override
public Plan create(Query query, DatasetGraph dataset, Binding input, Context context)
{
    QueryEngineMain engine = new QueryEngineMain2(query, dataset, input, context) ;
    QC.setFactory(context, OpExecutorRowsMain.factoryRowsMain) ;
    return engine.getPlan() ;
}
 
开发者ID:afs,项目名称:quack,代码行数:8,代码来源:QueryEngineMain2.java


示例7: create

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
@Override
public Plan create(Query query, DatasetGraph dataset, Binding input, Context context)
{
    // This is the usual route.
    DatasetGraphTDB dsgtdb = dsgToQuery(dataset) ;
    setup(dsgtdb, context) ;
    QueryEngineQuackTDB engine = new QueryEngineQuackTDB(query, dsgtdb, input, context) ;
    return engine.getPlan() ;
}
 
开发者ID:afs,项目名称:quack,代码行数:10,代码来源:QueryEngineFactoryQuackTDB.java


示例8: create

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
public Plan create(Query query, DatasetGraph dataset,
		Binding inputBinding, Context context) {
	return new QueryEngineD2RQ((GraphD2RQ) dataset.getDefaultGraph(),
			query, context).getPlan();
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:6,代码来源:QueryEngineD2RQ.java


示例9: create

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
@Override
public Plan create(Query query, DatasetGraph dataset, Binding binding, Context context)
{
    QueryEngineRemediatorQuad engine = new QueryEngineRemediatorQuad(query, dataset, binding, context) ;
    return engine.getPlan() ;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.remediator,代码行数:7,代码来源:QueryEngineRemediatorQuad.java


示例10: create

import com.hp.hpl.jena.sparql.engine.Plan; //导入依赖的package包/类
@Override
public Plan create(Query query, DatasetGraph dataset, Binding binding, Context context)
{
    QueryEngineRemediator engine = new QueryEngineRemediator(query, dataset, binding, context) ;
    return engine.getPlan() ;
}
 
开发者ID:peterjohnlawrence,项目名称:com.inova8.remediator,代码行数:7,代码来源:QueryEngineRemediator.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java StateManager类代码示例发布时间:2022-05-23
下一篇:
Java Sequence类代码示例发布时间: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