Package org.opengis.filter

Examples of org.opengis.filter.PropertyIsEqualTo


                + "'");

        Assert.assertNotNull(filter);
        Assert.assertTrue(filter instanceof PropertyIsEqualTo);
       
        PropertyIsEqualTo eqFilter = (PropertyIsEqualTo) filter;
        Expression actual = eqFilter.getExpression2();
        Assert.assertEquals(str, actual.toString());
    }
View Full Code Here


            Assert.assertEquals(Long.parseLong(expected), actual.longValue());

        }
        {
            PropertyIsEqualTo resultFilter;
           
            resultFilter = (PropertyIsEqualTo) CompilerUtil.parseFilter(language,"RELATE(the_geom, LINESTRING (-134.921387 58.687767, -135.303391 59.092838), 201000002)");

            Expression relateFunction = resultFilter.getExpression1();
            Assert.assertTrue(relateFunction instanceof FilterFunction_relatePattern);
           
            Literal trueLiteral = (Literal) resultFilter.getExpression2();
            Assert.assertTrue(trueLiteral.getValue() instanceof Boolean);

        }
    }
View Full Code Here

        testRelatePatten("200000000");
    }
   
    private void testRelatePatten(final String pattern) throws CQLException {
       
        PropertyIsEqualTo resultFilter;
       
        resultFilter = (PropertyIsEqualTo) CompilerUtil.parseFilter(language,"RELATE(the_geom, LINESTRING (-134.921387 58.687767, -135.303391 59.092838), "+pattern+")");

        Expression relateFunction = resultFilter.getExpression1();
        Assert.assertTrue(relateFunction instanceof FilterFunction_relatePattern);
       
        Literal trueLiteral = (Literal) resultFilter.getExpression2();
        Assert.assertTrue(trueLiteral.getValue() instanceof Boolean);
    }
View Full Code Here

        Filter filter = CompilerUtil.parseFilter(language, "END_DATE = '"+ expectedDate + "'");

        Assert.assertNotNull(filter);
        Assert.assertTrue(filter instanceof PropertyIsEqualTo);
       
        PropertyIsEqualTo eq = (PropertyIsEqualTo) filter;
        Expression exp = eq.getExpression2();
        Assert.assertTrue(exp instanceof Literal);
        Literal actualDate  = (Literal) exp;
       
        Assert.assertEquals(expectedDate, actualDate.toString());
      
View Full Code Here

        Filter filter = CompilerUtil.parseFilter(language, "END_TIME = '"+ expectedTime + "'");

        Assert.assertNotNull(filter);
        Assert.assertTrue(filter instanceof PropertyIsEqualTo);
       
        PropertyIsEqualTo eq = (PropertyIsEqualTo) filter;
        Expression exp = eq.getExpression2();
        Assert.assertTrue(exp instanceof Literal);
        Literal actualTime  = (Literal) exp;
       
        Assert.assertEquals(expectedTime, actualTime.toString());
      
View Full Code Here

        Filter filter = CompilerUtil.parseFilter(language, "END_DATE = '"+ expectedDateTime + "'");

        Assert.assertNotNull(filter);
        Assert.assertTrue(filter instanceof PropertyIsEqualTo);
       
        PropertyIsEqualTo eq = (PropertyIsEqualTo) filter;
        Expression exp = eq.getExpression2();
        Assert.assertTrue(exp instanceof Literal);
        Literal actualDateTime  = (Literal) exp;
       
        Assert.assertEquals(expectedDateTime, actualDateTime.toString());
    }
View Full Code Here

        Assert.assertNotNull(filters);
        Assert.assertEquals(1, filters.size());
        Assert.assertTrue(filters.get(0) instanceof PropertyIsEqualTo);

        PropertyIsEqualTo filter = (PropertyIsEqualTo) filters.get(0);
        Assert.assertEquals("attr3", ((PropertyName) filter.getExpression1()).getPropertyName());
        Assert.assertEquals(valueWithDelimiter, ((Literal) filter.getExpression2()).getValue());
    }
View Full Code Here

        PropertyIsBetween btw = (PropertyIsBetween) filters.get(1);
        Assert.assertEquals("attr2", ((PropertyName) btw.getExpression()).getPropertyName());
        Assert.assertEquals(new Long(1), ((Literal) btw.getLowerBoundary()).getValue());
        Assert.assertEquals(new Long(7), ((Literal) btw.getUpperBoundary()).getValue());

        PropertyIsEqualTo equals = (PropertyIsEqualTo) filters.get(2);
        Assert.assertEquals("attr3", ((PropertyName) equals.getExpression1()).getPropertyName());
        Assert.assertEquals(valueWithDelimiter, ((Literal) equals.getExpression2()).getValue());
    }
View Full Code Here

        PropertyIsGreaterThan gt = (PropertyIsGreaterThan) filters.get(0);
        Assert.assertEquals("attr1", ((PropertyName) gt.getExpression1()).getPropertyName());
        Assert.assertEquals(new Long(5), ((Literal) gt.getExpression2()).getValue());

        PropertyIsEqualTo equals = (PropertyIsEqualTo) filters.get(2);
        Assert.assertEquals("attr3", ((PropertyName) equals.getExpression1()).getPropertyName());
        Assert.assertEquals(valueWithDelimiter, ((Literal) equals.getExpression2()).getValue());

        filterListStr = "EXCLUDE" + DELIMITER + "INCLUDE" + DELIMITER + "attr3 = '"
            + valueWithDelimiter + "'";

        filters = CQL.toFilterList(filterListStr);
View Full Code Here

        final String propName = "A";
        Filter result = CQL.toFilter(propName + " = strConcat( strConcat(QS, strConcat('/', RT)), strConcat(strConcat('/', NUMB), strConcat('/', BSUFF)) )");

        Assert.assertTrue( result instanceof PropertyIsEqualTo);
        PropertyIsEqualTo eq = (PropertyIsEqualTo) result;
       
        Expression expr1 = eq.getExpression1();
        Assert.assertTrue(expr1 instanceof PropertyName);
        PropertyName prop = (PropertyName)expr1;
        Assert.assertEquals(propName, prop.getPropertyName());
       
        Expression expr2 = eq.getExpression2();
        assertFunctionCompositionComplex(expr2);
      
    }
View Full Code Here

TOP

Related Classes of org.opengis.filter.PropertyIsEqualTo

Copyright © 2018 www.massapicom. 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.