Examples of greater()


Examples of org.opengis.filter.FilterFactory.greater()

    public void testUniqueWithFilter() throws Exception {
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyName p = ff.property( aname("stringProperty") );
       
        UniqueVisitor v = new MyUniqueVisitor(p);
        Filter f = ff.greater( ff.property( aname("doubleProperty") ), ff.literal(1) );
        Query q = new Query( tname("ft1"), f);
        dataStore.getFeatureSource(tname("ft1")).accepts(q, v, null);
        assertFalse(visited);
        Set result = v.getResult().toSet();
        assertEquals(2, result.size());
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

        FilterFactory ff = dataStore.getFilterFactory();
        PropertyName p = ff.property( aname("doubleProperty") );
       
        MinVisitor v = new MyMinVisitor(p);
       
        Filter f = ff.greater( ff.property( aname("doubleProperty") ), ff.literal(1) );
        Query q = new DefaultQuery( tname("ft1"), f);
        dataStore.getFeatureSource( tname("ft1")).accepts( q, v, null);
        assertFalse(visited);
        assertEquals( 1.1, v.getResult().toDouble(), 0.01 );
    }
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

        dataStore.setExposePrimaryKeyColumns(exposePrimaryKeys);
        FilterFactory ff = dataStore.getFilterFactory();
        Query q = new Query(tname("ft1"));
        Join j = new Join(tname("ftjoin"),
            ff.equal(ff.property(aname("stringProperty")), ff.property(aname("name")), true));
        j.filter(ff.greater(ff.property(aname("join1intProperty")), ff.literal(1)));
        q.getJoins().add(j);
        q.setFilter(ff.less(ff.property(aname("intProperty")), ff.literal(3)));
       
        assertEquals(1, dataStore.getFeatureSource(tname("ft1")).getCount(q));
    }
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

        FilterFactory ff = dataStore.getFilterFactory();
       
        Filter j = ff.equal(ff.property(aname("stringProperty")), ff.property(aname("name")), true);
        Query q = new Query(tname("ft1"));
        q.getJoins().add(new Join(tname("ftjoin"), j));
        q.setFilter(ff.greater(ff.property(aname("intProperty")), ff.literal(0)));
        q.setStartIndex(1);
        q.setSortBy(new SortBy[]{ff.sort(aname("intProperty"), SortOrder.ASCENDING)});
       
        SimpleFeatureCollection features = dataStore.getFeatureSource(tname("ft1")).getFeatures(q);
        assertEquals(1, features.size());
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

                    FeatureSource fs = remoteStore.getFeatureSource(TOPP_STATES);
                    remoteWFSStatesAvailable = Boolean.TRUE;
                    // check a basic response can be answered correctly
                    Query dq = new Query(TOPP_STATES);
                    FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
                    dq.setFilter(ff.greater(ff.property("PERSONS"), ff.literal(20000000)));
                    FeatureCollection fc = fs.getFeatures(dq);
                    if(fc.size() != 1) {
                        logger.log(Level.WARNING, "Remote database status invalid, there should be one and only one " +
                                "feature with more than 20M persons in topp:states");
                        remoteWFSStatesAvailable = Boolean.FALSE;
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

                    FeatureSource fs = remoteStore.getFeatureSource(TOPP_STATES);
                    remoteWFSStatesAvailable = Boolean.TRUE;
                    // check a basic response can be answered correctly
                    Query dq = new Query(TOPP_STATES);
                    FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
                    dq.setFilter(ff.greater(ff.property("PERSONS"), ff.literal(20000000)));
                    FeatureCollection fc = fs.getFeatures(dq);
                    if(fc.size() != 1) {
                        logger.log(Level.WARNING, "Remote database status invalid, there should be one and only one " +
                                "feature with more than 20M persons in topp:states");
                        remoteWFSStatesAvailable = Boolean.FALSE;
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.greater()

                case FilterType.COMPARE_NOT_EQUALS:
                    return factory.notEqual(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN:
                    return factory.greater(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN_EQUAL:
                    return factory.greaterOrEqual(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN:
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.greater()

                switch (type) {
                case FilterType.COMPARE_EQUALS:
                    return factory.equals(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN:
                    return factory.greater(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN_EQUAL:
                    return factory.greaterOrEqual(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN:
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.greater()

        WFSFeatureSource fs = wfs.getFeatureSource("topp:states");
       
        // build a filter with bits that cannot be encoded in OGC filter, but can be simplified
        // to one that can
        Filter f = ff.or(Arrays.asList(Filter.EXCLUDE, ff.and(Filter.INCLUDE, ff.greater(ff.property("PERSONS"), ff.literal(10000000)))));
        SimpleFeatureCollection fc = fs.getFeatures(f);
       
        // force calling a HITS query, it used to throw an exception
        int size = fc.size();
       
View Full Code Here

Examples of org.opengis.filter.FilterFactory2.greater()

        SimpleFeatureSource source = wfs.getFeatureSource(typeName);

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        Filter and = ff.and(
                Arrays.asList(Filter.INCLUDE,
                ff.greater(ff.property("gid"), ff.literal(0)),
                Filter.INCLUDE));
        Query query = new Query(typeName, and, 20, Query.ALL_NAMES, "my query");
        iterate(source.getFeatures(query), 20, false);       
    }
   
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.