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

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

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

Query.getHaving介绍

暂无

代码示例

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

public Mappings filter(Mappings map, Query q) {
  Query qq = map.getQuery();
  init(qq);
  qq.compile(q.getHaving().getFilter());
  qq.index(qq, q.getHaving().getFilter());
  //q.complete();
  map.filter(evaluator, q.getHaving().getFilter(), memory);
  return map;
}

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

sb.append(getGroupBy());
if (getHaving() != null) {
  sb.append("\n");
  sb.append("having ");
  sb.append(getHaving());

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

/**
 * Compile additional filters that may contain exists {}.
 */
void modifier(Query q) {
  compile(q.getSelectFun());
  compile(q.getOrderBy());
  compile(q.getGroupBy());
  if (q.getHaving() != null) {
    compile(q.getHaving().getFilter());
  }
  for (Filter f : q.getFunList()) {
    compile(f);
  }
}

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

void aggregate(Query qq, Evaluator evaluator, Memory memory, Producer p, boolean isFinish) {
  if (size() == 0) {
    if (qq.isAggregate()) {
      // SPARQL test cases requires that aggregate on empty result set return one empty result
      // and count() return 0
      add(Mapping.fake(qq));
      setFake(true);  
    } else {
      return;
    }
  }
  boolean isEvent = hasEvent;
  // select (count(?n) as ?count)
  aggregate(evaluator, memory, p, qq.getSelectFun(), true);
  // order by count(?n)
  aggregate(evaluator, memory, p, qq.getOrderBy(), false);
  if (qq.getHaving() != null) {
    if (isEvent) {
      Event event = EventImpl.create(Event.AGG, query.getHaving());
      manager.send(event);
    }
    eval(evaluator, qq.getHaving(), memory, p, HAVING);
  }
  finish(qq);
}

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

void finish(Query qq) {
  setNbsolutions(size());
  if (qq.hasGroupBy() && !qq.isConstruct()) {
    // after group by (and aggregate), leave one Mapping for each group
    // with result of the group
    groupBy();
  } else if (qq.getHaving() != null) {
    // clause 'having' with no group by
    // select (max(?x) as ?max where {}
    // having(?max > 100)
    having();
  } else if (qq.isAggregate() && !qq.isConstruct()) {
    clean();
  }
}

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

/**
 *
 * index(node) use global query index
 */
void complete2() {
  for (Filter f : getPathFilter()) {
    index(this, f);
  }
  index(getOrderBy());
  index(getGroupBy());
  if (getHaving() != null) {
    index(this, getHaving().getFilter());
  }
  
  for (Filter f :getFunList()){
    index(this, f);
  }
  for (Node node : getBindingNodes()) {
    index(node);
  }
  for (Node node : getArgList()) {
    index(node);
  }
  if (getGraphNode() != null) {
    index(getGraphNode());
  }
  if (getPathNode() != null) {
    index(getPathNode());
  }
}

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

if (q.getHaving() != null) {
  visit(q.getHaving().getFilter().getExp(), list);

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

if (q.getHaving() != null) {
  visit(q.getHaving().getFilter().getExp(), list);

相关文章