Examples of lessOrEqual()


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

    }

    public void testGetFeaturesWithLessThanOrEqualToFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsLessThanOrEqualTo f = ff.lessOrEqual(ff.property("speed_is"), ff.literal(150));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(9, features.size());
    }

    public void testGetFeaturesWithIsLikeFilter() throws Exception {
View Full Code Here

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

    public void testCompareDateFilter() throws Exception {
        init();
        Date testDate = df.parse("2009-06-28 00:00:00");
        FilterFactory ff = dataStore.getFilterFactory();

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

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

        }
       
        // grab max of values lower than the target
        FilterFactory ff = getDataStore().getFilterFactory();
        Query qBelow = new Query(query);
        Filter lessFilter = ff.lessOrEqual(ff.property(attribute), ff.literal(targetValue));
        qBelow.setFilter(ff.and(query.getFilter(), lessFilter));
        MaxVisitor max = new MaxVisitor(attribute);
        handleVisitor(qBelow, max);
        Comparable maxBelow = (Comparable) max.getResult().getValue();
        if(maxBelow != null && maxBelow.equals(targetValue)) {
View Full Code Here

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

       
        DateFormat df = new SimpleDateFormat("yyyy-dd-MM");
        df.setTimeZone( TimeZone.getTimeZone("PST"));
       
        //less than
        Filter f = ff.lessOrEqual( ff.property( aname("d") ), ff.literal( df.parse("2009-28-06")
         ) );
        assertEquals( 2, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
       
        f = ff.lessOrEqual( ff.property( aname("d") ),ff.literal( df.parse("2009-28-06") ) );
        assertEquals( 2, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
View Full Code Here

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

        //less than
        Filter f = ff.lessOrEqual( ff.property( aname("d") ), ff.literal( df.parse("2009-28-06")
         ) );
        assertEquals( 2, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
       
        f = ff.lessOrEqual( ff.property( aname("d") ),ff.literal( df.parse("2009-28-06") ) );
        assertEquals( 2, fs.getCount( new DefaultQuery(tname("dates"),f ) ) );
    }
   
    public void testFilterByTimeStamp() throws Exception {
        FeatureSource fs = dataStore.getFeatureSource( tname("dates") );
View Full Code Here

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

                case FilterType.COMPARE_LESS_THAN:
                    return factory.less(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN_EQUAL:
                    return factory.lessOrEqual(expr1, expr2);

                default:
                    throw new SAXException("Illegal filter for " + element);

                }
View Full Code Here

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

                case FilterType.COMPARE_LESS_THAN:
                    return factory.less(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN_EQUAL:
                    return factory.lessOrEqual(expr1, expr2);

                case FilterType.COMPARE_NOT_EQUALS:
                    return factory.notEqual(expr1, expr2);
                default:
                    throw new SAXException("Illegal filter for " + element);
View Full Code Here

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

                    if(value instanceof Range){
                        // RANGE                       
                        final Range range= (Range)value;
                        filters.add(
                                ff.and(
                                        ff.lessOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMaxValue())),
                                        ff.greaterOrEqual(
                                                ff.property(propertyName),
                                                ff.literal(range.getMinValue()))
View Full Code Here

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

                            // 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));
                           
                            filters.add(ff.and(Arrays.asList(maxCondition,minCondition)));
                            continue;
View Full Code Here

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

                            value=maxValue;
                        }
                    }
                    filters.add(
                            ff.and(
                                    ff.lessOrEqual(
                                            ff.property(propertyName),
                                            ff.literal(value)),
                                    ff.greaterOrEqual(
                                            ff.property(additionalPropertyName),
                                            ff.literal(value))));
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.