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

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

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

Query.getFilter介绍

[英]Returns the Filter.
[中]返回过滤器。

代码示例

代码示例来源: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

if ( q.getFilter() != null ) {
  set = new FilteredFeatureInputStream( set, q.getFilter() );

代码示例来源: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;
}

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

if ( query.getFilter() != null ) {
  fc = fc.getMembers( query.getFilter(), evaluator );
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 );
for ( ResourceId id : ( (IdFilter) query.getFilter() ).getSelectedIds() ) {
  GMLObject object = idToObject.get( id.getRid() );
  if ( object != null && object instanceof Feature ) {

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

if ( query.getFilter() instanceof IdFilter ) {
  idFilterNums = new HashSet<Integer>();
  IdFilter f = (IdFilter) query.getFilter();
  List<ResourceId> ids = f.getSelectedIds();
  for ( ResourceId id : ids ) {
if ( query.getTypeNames().length == 0 && !( query.getFilter() instanceof IdFilter ) || idFilterNums != null
   && idFilterNums.isEmpty() ) {
  return new MemoryFeatureInputStream( new GenericFeatureCollection() );
Filter filter = query.getFilter();
Pair<Filter, Envelope> filterPair = splitOffBBoxConstraint( filter );

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

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;

相关文章