Examples of greaterOrEqual()


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

    }

    public void testGetFeaturesWithIsGreaterThanOrEqualToFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsGreaterThanOrEqualTo f = ff.greaterOrEqual(ff.property("speed_is"),
                ff.literal(300));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(5, features.size());
    }
View Full Code Here

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

            Date date = (Date) it.next().getAttribute("installed_tdt");
            assertTrue(date.before(testDate) || date.equals(testDate));
        }
        it.close();

        f = ff.greaterOrEqual(ff.property("installed_tdt"), ff.literal(testDate));
        features = featureSource.getFeatures(f);
        assertEquals(5, features.size());
        it = features.features();
        while (it.hasNext()) {
            Date date = (Date) it.next().getAttribute("installed_tdt");
View Full Code Here

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

        FeatureSource fs = dataStore.getFeatureSource( tname("dates") );
       
        FilterFactory ff = dataStore.getFilterFactory();
       
        // greather than or equal to
        Filter f = ff.greaterOrEqual( ff.property( aname("t") ), ff.literal( "13:10:12" ) );
        assertEquals( 3, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
       
        f = ff.greaterOrEqual( ff.property( aname("t") ),
                ff.literal( new SimpleDateFormat("ss:HH:mm").parse("12:13:10") ) );
        assertEquals( 3, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
View Full Code Here

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

       
        // greather than or equal to
        Filter f = ff.greaterOrEqual( ff.property( aname("t") ), ff.literal( "13:10:12" ) );
        assertEquals( 3, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
       
        f = ff.greaterOrEqual( ff.property( aname("t") ),
                ff.literal( new SimpleDateFormat("ss:HH:mm").parse("12:13:10") ) );
        assertEquals( 3, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
    }
}
View Full Code Here

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

                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:
                    return factory.less(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN_EQUAL:
View Full Code Here

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

                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:
                    return factory.less(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN_EQUAL:
View Full Code Here

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

                        filters.add(
                                ff.and(
                                        ff.lessOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMaxValue())),
                                        ff.greaterOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMinValue()))
                                ));
                    else {
                        // SINGLE value
View Full Code Here

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

                        final Comparable maxValue = range.getMaxValue();
                        final Comparable minValue = range.getMinValue();
                        if(maxValue.compareTo(minValue)!=0){
                            // logic comes from Range.intersectsNC(Range)
                            // in summary, requestedMax > min && requestedMin < max
                            Filter maxCondition = ff.greaterOrEqual(
                                                        ff.literal(maxValue),
                                                        ff.property(propertyName));
                            Filter minCondition = ff.lessOrEqual(
                                                        ff.literal(minValue),
                                                        ff.property(additionalPropertyName));
View Full Code Here

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

                    filters.add(
                            ff.and(
                                    ff.lessOrEqual(
                                            ff.property(propertyName),
                                            ff.literal(value)),
                                    ff.greaterOrEqual(
                                            ff.property(additionalPropertyName),
                                            ff.literal(value))));
                }
            }
            return ff.or(filters);
View Full Code Here

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

    // the comparison is based on the kind of data so both
    // numeric, date and string comparisons are supported.
    filter = ff.less(ff.property("depth"), ff.literal(300));
    filter = ff.lessOrEqual(ff.property("risk"), ff.literal(3.7));
    filter = ff.greater(ff.property("name"), ff.literal("Smith"));
    filter = ff.greaterOrEqual(ff.property("schedule"), ff.literal(new Date()));

    // PropertyIsBetween is a short inclusive test between two values
    filter = ff.between(ff.property("age"), ff.literal(20), ff.literal("29"));
    filter = ff.between(ff.property("group"), ff.literal("A"), ff.literal("D"));
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.