本文整理了Java中fr.inria.corese.kgram.core.Query.getArgList
方法的一些代码示例,展示了Query.getArgList
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getArgList
方法的具体详情如下:
包路径:fr.inria.corese.kgram.core.Query
类名称:Query
方法名:getArgList
暂无
代码示例来源:origin: Wimmics/corese
String getArg(Query q, int n){
if (q == null || q.getArgList().isEmpty()){
return getArg(n);
}
List<Node> list = q.getArgList();
if (n < list.size()){
return list.get(n).getLabel();
}
else {
return getArg(n);
}
}
代码示例来源:origin: Wimmics/corese
/**
* Check whether template q already applied on dt focus and possibly args
*/
@Deprecated
boolean contains2(IDatatype dt, IDatatype[] args, Query q) {
ArrayList<Query> qlist = map.get(dt);
if (qlist == null || ! qlist.contains(q)){
return false;
}
// q is in dt stack
if (q.getArgList().size() <= 1){
// 0 or 1 argument: ?in or (?x)
return true;
}
// template q has several arguments
ArrayList<IDatatype[]> alist = arg.get(dt);
return contains(alist, args, qlist, q);
}
代码示例来源:origin: Wimmics/corese
/**
* Check whether template q already applied on dt focus and possibly args
*/
boolean contains(IDatatype dt, IDatatype[] args, Query q) {
ArrayList<Query> qlist = map.get(dt);
if (qlist == null) {
return false;
}
ArrayList<IDatatype[]> alist = arg.get(dt);
for (int i = 0; i < qlist.size(); i++) {
if (qlist.get(i) == q) {
// q is in dt stack
if (q.getArgList().size() <= 1) {
// 0 or 1 argument: ?in or (?x)
// q in stack of dt
return true;
}
else if (same(alist.get(i), args)) {
return true;
}
}
}
return false;
}
代码示例来源:origin: Wimmics/corese
Mapping getMapping(Query q, IDatatype[] ldt, IDatatype dt) {
if (ldt != null && q != null && !q.getArgList().isEmpty()) {
return getMapping(q, ldt);
}
else {
return getMappingCache(q, dt);
}
}
代码示例来源:origin: Wimmics/corese
Mapping getMapping(Query q, IDatatype[] values) {
Mapping map = q.getMapping();
if (map == null || map.getNodes().length != values.length){
map = getMapping(q.getArgList(), values);
q.setMapping(map);
}
else {
// reuse template Mapping
for (int i = 0; i<values.length; i++){
//map.getNodes()[i] = getNode(values[i]);
map.setNode(getNode(values[i]), i);
}
}
return map;
}
代码示例来源: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: Wimmics/corese
if (qq != tq && qq.getArgList() != null) {
代码示例来源:origin: fr.inria.corese/corese-core
if (qq != tq && qq.getArgList() != null) {
代码示例来源: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());
}
}
内容来源于网络,如有侵权,请联系作者删除!