Examples of less()


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

        AttributeTypeBuilder builder = new AttributeTypeBuilder();
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Function length = ff.function("LengthFunction", new Expression[]{ff.property(".")});
       
        // strict less
        builder.addRestriction(ff.less(length, ff.literal(20)));
        builder.setBinding(String.class);
        AttributeDescriptor attribute = builder.buildDescriptor("attribute");
        assertEquals(19, FeatureTypes.getFieldLength(attribute));
       
        // flip expression
View Full Code Here

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

    }

    public void testGetFeaturesWithIsLessThanFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsLessThan f = ff.less(ff.property("speed_is"), ff.literal(150));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(0, features.size());
    }

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

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

        FilterFactory ff = dataStore.getFilterFactory();
        PropertyName p = ff.property( aname("doubleProperty") );
       
        SumVisitor v = new MySumVisitor(p);
       
        Filter f = ff.less( ff.property( aname("doubleProperty") ), ff.literal(2) );
        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.less()

        FilterFactory ff = dataStore.getFilterFactory();
        PropertyName p = ff.property( aname("doubleProperty") );
       
        MaxVisitor v = new MyMaxVisitor(p);
       
        Filter f = ff.less( ff.property( aname("doubleProperty") ), ff.literal(2) );
        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.less()

        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));
    }

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

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

        return f;
    }

    private SimpleFeatureSource getView() throws IllegalFilterException, IOException, SchemaException {
        FilterFactory fac = CommonFactoryFinder.getFilterFactory(null);
        Filter f = fac.less(fac.property("id"), fac.literal(3));

        SimpleFeatureSource view = DataUtilities.createView(ds, new Query(typeName, f));
        return view;
    }
View Full Code Here

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

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

                default:
View Full Code Here

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

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

                case FilterType.COMPARE_NOT_EQUALS:
View Full Code Here

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

   
    Rule rule1 = builder.createRule(pointSymbolizer);
    rule1.setName("rule1");
    rule1.getDescription().setTitle("City");
    rule1.getDescription().setAbstract("Rule for drawing cities");
    rule1.setFilter(ff.less(ff.property("POPULATION"), ff.literal(50000)));
   
    //
    // RULE 2 Default
    Graphic dotGraphic = builder.createGraphic(null, builder.createMark(StyleBuilder.MARK_CIRCLE),
            null);
View Full Code Here

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

    filter = ff.isNull(ff.property("approved"));

    // The usual array of property comparisons is supported
    // 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
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.