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

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

本文整理了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

  1. @Override
  2. public Collection<String> prepareQuery(String query) { //throws BagriException {
  3. logger.trace("prepareQuery.enter; query: {}", query);
  4. Collection<String> result = null;
  5. Query xq = xqCache.get(getQueryKey(query));
  6. if (xq != null) {
  7. result = xq.getXdmQuery().getParamNames();
  8. }
  9. logger.trace("prepareQuery.exit; returning: {}", result);
  10. return result;
  11. }

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

  1. private PathExpression getCachedPathExpression(Query query, int pathId) {
  2. for (ExpressionContainer ec: query.getXdmQuery().getContainers()) {
  3. for (Expression ex: ec.getBuilder().getExpressions()) {
  4. if (ex.isCached()) {
  5. QueriedPath qp = ((PathExpression) ex).getCachedPath();
  6. if (qp.getPathIds().contains(pathId)) {
  7. return (PathExpression) ex;
  8. }
  9. }
  10. }
  11. }
  12. return null;
  13. }

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

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

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

  1. private boolean intersects(Query query, Collection<Integer> pathIds, boolean checkIndexed) {
  2. for (ExpressionContainer ec: query.getXdmQuery().getContainers()) {
  3. for (Expression ex: ec.getBuilder().getExpressions()) {
  4. if (ex.isCached()) {
  5. QueriedPath qp = ((PathExpression) ex).getCachedPath();
  6. if (!checkIndexed || qp.isIndexed()) {
  7. for (Integer pid: pathIds) {
  8. if (qp.getPathIds().contains(pid)) {
  9. return true;
  10. }
  11. }
  12. }
  13. }
  14. }
  15. }
  16. return false;
  17. }

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

  1. xdmQuery = xQuery.getXdmQuery();

相关文章