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

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

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

Query.getValues介绍

暂无

代码示例

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

public List<Node> getBindingNodes() {
  if (getValues() == null) {
    return bindingNodes;
  }
  return getValues().getNodeList();
}

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

sb.append(getHaving());
Exp val = getValues();
if (val != null && val.getMappings().size() > 0) {
  sb.append("\n");

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

/**
 * Select Query is empty and does nothing
 */
boolean isEmpty(){
  return isSelect()
      && getSelectFun().isEmpty()
      && getBody().size() == 0
      && getValues().getMappings() == null;            
}

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

void values(Query q, ASTQuery ast){
  if (ast.getValues() == null) {
    return;
  }
  bindings(q, ast);
  if (q.getValues() != null && isAlgebra()){
    if (q.getBody().size() == 0){
      q.setBody(q.getValues());
    }
    else {
      Exp exp = Exp.create(JOIN, Exp.create(BGP, q.getValues()), q.getBody());
      q.setBody(Exp.create(BGP, exp));
    }
  }
}

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

void values(Query q, ASTQuery ast){
  if (ast.getValues() == null) {
    return;
  }
  bindings(q, ast);
  if (q.getValues() != null && isAlgebra()){
    if (q.getBody().size() == 0){
      q.setBody(q.getValues());
    }
    else {
      Exp exp = Exp.create(JOIN, Exp.create(BGP, q.getValues()), q.getBody());
      q.setBody(Exp.create(BGP, exp));
    }
  }
}

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

int query(Node gNode, Query q) {
  if (q.getValues() != null) {
    Exp values = q.getValues();
    if (! values.isPostpone() && !q.isAlgebra()) {
      for (Mapping m : values.getMappings()) {
        if (stop) {
          return STOP;
        }
        if (binding(values.getNodeList(), m)) {
          eval(gNode, q);
          free(values.getNodeList(), m);
        }
      }
      return 0;
    }
  } 
  
  return eval(gNode, q);
}

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

void bindings(Query q, ASTQuery ast) {
    Exp bind = bindings(ast.getValues());
    if (bind == null) {
      q.setCorrect(false);
      q.addError("Value Bindings: ", "#values != #variables");
    } else {
      q.setValues(bind);
      if (ast.getValues().isMoved()) {
        //q.setTemplateMappings(bind.getMappings());
        q.getValues().setPostpone(true);
      } 
//            else {
//                q.setMappings(bind.getMappings());
//                q.setBindingNodes(bind.getNodeList());
//            }
    }
  }

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

return false;
    } else if (q.getBindingNodes().contains(value) && q.getValues().getMappings() != null) {
      for (Mapping map : q.getValues().getMappings()) {
} else if (q.getBindingNodes().contains(var) && q.getValues().getMappings() != null) {
  for (Mapping map : q.getValues().getMappings()) {

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

void bindings(Query q, ASTQuery ast) {
    Exp bind = bindings(ast.getValues());
    if (bind == null) {
      q.setCorrect(false);
      q.addError("Value Bindings: ", "#values != #variables");
    } else {
      q.setValues(bind);
      if (ast.getValues().isMoved()) {
        //q.setTemplateMappings(bind.getMappings());
        q.getValues().setPostpone(true);
      } 
//            else {
//                q.setMappings(bind.getMappings());
//                q.setBindingNodes(bind.getNodeList());
//            }
    }
  }

相关文章