本文整理了Java中fr.inria.corese.kgram.core.Query.setAST
方法的一些代码示例,展示了Query.setAST
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setAST
方法的具体详情如下:
包路径:fr.inria.corese.kgram.core.Query
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!