Package org.opengis.filter

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


        FilterFactory ff = CommonFactoryFinder.getFilterFactory2(null);
        ExpressionBuilder b = new ExpressionBuilder();
        Expression e;

        assertEquals(ff.property("x"), b.property("x").build());
        assertEquals(ff.property("x"), b.property().property("x").build());
        assertEquals(ff.property("x"), b.property().name("x").build());

        assertEquals(ff.property(null), b.property(null).build());
    }
    @Test
View Full Code Here


        ExpressionBuilder b = new ExpressionBuilder();
        Expression e;

        assertEquals(ff.property("x"), b.property("x").build());
        assertEquals(ff.property("x"), b.property().property("x").build());
        assertEquals(ff.property("x"), b.property().name("x").build());

        assertEquals(ff.property(null), b.property(null).build());
    }
    @Test
    public void testFunction() {
View Full Code Here

        assertEquals(ff.property("x"), b.property("x").build());
        assertEquals(ff.property("x"), b.property().property("x").build());
        assertEquals(ff.property("x"), b.property().name("x").build());

        assertEquals(ff.property(null), b.property(null).build());
    }
    @Test
    public void testFunction() {
        FilterFactory ff = CommonFactoryFinder.getFilterFactory2(null);
        ExpressionBuilder b = new ExpressionBuilder();
View Full Code Here

                b.function("min").param().literal(1).param().literal(2).build());
       
        assertEquals(ff.function("min", ff.literal(1), ff.literal(2)),
                b.function("min").literal(1).literal(2).build());

        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).property("x").build());
       
        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).param().property("x").build());
View Full Code Here

        String attribName = type.getDescriptor(0).getLocalName();
        SimpleFeatureCollection fc = DataUtilities.collection(roadFeatures);
        SimpleFeatureSource fs = DataUtilities.source(fc);

        try {
            expr = ff.multiply(ff.property(attribName), ff.property(attribName));
            expr2 = ff.add(expr, ff.literal(3));
        } catch (IllegalFilterException e) {
            fail(e.getMessage());
        }
View Full Code Here

                b.function("min").literal(1).literal(2).build());

        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).property("x").build());
       
        assertEquals(ff.function("max", ff.literal(1), ff.property("x")),
                b.function("max").literal(1).param().property("x").build());

    }
   
    @Test
View Full Code Here

        String attribName = type.getDescriptor(0).getLocalName();
        SimpleFeatureCollection fc = DataUtilities.collection(roadFeatures);
        SimpleFeatureSource fs = DataUtilities.source(fc);

        try {
            expr = ff.multiply(ff.property(attribName), ff.property(attribName));
            expr2 = ff.add(expr, ff.literal(3));
        } catch (IllegalFilterException e) {
            fail(e.getMessage());
        }
View Full Code Here

         SimpleFeatureType type = riverType;
         final String attribName = "river";
         SimpleFeatureCollection fc = DataUtilities.collection(riverFeatures);

         expr = ff.property(attribName);

         String paletteName = "YlGn"; //type = Sequential
        
         //TEST classifier with everything in a single bin
         final Set<String>[] binValues2 = new Set[1];
View Full Code Here

    public void testEstimatedBoundsWithQuery() throws Exception {
        // enable fast bbox
        ((OracleDialect) ((JDBCDataStore) dataStore).getSQLDialect()).setEstimatedExtentsEnabled(true);
       
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equals(ff.property(aname("stringProperty")), ff.literal("one"));

        DefaultQuery query = new DefaultQuery();
        query.setFilter(filter);

        ReferencedEnvelope bounds = dataStore.getFeatureSource(tname("ft1")).getBounds(query);
View Full Code Here

    public void testEstimatedBoundsWithQuery() throws Exception {
        // enable fast bbox
        ((PostGISDialect) ((JDBCDataStore) dataStore).getSQLDialect()).setEstimatedExtentsEnabled(true);
       
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equals(ff.property(aname("stringProperty")), ff.literal("one"));

        DefaultQuery query = new DefaultQuery();
        query.setFilter(filter);

        ReferencedEnvelope bounds = dataStore.getFeatureSource(tname("ft1")).getBounds(query);
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.