gpt4 book ai didi

org.openrdf.query.algebra.ZeroLengthPath.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 09:03:31 24 4
gpt4 key购买 nike

本文整理了Java中org.openrdf.query.algebra.ZeroLengthPath.<init>()方法的一些代码示例,展示了ZeroLengthPath.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeroLengthPath.<init>()方法的具体详情如下:
包路径:org.openrdf.query.algebra.ZeroLengthPath
类名称:ZeroLengthPath
方法名:<init>

ZeroLengthPath.<init>介绍

[英]Creates a zero-length path that matches a subject-, predicate- and object variable against statements from the specified context scope.
[中]创建一个长度为零的路径,该路径根据指定上下文范围中的语句匹配主语、谓语和宾语变量。

代码示例

代码示例来源:origin: org.apache.rya/rya.sail

/**
   * Check whether any solution for the {@link StatementPattern} could be derived from
   * reflexive property inference, and if so, replace the pattern with a union of itself and the
   * reflexive solution.
   */
  @Override
  protected void meetSP(StatementPattern node) throws Exception {
    // Only applies when the predicate is defined and reflexive
    final Var predVar = node.getPredicateVar();
    if (predVar.getValue() != null && inferenceEngine.isReflexiveProperty((URI) predVar.getValue())) {
      final StatementPattern originalSP = node.clone();
      // The reflexive solution is a ZeroLengthPath between subject and
      // object: they can be matched to one another, whether constants or
      // variables.
      final Var subjVar = node.getSubjectVar();
      final Var objVar = node.getObjectVar();
      final ZeroLengthPath reflexiveSolution = new ZeroLengthPath(subjVar, objVar);
      node.replaceWith(new InferUnion(originalSP, reflexiveSolution));
    }
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryparser-sparql

return new ZeroLengthPath(scope, subjVar, endVar, contextVar);
return new ZeroLengthPath(scope, subjVar, endVar, contextVar);

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

ZeroLengthPath zlp = new ZeroLengthPath(scope, startVar, endVar, contextVar);
currentIter = this.evaluationStrategyImpl.evaluate(zlp, bindings);
currentLength++;

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com