Examples of PropertyIsBetween


Examples of org.opengis.filter.PropertyIsBetween

        PropertyName testAttribute = new AttributeExpressionImpl(testSchema,
                "testString");
        Literal testLiteralUpper = new LiteralExpressionImpl("tron");

        // String tests
        PropertyIsBetween filter = fac.between(testAttribute, testLiteralLower, testLiteralUpper);
        assertTrue(filter.evaluate(testFeature));

        // Test for false positive.
        testLiteralLower = new LiteralExpressionImpl("zebra");
        testLiteralUpper = new LiteralExpressionImpl("zikes");
        filter = fac.between(testAttribute, testLiteralLower, testLiteralUpper);
        assertFalse(filter.evaluate(testFeature));
    }
View Full Code Here

Examples of org.opengis.filter.PropertyIsBetween

        PropertyIsLike clone = (PropertyIsLike) super.visit(filter, extraData);
        return guardAgainstNulls(filter, clone.getExpression());
    }

    public Object visit(PropertyIsBetween filter, Object extraData) {
        PropertyIsBetween clone = (PropertyIsBetween) super.visit(filter, extraData);
        Filter f = guardAgainstNulls(clone, clone.getExpression());
        f = guardAgainstNulls(f, clone.getLowerBoundary());
        f = guardAgainstNulls(f, clone.getUpperBoundary());
        return f;
    }
View Full Code Here

Examples of org.opengis.filter.PropertyIsBetween

        names = DataUtilities.attributeNames(fn);
        list = Arrays.asList(names);
        assertTrue(list.contains("name"));
        assertTrue(list.contains("id"));

        PropertyIsBetween between = factory.between(name, id, geom);
        names = DataUtilities.attributeNames(between);
        assertEquals(3, names.length);
        list = Arrays.asList(names);
        assertTrue(list.contains("name"));
        assertTrue(list.contains("id"));
View Full Code Here

Examples of org.opengis.filter.PropertyIsBetween

        ex.accept(attributeExtractor, null);
        return attributeExtractor.isConstantExpression();
    }
   
    public Object visit(PropertyIsBetween filter, Object extraData) {
        PropertyIsBetween clone = (PropertyIsBetween) super.visit(filter, extraData);
        if(isConstant(clone.getExpression()) && isConstant(clone.getLowerBoundary()) && isConstant(clone.getUpperBoundary())) {
            return staticFilterEvaluate(clone);
        } else {
            return clone;
        }
    }
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.