if (query.getTypeName() == null){
query = new DefaultQuery(query);
((DefaultQuery)query).setTypeName(this.getSchema().getTypeName());
}else if (!query.getTypeName().equals(this.getSchema().getTypeName())){
//types do not match
return new EmptyFeatureCollection(this.getSchema());
}
Filter[] filters = splitFilter(query.getFilter());
Filter envFilter = filters[0];
//Filter postFilter = filters[1];
if (envFilter.equals(Filter.EXCLUDE)){
//nothing to get
return new EmptyFeatureCollection(this.getSchema());
}else if (envFilter.equals(Filter.INCLUDE)){
//lets create a new bbox filter out of the bounds
envFilter = createFilterFromBounds();
return new GridCachingFeatureCollection((BBOX)envFilter, query, this, this.fs, true);
}else if (envFilter instanceof BBOX){