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

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

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

Query.setFilter介绍

暂无

代码示例

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

/**
 * Generate predefined system filters that may be used by kgram Filters are
 * stored in a table, we can have several predefined filters pathNode()
 * generate a blank node for each path (PathFinder)
 */
void filters(Query q) {
  ASTQuery ast = (ASTQuery) q.getAST();
  Term t = Term.function(Processor.PATHNODE);
  q.setFilter(Query.PATHNODE, t.compile(ast));
}

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

/**
 * Generate predefined system filters that may be used by kgram Filters are
 * stored in a table, we can have several predefined filters pathNode()
 * generate a blank node for each path (PathFinder)
 */
void filters(Query q) {
  ASTQuery ast = (ASTQuery) q.getAST();
  Term t = Term.function(Processor.PATHNODE);
  q.setFilter(Query.PATHNODE, t.compile(ast));
}

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

void initExp(Query q, Expr exp) {
  switch (exp.oper()) {
            
    case ExprType.STL_IMPORT:
      if (exp.getExpList().size() >= 1){
        q.setFilter(STL_IMPORT, exp.getFilter());
        //loadImport(exp.getExp(0).getLabel());
      }
      break;
    case ExprType.STL_CONCAT:
      for (Expr ee : exp.getExpList()) {
        initExp(q, ee);
      }
      break;
  }
}

相关文章