org.deegree.feature.persistence.query.Query.getSortProperties()方法的使用及代码示例

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

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

Query.getSortProperties介绍

[英]Returns the sort criteria.
[中]返回排序条件。

代码示例

代码示例来源:origin: deegree/deegree3

private org.deegree.protocol.wfs.query.Query toWFSQuery( Query query ) {
  TypeName[] typeNames = query.getTypeNames();
  String featureVersion = null;
  ICRS srsName = null;
  PropertyName[] projectionClauses = null;
  SortProperty[] sortBy = query.getSortProperties();
  Filter filter = query.getFilter();
  return new FilterQuery( null, typeNames, featureVersion, srsName, projectionClauses, sortBy, filter );
}

代码示例来源:origin: deegree/deegree3

AbstractWhereBuilder wb = getWhereBuilder( ft, filter, query.getSortProperties(), conn );

代码示例来源:origin: deegree/deegree3

if ( query.getSortProperties().length > 0 ) {
  LOG.debug( "Applying in-memory post-sorting." );
  result = new MemoryFeatureInputStream( Features.sortFc( result.toCollection(), query.getSortProperties() ) );

代码示例来源:origin: deegree/deegree3

Envelope env = queries[0].getPrefilterBBoxEnvelope();
if ( getSchema().getBlobMapping() != null && queries[0].getFilter() == null
   && queries[0].getSortProperties().length == 0 ) {
  wmsStyleQuery = true;
  for ( int i = 1; i < queries.length; i++ ) {
    Envelope queryBBox = queries[i].getPrefilterBBoxEnvelope();
    if ( queryBBox != env && queries[i].getFilter() != null && queries[i].getSortProperties() != null ) {
      wmsStyleQuery = false;
      break;

代码示例来源:origin: deegree/deegree3

conn = getConnection();
wb = getWhereBuilder( ft, filter, query.getSortProperties(), conn );
String ftTableAlias = wb.getAliasManager().getRootTableAlias();
LOG.debug( "WHERE clause: " + wb.getWhere() );

代码示例来源:origin: deegree/deegree3

query.getSortProperties() );
HashSet<Integer> recNums = new HashSet<Integer>( unzipPair( recNumsAndPos ).first );
if ( idFilterNums != null ) {
  p = new Pair<Filter, SortProperty[]>( filterPair.first, query.getSortProperties() );

代码示例来源:origin: deegree/deegree3

SortProperty[] sortCrit = query.getSortProperties();
if ( sortCrit.length > 0 ) {
  fc = Features.sortFc( fc, sortCrit );

代码示例来源:origin: deegree/deegree3

@Override
public FeatureInputStream query( Query query )
            throws FeatureStoreException, FilterEvaluationException {
  if ( query.getTypeNames() == null || query.getTypeNames().length > 1 ) {
    String msg = "Join queries between multiple feature types are not by SQLFeatureStore (yet).";
    throw new UnsupportedOperationException( msg );
  }
  FeatureInputStream result = null;
  Filter filter = query.getFilter();
  if ( query.getTypeNames().length == 1 && ( filter == null || filter instanceof OperatorFilter ) ) {
    QName ftName = query.getTypeNames()[0].getFeatureTypeName();
    FeatureType ft = getSchema().getFeatureType( ftName );
    if ( ft == null ) {
      String msg = "Feature store is not configured to serve feature type '" + ftName + "'.";
      throw new FeatureStoreException( msg );
    }
    result = queryByOperatorFilter( query, ftName, (OperatorFilter) filter );
  } else {
    // must be an id filter based query
    if ( query.getFilter() == null || !( query.getFilter() instanceof IdFilter ) ) {
      String msg = "Invalid query. If no type names are specified, it must contain an IdFilter.";
      throw new FilterEvaluationException( msg );
    }
    result = queryByIdFilter( query.getTypeNames(), (IdFilter) filter, query.getSortProperties() );
  }
  return result;
}

代码示例来源:origin: deegree/deegree3

@Override
public int queryHits( Query query )
            throws FeatureStoreException, FilterEvaluationException {
  if ( query.getTypeNames() == null || query.getTypeNames().length > 1 ) {
    String msg = "Join queries between multiple feature types are not supported by the SQLFeatureStore implementation (yet).";
    throw new UnsupportedOperationException( msg );
  }
  Filter filter = query.getFilter();
  int hits = 0;
  if ( query.getTypeNames().length == 1 && ( filter == null || filter instanceof OperatorFilter ) ) {
    QName ftName = query.getTypeNames()[0].getFeatureTypeName();
    FeatureType ft = getSchema().getFeatureType( ftName );
    if ( ft == null ) {
      String msg = "Feature type '" + ftName + "' is not served by this feature store.";
      throw new FeatureStoreException( msg );
    }
    hits = queryHitsByOperatorFilter( query, ftName, (OperatorFilter) filter );
  } else {
    // must be an id filter based query
    if ( query.getFilter() == null || !( query.getFilter() instanceof IdFilter ) ) {
      String msg = "Invalid query. If no type names are specified, it must contain an IdFilter.";
      throw new FilterEvaluationException( msg );
    }
    // should be no problem iterating over the features (id queries usually request only a few ids)
    hits = queryByIdFilter( query.getTypeNames(), (IdFilter) filter, query.getSortProperties() ).count();
  }
  return hits;
}

相关文章