com.bagri.core.model.Query.getXdmQuery()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(207)

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

Query.getXdmQuery介绍

暂无

代码示例

代码示例来源:origin: dsukhoroslov/bagri

@Override
public Collection<String> prepareQuery(String query) { //throws BagriException {
  logger.trace("prepareQuery.enter; query: {}", query);
  Collection<String> result = null;
  Query xq = xqCache.get(getQueryKey(query));
  if (xq != null) {
    result = xq.getXdmQuery().getParamNames();
  }
  logger.trace("prepareQuery.exit; returning: {}", result);
  return result;
}

代码示例来源:origin: dsukhoroslov/bagri

private PathExpression getCachedPathExpression(Query query, int pathId) {
  for (ExpressionContainer ec: query.getXdmQuery().getContainers()) {
    for (Expression ex: ec.getBuilder().getExpressions()) {
      if (ex.isCached()) {
        QueriedPath qp = ((PathExpression) ex).getCachedPath();
        if (qp.getPathIds().contains(pathId)) {
          return (PathExpression) ex;
        }
      }
    }
  }
  return null;
}

代码示例来源:origin: dsukhoroslov/bagri

@Override
public void write(ObjectDataOutput out, Query xQuery) throws IOException {
  out.writeUTF(xQuery.getQuery());
  out.writeBoolean(xQuery.isReadOnly());
  out.writeObject(xQuery.getXdmQuery());
}

代码示例来源:origin: dsukhoroslov/bagri

private boolean intersects(Query query, Collection<Integer> pathIds, boolean checkIndexed) {
  for (ExpressionContainer ec: query.getXdmQuery().getContainers()) {
    for (Expression ex: ec.getBuilder().getExpressions()) {
      if (ex.isCached()) {
        QueriedPath qp = ((PathExpression) ex).getCachedPath();
        if (!checkIndexed || qp.isIndexed()) {
          for (Integer pid: pathIds) {
            if (qp.getPathIds().contains(pid)) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}

代码示例来源:origin: dsukhoroslov/bagri

xdmQuery = xQuery.getXdmQuery();

相关文章