Refine search
SortBy[] sortBy = query.getSortBy(); Integer offset = null, maxFeatures = null; if (sortBy != null && sortBy != SortBy.UNSORTED) { if (!source.getQueryCapabilities().supportsSorting(sortBy)) { query.setSortBy(null); offset = query.getStartIndex(); maxFeatures = query.getMaxFeatures() == Integer.MAX_VALUE ? null : query.getMaxFeatures(); if (query.getStartIndex() != null) { if (!source.getQueryCapabilities().isOffsetSupported()) { offset = query.getStartIndex(); maxFeatures =
public boolean isUseProvidedFIDSupported() { return delegate.isUseProvidedFIDSupported(); }
public boolean isReliableFIDSupported() { return delegate.isReliableFIDSupported(); }
private SimpleFeatureCollection getFeatureCollection(Query query, Envelope bounds) throws IOException { query = DataUtilities.resolvePropertyNames(query, getSchema()); final int offset = query.getStartIndex() != null ? query.getStartIndex() : 0; if (offset > 0 & query.getSortBy() == null) { if (!getQueryCapabilities().supportsSorting(query.getSortBy())) { throw new IllegalStateException( "Feature source does not support this sorting "
Filter txFilter = transformFilter(query.getFilter()); Query txQuery = new Query(query); txQuery.setTypeName(source.getSchema().getTypeName()); txQuery.setPropertyNames(getRequiredAttributes(query)); txQuery.setSortBy(getTransformedSortBy(query)); if (query.getStartIndex() != null && !caps.isJoiningSupported()) { txQuery.setStartIndex(null); if (query.getSortBy() != null && !caps.supportsSorting(txQuery.getSortBy())) { txQuery.setSortBy(null); if (!caps.isOffsetSupported()) { txQuery.setStartIndex(null);
if (query.getStartIndex() != null && (query.getSortBy() == null || query.getSortBy().length == 0)) { Query dq = new Query(query); dq.setSortBy(new SortBy[] {SortBy.NATURAL_ORDER}); if (!query.getJoins().isEmpty() && getQueryCapabilities().isJoiningSupported()) { throw new IOException("Feature source does not support joins");
(FeatureSource<FeatureType, Feature>) layer.getFeatureSource(); FeatureType schema = source.getSchema(); Query query = new Query(Query.ALL); Filter filter = null; query = new Query(schema.getName().getLocalPart()); query.setFilter(filter); query.setProperties(attributes); processRuleForQuery(styleList, query); if (sortBy != null) { QueryCapabilities qc = source.getQueryCapabilities(); if (qc != null && !qc.supportsSorting(sortBy)) { throw new IllegalArgumentException( "The feature source in layer "
FeatureSource<? extends FeatureType, ? extends Feature> featureSource = layer.getFeatureSource(true); final Query definitionQuery = new Query(featureSource.getSchema().getName().getLocalPart()); definitionQuery.setVersion(getMap.getFeatureVersion()); definitionQuery.setFilter(filter); definitionQuery.setSortBy(params.getSort()); Map<String, String> viewParams = params.getViewParams(); if (startIndex != null) { QueryCapabilities queryCapabilities = featureSource.getQueryCapabilities(); if (queryCapabilities.isOffsetSupported()) {
Query query = null; if (type != null){ query= new Query(rasterManager.granuleCatalog.getType().getTypeName()); final Filter bbox=FeatureUtilities.DEFAULT_FILTER_FACTORY.bbox(FeatureUtilities.DEFAULT_FILTER_FACTORY.property(rasterManager.granuleCatalog.getType().getGeometryDescriptor().getName()),mosaicBBox); query.setFilter( bbox); } else { throw new IllegalStateException("GranuleCatalog feature type was null!!!"); query.setFilter( FeatureUtilities.DEFAULT_FILTER_FACTORY.and(query.getFilter(), FeatureUtilities.DEFAULT_FILTER_FACTORY.or(elevationF)) if(rasterManager.granuleCatalog.getQueryCapabilities().supportsSorting(sb)){ query.setSortBy(sb);
Query updatedQuery = query != null ? query : new Query(); Filter filter = updatedQuery.getFilter(); updatedQuery.setFilter(FF.like(FF.property(attribute), value)); final SortBy[] sb = clauses.toArray(new SortBy[] {}); final boolean isSortBySupported = granuleCatalog.getQueryCapabilities(typeName).supportsSorting(sb); if (isSortBySupported) { updatedQuery.setSortBy(sb);
final String attribute, final String secondAttribute, final DomainType domainType) throws IOException { final Query query = new Query(typeName); query.setPropertyNames(Arrays.asList(attribute, secondAttribute)); if (granuleCatalog.getQueryCapabilities(typeName).supportsSorting(sb)) { query.setSortBy(sb); } else { LOGGER.severe(
Query updatedQuery = (query != null && sharedCatalog) ? query : new Query(); final SortBy[] sb = clauses.toArray(new SortBy[] {}); final boolean isSortBySupported = slicesCatalog.getQueryCapabilities(coverageName).supportsSorting(sb); if (isSortBySupported) { updatedQuery.setSortBy(sb); updatedQuery.setTypeName(coverageName);
String typeName = schema.getTypeName(); if( query.getTypeName() == null ){ // typeName unspecified we will "any" use a default DefaultQuery defaultQuery = new DefaultQuery(query); defaultQuery.setTypeName( typeName ); else if ( !typeName.equals( query.getTypeName() ) ){ return new EmptyFeatureCollection( schema ); if(!queryCapabilities.supportsSorting(query.getSortBy())){ throw new DataSourceException("DataStore cannot provide the requested sort order");
public boolean supportsSorting(SortBy[] sortAttributes) { return delegate.supportsSorting(sortAttributes); }
@Test public void testGetQueryCapabilities() { assertNotNull(pointsSource.getQueryCapabilities()); assertFalse(pointsSource.getQueryCapabilities().isJoiningSupported()); assertTrue(pointsSource.getQueryCapabilities().isOffsetSupported()); assertTrue(pointsSource.getQueryCapabilities().isReliableFIDSupported()); // TODO: add this ability back // assertTrue(pointsSource.getQueryCapabilities().isUseProvidedFIDSupported()); SortBy[] sortAttributes = { SortBy.NATURAL_ORDER }; assertTrue(pointsSource.getQueryCapabilities().supportsSorting(sortAttributes)); }
.supportsSorting(sortBy)) { query.setSortBy(sortBy); SortBy[] sortBy = new SortBy[] {sort}; if (catalog.getQueryCapabilities(rasterManager.getTypeName()) .supportsSorting(sortBy)) { query.setSortBy(sortBy); } else { LOGGER.severe(
if(!queryCapabilities.isOffsetSupported() && (query.getStartIndex() != null && query.getStartIndex() > 1)) { throw new RestletException("Offset is not supported on this data source", Status.SERVER_ERROR_INTERNAL);
/** * Builds the query capabilities for this feature source. The default implementation returns a * newly built QueryCapabilities, subclasses are advised to build their own. * * @return * @throws IOException */ protected QueryCapabilities buildQueryCapabilities() { return new QueryCapabilities(); }
public boolean isOffsetSupported() { return delegate.isOffsetSupported(); }
public boolean isJoiningSupported() { return delegate.isJoiningSupported(); }