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

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

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

Query.setAST介绍

暂无

代码示例

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

Query complete(Query q1, Query q2) {
  q1.setOuterQuery(this);
  q2.setOuterQuery(this);
  setGlobalQuery(getBody());
  setSelect(q1, q2);
  collect();
  setAST(q2.getAST());
  return this;
}

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

/**
 * For query and subquery Generate a new compiler for each (sub) query in
 * order to get fresh new nodes
 */
Query compile(ASTQuery ast) {
  Exp ee = compile(ast.getExtBody(), false);
  Query q = Query.create(ee);
  q.setUseBind(isUseBind);
  compileFunction(q, ast);
  q.setAST(ast);
  q.setHasFunctional(ast.hasFunctional());
  q.setService(ast.getService());
  // use same compiler
  values(q, ast);
  path(q, ast);
  return q;
}

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

/**
 * For query and subquery Generate a new compiler for each (sub) query in
 * order to get fresh new nodes
 */
Query compile(ASTQuery ast) {
  Exp ee = compile(ast.getExtBody(), false);
  Query q = Query.create(ee);
  q.setUseBind(isUseBind);
  compileFunction(q, ast);
  q.setAST(ast);
  q.setHasFunctional(ast.hasFunctional());
  q.setService(ast.getService());
  // use same compiler
  values(q, ast);
  path(q, ast);
  return q;
}

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

/**
 * Compile Graph into a BGP Generate a Query
 */
public Query getQuery() {
  Transformer t = Transformer.create();
  ASTQuery ast = ASTQuery.create();
  ast.setSelectAll(true);
  ast.setBody(BasicGraphPattern.create());
  ast = visitor.visit(ast);
  graph = visitor.visit(graph);
  Exp exp = getExp(graph);
  Query q = Query.create(exp);
  q.setAST(ast);
  q = t.transform(q, ast);
  q.setDebug(isDebug);
  q = visitor.visit(q);
  if (isConstruct()) {
    // TODO: blanks in construct should be renamed
    q.setConstruct(q.getBody());
    q.setConstruct(true);
  }
  return q;
}

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

/**
 * Compile Graph into a BGP Generate a Query
 */
public Query getQuery() {
  Transformer t = Transformer.create();
  ASTQuery ast = ASTQuery.create();
  ast.setSelectAll(true);
  ast.setBody(BasicGraphPattern.create());
  ast = visitor.visit(ast);
  graph = visitor.visit(graph);
  Exp exp = getExp(graph);
  Query q = Query.create(exp);
  q.setAST(ast);
  q = t.transform(q, ast);
  q.setDebug(isDebug);
  q = visitor.visit(q);
  if (isConstruct()) {
    // TODO: blanks in construct should be renamed
    q.setConstruct(q.getBody());
    q.setConstruct(true);
  }
  return q;
}

相关文章