fr.inria.corese.kgram.core.Query.getOuterQuery()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(146)

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

Query.getOuterQuery介绍

暂无

代码示例

代码示例来源:origin: Wimmics/corese

public int slice(Query q) {
  Query g = q.getOuterQuery();
  return g.getSlice();
}

代码示例来源:origin: Wimmics/corese

boolean isMap(Query q) {
  Query g = q.getOuterQuery();
  return g.isMap();
}

代码示例来源:origin: fr.inria.corese/kgram

/**
 * Use outer query node index for all (sub) queries
 */
int newGlobalNodeIndex() {
  return getOuterQuery().newNodeIndex();
}

代码示例来源:origin: fr.inria.corese/kgram

int globalNodeIndex() {
  return getOuterQuery().getNodeIndex();
}

代码示例来源:origin: fr.inria.corese/kgram

/**
 * Generate or retrieve index of node If node is in a sub query, return the
 * index of the outer node corresponding to node and rec.
 */
int qIndex(Query query, Node node) {
  int n = index(node);
  if (query != this && query.inSelect(node)) {
    // get the outer node for this sub select sNode
    Node oNode = query.getOuterQuery().getProperAndSubSelectNode(node.getLabel());
    if (oNode != null) {
      n = qIndex(query.getOuterQuery(), oNode);
    }
  }
  return n;
}

代码示例来源:origin: fr.inria.corese/corese-core

int timeout = getTimeout(q, serviceNode, eval.getEnvironment());
boolean parallel = q.getOuterQuery().isNew();

代码示例来源:origin: Wimmics/corese

int timeout = getTimeout(q, serviceNode, eval.getEnvironment());
boolean parallel = q.getOuterQuery().isParallel();

代码示例来源:origin: fr.inria.corese/kgram

public void setAggregate() {
  for (Exp exp : getSelectFun()) {
    if (exp.getFilter() != null) {
      if (exp.isAggregate() && !exp.isExpGroupBy()) {
        setAggregate(true);
      } else if (exp.getFilter().isFunctional()) {
        setFunctional(true);
        getOuterQuery().setHasFunctional(true);                   
      }
    }
  }
  for (Exp exp : getOrderBy()) {
    if (exp.getFilter() != null && exp.getFilter().isAggregate()) {
      setAggregate(true);
    }
  }
}

代码示例来源:origin: Wimmics/corese

/**
 * Mappings map is result of preceding query pattern
 * Take map into account to evaluate service clause on remote endpoint
 * Generate relevant bindings for the service:
 * 
 * for each Mapping m in map : 
 * for each var in select clause of service : 
 * generate filter (var = m.value(var))
 */
public boolean compile(Node serv, Query q, Mappings map, Environment env, int start, int limit) {
  Query out = q.getOuterQuery();
  if (map == null || (map.size() == 1 && map.get(0).size() == 0)) {
    // lmap may contain one empty Mapping
    // use env because it may have bindings
    if (isValues(out)) {
      bindings(q, env);
    } else if (isFilter(out) || provider.isSparql0(serv)) {
      filter(q, env);
    } else {
      bindings(q, env);
    }
    return true;
  } else if (isValues(out)) {
    return bindings(q, map, start, limit);
  } else if (isFilter(out) || provider.isSparql0(serv)) {
    return filter(q, map, start, limit);
  } else {
    return bindings(q, map, start, limit);
  }
}

相关文章