Examples of SortByImpl


Examples of org.geotools.filter.SortByImpl

    @Test
    public void testLimitAttributes() throws IOException {
        Query query = new Query("Record");
        Filter typeDataset = FF.equals(FF.property("dc:type/dc:value", CSWRecordDescriptor.NAMESPACES), FF.literal("http://purl.org/dc/dcmitype/Dataset"));
        query.setFilter(typeDataset);
        query.setSortBy(new SortBy[] {new SortByImpl(FF.property("dc:subject/dc:value", CSWRecordDescriptor.NAMESPACES), SortOrder.ASCENDING)});
        // select some properties we did not use for filtering and sorting
        query.setProperties(Arrays.asList(FF.property("dc:identifier", CSWRecordDescriptor.NAMESPACES)));
       
        FeatureCollection records = store.getRecords(query, Transaction.AUTO_COMMIT);   
        assertEquals(3, records.size());
View Full Code Here

Examples of org.geotools.filter.SortByImpl

                if (!(expr instanceof PropertyName)) {
                    throw new IOException("Sorting on " + sortby.getPropertyName()
                            + " is not supported.");
                }

                unmappedSortBy[i] = new SortByImpl((PropertyName) expr, sortby.getSortOrder());

            }
        }
       
        if (q.getProperties() != null && q.getProperties().size() > 0) {
View Full Code Here

Examples of org.geotools.filter.SortByImpl

        SortBy[] sortBy = query.getSortBy();
        if(sortBy != null && sortBy.length > 0) {           
            for (int i = 0; i < sortBy.length; i++) {
                SortBy sb = sortBy[i];
                if(!SortBy.NATURAL_ORDER.equals(sb) && !SortBy.REVERSE_ORDER.equals(sb)) {
                    sortBy[i] = new SortByImpl(MDQueryableFilterVisitor.property(sb.getPropertyName()), sb.getSortOrder());
                }
            }
            query.setSortBy(sortBy);
        }
       
View Full Code Here

Examples of org.geotools.filter.SortByImpl

            for (int i = 0; i < sortBy.length; i++) {
                SortBy sb = sortBy[i];
                if(!SortBy.NATURAL_ORDER.equals(sb) && !SortBy.REVERSE_ORDER.equals(sb)) {
                    PropertyName name = sb.getPropertyName();
                    PropertyName extended = extender.extendProperty(name, FF, NAMESPACES);
                    sortBy[i] = new SortByImpl(extended, sb.getSortOrder());
                }
            }
            query.setSortBy(sortBy);
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.