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

Java EvaluationStrategy类代码示例

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

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



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

示例1: evaluate

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
static CloseableIteration<BindingSet, QueryEvaluationException> evaluate(
        final TripleTransaction transaction, final TupleExpr expr,
        @Nullable final Dataset dataset, @Nullable final BindingSet bindings,
        @Nullable final Long timeout) throws QueryEvaluationException {

    Preconditions.checkNotNull(transaction);

    final AtomicBoolean delegate = new AtomicBoolean(false);
    expr.visit(new QueryModelVisitorBase<RuntimeException>() {

        @Override
        public void meet(final StatementPattern node) throws RuntimeException {
            delegate.set(true);
        }

    });

    final EvaluationStrategy strategy = delegate.get() ? new DelegatingEvaluationStrategy(
            transaction, dataset, timeout, false) : new LocalEvaluationStrategy(transaction,
            dataset, timeout);

    return strategy
            .evaluate(expr, bindings != null ? bindings : EmptyBindingSet.getInstance());
}
 
开发者ID:dkmfbk,项目名称:knowledgestore,代码行数:25,代码来源:SparqlHelper.java


示例2: evaluateInternal

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
@Override
protected CloseableIteration<BindingSet, QueryEvaluationException> evaluateInternal(
    TupleExpr expr, Dataset dataset, BindingSet bindings, boolean includeInferred)
    throws SailException {
  triples.flush();
  try {
    TupleExpr tupleExpr;
    EvaluationStrategy strategy;
    strategy = factory.createRdbmsEvaluation(dataset);
    tupleExpr = optimizer.optimize(expr, dataset, bindings, strategy);
    // Mexri edw to GeneralDBSqlDiffDateTime ftanei kanonika
    return strategy.evaluate(tupleExpr, EmptyBindingSet.getInstance());
  } catch (QueryEvaluationException e) {
    throw new SailException(e);
  }
}
 
开发者ID:esarbanis,项目名称:strabon,代码行数:17,代码来源:GeneralDBConnection.java


示例3: evaluate

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
@Override
public CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(
		TupleExpr tupleExpr, Dataset dataset, BindingSet bindings,
		boolean includeInferred) throws SailException {
	try {
		
		IdentifiersOrgTripleSource tripleSource = new IdentifiersOrgTripleSource(vf, dao);
		EvaluationStrategy strategy = new EvaluationStrategyImpl(tripleSource);
		tupleExpr = tupleExpr.clone();
		new BindingAssigner().optimize(tupleExpr, dataset, bindings);

		new FilterOptimizer().optimize(tupleExpr, dataset, bindings);
		return strategy.evaluate(tupleExpr, EmptyBindingSet.getInstance());
	} catch (QueryEvaluationException e) {
		throw new SailException(e);
	}
}
 
开发者ID:JervenBolleman,项目名称:sparql-identifiers,代码行数:18,代码来源:IdentifiersOrgConnection.java


