org.geotools.data.Query.equals()方法的使用及代码示例

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

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

Query.equals介绍

[英]Equality based on all query parameters other than the handle.
[中]基于除句柄以外的所有查询参数的相等性。

代码示例

代码示例来源:origin: geoserver/geoserver

if ((query == Query.ALL) || query.equals(Query.ALL)) {
  return query;

代码示例来源:origin: geotools/geotools

/**
 * Returns the IndexMode usage mode to use for current Query
 *
 * <p>QueryIndexMode.ALL: if all filter and sort attributes are indexed QueryIndexMode.PARTIAL:
 * if at least one filter attribute is indexed, all sort attributes indexed QueryIndexMode.NONE:
 * If no one of previous conditions are accomplished
 *
 * @return QueryIndexMode
 */
public QueryIndexCoverage getIndexMode() {
  if (query.equals(Query.ALL)
      || query.equals(Query.FIDS)
      || query.getFilter().equals(Filter.INCLUDE)) return QueryIndexCoverage.NONE;
  // Filter match:
  List<String> filterAttributes = IndexQueryUtils.getAttributesOnFilter(query.getFilter());
  int filterMatchCount =
      (int) filterAttributes.stream().filter(attr -> hasIndex(attr)).count();
  // Sort match:
  List<String> sortAttributes = IndexQueryUtils.getAttributesOnSort(query);
  int sortMatchCount = (int) sortAttributes.stream().filter(attr -> hasIndex(attr)).count();
  // Query mode rules:
  if (filterAttributes.size() == filterMatchCount && sortAttributes.size() == sortMatchCount)
    return QueryIndexCoverage.ALL;
  if (filterMatchCount > 0 && sortAttributes.size() == sortMatchCount)
    return QueryIndexCoverage.PARTIAL;
  return QueryIndexCoverage.NONE;
}

代码示例来源:origin: geotools/geotools

if (firstQuery == null || firstQuery.equals(Query.ALL)) {
  return secondQuery;
} else if (secondQuery == null || secondQuery.equals(Query.ALL)) {
  return firstQuery;

代码示例来源:origin: geotools/geotools

if ((query == Query.ALL) || query.equals(Query.ALL)) {
  return new DefaultQuery(constraintQuery);

代码示例来源:origin: geotools/geotools

FeatureSource source = mapping.getSource();
if (!Query.ALL.equals(query)) {
  Filter complexFilter = query.getFilter();
  Filter unrolledFilter = AppSchemaDataAccess.unrollFilter(complexFilter, mapping);

代码示例来源:origin: org.geotools/gt-imagemosaic

if(q.equals(Query.ALL))
  return features;

代码示例来源:origin: org.geoserver.extension/imagemap

if (!definitionQuery.equals(Query.ALL)) {
  if (q.equals(Query.ALL)) {
    q = (Query) definitionQuery;
  } else {

代码示例来源:origin: org.geotools/gt-main

if (firstQuery == null || firstQuery.equals(Query.ALL)) {
  return secondQuery;
} else if (secondQuery == null || secondQuery.equals(Query.ALL)) {
  return firstQuery;

代码示例来源:origin: org.geotools/gt-main

if ((query == Query.ALL) || query.equals(Query.ALL)) {
  return new DefaultQuery(constraintQuery);

代码示例来源:origin: org.geotools/gt-app-schema

FeatureSource source = mapping.getSource();
if (!Query.ALL.equals(query)) {
  Filter complexFilter = query.getFilter();
  Filter unrolledFilter = AppSchemaDataAccess.unrollFilter(complexFilter, mapping);

相关文章