本文整理了Java中fr.inria.corese.kgram.core.Query.collect
方法的一些代码示例,展示了Query.collect
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.collect
方法的具体详情如下:
包路径:fr.inria.corese.kgram.core.Query
类名称:Query
方法名:collect
暂无
代码示例来源:origin: fr.inria.corese/kgram
void collectExist(Expr exp) {
switch (exp.oper()) {
case ExprType.EXIST:
Exp pat = getPattern(exp);
collect(pat, true);
break;
default:
for (Expr ee : exp.getExpList()) {
collectExist(ee);
}
}
}
代码示例来源: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/kgram
public void collect() {
if (getPathNode() != null) {
/**
* use case: ?x ex:prop @[?this != <John>] + ?y collect ?this first
* because it may be within @[exists {?this ?p ?y}} and even worse
* within @[exists {select ?this where {?this ?p ?y}}]
*/
store(getPathNode(), false, false);
}
for (Exp ee : this) {
collect(ee, false);
}
for (Node node : getBindingNodes()) {
store(node, false, false);
}
for (Node node : getArgList()) {
store(node, false, false);
}
for (Filter ff : getPathFilter()) {
collectExist(ff.getExp());
}
for (Filter f : getFunList()){
collectExist(f.getExp());
}
}
代码示例来源:origin: fr.inria.corese/compiler
void complete(Query qCurrent, ASTQuery ast) {
qCurrent.collect();
//qCurrent.setSelectFun(select(qCurrent, ast));
select(qCurrent, ast);
qCurrent.setOrderBy(orderBy(qCurrent, ast));
qCurrent.setGroupBy(groupBy(qCurrent, ast));
qCurrent.setDistinct(ast.isDistinct());
// generate a DISTINCT(?x) for distinct ?x
qCurrent.distinct();
qCurrent.setFrom(nodes(ast.getActualFrom()));
qCurrent.setNamed(nodes(ast.getActualNamed()));
// sort from uri to speed up verification at query time
// Producer may use dichotomy
qCurrent.setFrom(sort(qCurrent.getFrom()));
qCurrent.setNamed(sort(qCurrent.getNamed()));
qCurrent.setLimit(Math.min(ast.getMaxResult(), ast.getMaxProjection()));
qCurrent.setOffset(ast.getOffset());
qCurrent.setGraphNode(createNode());
if (qCurrent.isCorrect()) {
// check semantics of select vs aggregates and group by
boolean correct = qCurrent.check();
if (!correct) {
qCurrent.setCorrect(false);
} else {
qCurrent.setCorrect(ast.isCorrect());
}
}
}
代码示例来源:origin: fr.inria.corese/kgram
collect(exp.first(), exist);
collect(exp.rest(), true);
collect(ee, exist);
代码示例来源:origin: Wimmics/corese
void complete(Query qCurrent, ASTQuery ast) {
qCurrent.collect();
//qCurrent.setSelectFun(select(qCurrent, ast));
select(qCurrent, ast);
qCurrent.setOrderBy(orderBy(qCurrent, ast));
qCurrent.setGroupBy(groupBy(qCurrent, ast));
qCurrent.setDistinct(ast.isDistinct());
// generate a DISTINCT(?x) for distinct ?x
qCurrent.distinct();
qCurrent.setFrom(nodes(ast.getActualFrom()));
qCurrent.setNamed(nodes(ast.getActualNamed()));
// sort from uri to speed up verification at query time
// Producer may use dichotomy
qCurrent.setFrom(sort(qCurrent.getFrom()));
qCurrent.setNamed(sort(qCurrent.getNamed()));
qCurrent.setLimit(Math.min(ast.getMaxResult(), ast.getMaxProjection()));
qCurrent.setOffset(ast.getOffset());
qCurrent.setGraphNode(createNode());
if (qCurrent.isCorrect()) {
// check semantics of select vs aggregates and group by
boolean correct = qCurrent.check();
if (!correct) {
qCurrent.setCorrect(false);
} else {
qCurrent.setCorrect(ast.isCorrect());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!