示例4: ParallelJoinIterator

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public ParallelJoinIterator(EvaluationStrategy strategy, Join join, BindingSet bindings, ExecutorService executorService, int batch)
        throws QueryEvaluationException {
    this.strategy = strategy;
    this.join = join;
    leftIter = strategy.evaluate(join.getLeftArg(), bindings);

    this.executorService = executorService;
    this.batch = batch;
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:10,代码来源:ParallelJoinIterator.java


示例5: accept

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
/**
 * Return whether a concrete statement satisfies a condition.
 * @param stmt A statement from the input
 * @param condition The condition to test. Expects variables expressed using the standard variable
 * names used by this class, so it must be a rule's condition or derived from rules' conditions.
 * @param strategy The evaluation strategy to apply
 * @return True if the statement matches the condition
 * @throws ValueExprEvaluationException
 * @throws QueryEvaluationException
 */
public static boolean accept(final Statement stmt, final ValueExpr condition, final EvaluationStrategy strategy)
        throws ValueExprEvaluationException, QueryEvaluationException {
    final QueryBindingSet bindings = new QueryBindingSet();
    bindings.addBinding(SUBJ_VAR.getName(), stmt.getSubject());
    bindings.addBinding(PRED_VAR.getName(), stmt.getPredicate());
    bindings.addBinding(OBJ_VAR.getName(), stmt.getObject());
    if (stmt.getContext() != null) {
        bindings.addBinding(CON_VAR.getName(), stmt.getContext());
    }
    return strategy.isTrue(condition, bindings);
}
 
开发者ID:apache,项目名称:incubator-rya,代码行数:22,代码来源:CopyRule.java


示例6: StSPARQLFilterIterator

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public StSPARQLFilterIterator(Filter filter,
    CloseableIteration<BindingSet, QueryEvaluationException> iter, Set<String> spatialConstructs,
    EvaluationStrategy strategy) throws QueryEvaluationException {
  super(iter);
  this.filter = filter;
  this.strategy = strategy;
  this.scopeBindingNames = filter.getBindingNames();
  this.scopeBindingNames.addAll(spatialConstructs);
}
 
开发者ID:esarbanis,项目名称:strabon,代码行数:10,代码来源:StSPARQLFilterIterator.java


示例7: StSPARQLGroupIterator

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public StSPARQLGroupIterator(EvaluationStrategy strategy, Group group, BindingSet parentBindings)
    throws QueryEvaluationException {
  this.strategy = strategy;
  this.group = group;
  this.parentBindings = parentBindings;
  super.setIterator(createIterator());
}
 
开发者ID:esarbanis,项目名称:strabon,代码行数:8,代码来源:StSPARQLGroupIterator.java


示例8: coreOptimizations

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
private void coreOptimizations(EvaluationStrategy strategy, TupleExpr expr, Dataset dataset,
    BindingSet bindings) {
  new BindingAssigner().optimize(expr, dataset, bindings);
  // addition
  new stSPARQLConstantOptimizer(strategy).optimize(expr, dataset, bindings);
  //
  new CompareOptimizer().optimize(expr, dataset, bindings);
  new ConjunctiveConstraintSplitter().optimize(expr, dataset, bindings);
  new DisjunctiveConstraintOptimizer().optimize(expr, dataset, bindings);
  new SameTermFilterOptimizer().optimize(expr, dataset, bindings);

  // XXX
  new SpatialJoinOptimizer().optimize(expr, dataset, bindings, spatialJoins);
}
 
开发者ID:esarbanis,项目名称:strabon,代码行数:15,代码来源:GeneralDBQueryOptimizer.java


示例9: evaluate

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
@Override
public CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(
		TupleExpr tupleExpr, Dataset dataset, BindingSet bindings,
		boolean includeInferred) throws SailException {
	try {
		BEDTripleSource tripleSource = new BEDTripleSource(file, vf);
		EvaluationStrategy strategy = new OneLineAwareEvaluationStrategy(
				tripleSource);
		tupleExpr = tupleExpr.clone();
		new BindingAssigner().optimize(tupleExpr, dataset, bindings);
		new ConstantOptimizer(strategy).optimize(tupleExpr, dataset,
				bindings);
		new CompareOptimizer().optimize(tupleExpr, dataset, bindings);
		new ConjunctiveConstraintSplitter().optimize(tupleExpr, dataset,
				bindings);
		new DisjunctiveConstraintOptimizer().optimize(tupleExpr, dataset,
				bindings);
		new SameTermFilterOptimizer()
				.optimize(tupleExpr, dataset, bindings);
		new QueryModelNormalizer().optimize(tupleExpr, dataset, bindings);

		// new SubSelectJoinOptimizer().optimize(tupleExpr, dataset,
		// bindings);
		new IterativeEvaluationOptimizer().optimize(tupleExpr, dataset,
				bindings);
		new FilterOptimizer().optimize(tupleExpr, dataset, bindings);
		new OrderLimitOptimizer().optimize(tupleExpr, dataset, bindings);

		return strategy.evaluate(tupleExpr, EmptyBindingSet.getInstance());
	} catch (QueryEvaluationException e) {
		throw new SailException(e);
	}
}
 
开发者ID:JervenBolleman,项目名称:sparql-bed,代码行数:34,代码来源:BEDConnection.java


示例10: getEvalStrategy

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public EvaluationStrategy getEvalStrategy() {
	return this.evalStrategy;
}
 
开发者ID:goerlitz,项目名称:rdffederator,代码行数:4,代码来源:QueryOptimizerConfig.java


示例11: TrueCardinalityEstimator

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public TrueCardinalityEstimator(EvaluationStrategy evalStrategy) {
	this.evalStrategy = evalStrategy;
}
 
开发者ID:goerlitz,项目名称:rdffederator,代码行数:4,代码来源:TrueCardinalityEstimator.java


示例12: setEvalStrategy

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public void setEvalStrategy(EvaluationStrategy evalStrategy) {
//		if (evalStrategy == null)
//			throw new IllegalArgumentException("evaluation strategy must not be NULL");
		this.evalStrategy = evalStrategy;
	}
 
开发者ID:goerlitz,项目名称:rdffederator,代码行数:6,代码来源:FederationSail.java


示例13: StSPARQLOrderComparator

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public StSPARQLOrderComparator(EvaluationStrategy strategy, Order order, Comparator vcmp) {
  this.strategy = strategy;
  this.order = order;
  this.cmp = vcmp;
}
 
开发者ID:esarbanis,项目名称:strabon,代码行数:6,代码来源:StSPARQLOrderComparator.java


示例14: stSPARQLConstantOptimizer

import org.openrdf.query.algebra.evaluation.EvaluationStrategy; //导入依赖的package包/类
public stSPARQLConstantOptimizer(EvaluationStrategy strategy) {
  this.strategy = strategy;
}
 
开发者ID:esarbanis,项目名称:strabon,代码行数:4,代码来源:stSPARQLConstantOptimizer.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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